Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: parsing and get the report

by apl (Monsignor)
on Dec 20, 2008 at 15:11 UTC ( [id://731772]=note: print w/replies, xml ) Need Help??


in reply to parsing and get the report

Unless you had some other use for the intermediate variables, I'd replace
$time = $1; $tid = $2; $status = $3; $trname = $4; $tramount = $5; $hash{$2}->[0] = $status; $hash{$2}->[1] = $time; $hash{$2}->[2] = $trname; $hash{$2}->[3] = $tramount;
with
$hash{$2}{status} = $3; $hash{$2}{time} = $1; $hash{$2}{trname} = $4; $hash{$2}{tramount} = $5;
It's slightly shorter, and slightly more readable. (That is, it prevents you from asking 'What does subscript 2 stand for again?'.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found