Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl to run 2 files and print the third with loop

by mr_ron (Chaplain)
on Apr 01, 2018 at 18:29 UTC ( [id://1212107]=note: print w/replies, xml ) Need Help??


in reply to Perl to run 2 files and print the third with loop

Like jimpudar I got the OP code to work with small changes. I am just a little worried that in jimpudar approach we are not checking for the possibility that @{ $ts{$timestamp} } might become empty which the code below checks:

while ( <FA> ) { ... while ( $tot-- and defined(my $id = shift @{ $ts{$timestamp} }) ){ print join(",",$life, $id, $cls )."\n"; } }
Ron

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-28 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found