Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( #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? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-12-05 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?