Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Ordering of print statements

by Paladin (Vicar)
on Jun 01, 2018 at 22:51 UTC ( #1215686=note: print w/replies, xml ) Need Help??


in reply to Ordering of print statements

I'm assuming that's all inside of a while loop you are using to read the file. Instead of printing when you match the line, store the value in a variable. Then after the while loop, print it all out.
if ($line =~ /\s*APP>\s*LumaIntraMode\s:(\w+),\suse_intrabc:(\d)/i) { $values{Luma_mode} = $1; } # etc...
Then after the loop
print "Luma Mode: ", $values{Luma_Mode}, "\n"; print "Luma Angle: ", $values{Luma_Angle}, "\n"; # etc...

Replies are listed 'Best First'.
Re^2: Ordering of print statements
by Eshan_k (Acolyte) on Jun 06, 2018 at 06:02 UTC
    Thanks Paladin for your reply.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1215686]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2019-10-17 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?