Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Practical example of "Is Perl code maintainable"

by eyepopslikeamosquito (Archbishop)
on Aug 13, 2007 at 08:49 UTC ( [id://632161]=note: print w/replies, xml ) Need Help??


in reply to Practical example of "Is Perl code maintainable"

Just found another:

sub file_size { my ($file) = @_; if( ! -f $file ) { return 0; } my $dummy; my $size; ($dummy,$dummy, $dummy, $dummy, $dummy, $dummy, $dummy, $size, $dumm +y, $dummy, $dummy, $dummy, $dummy) = stat($file); return $size; }
which was either written because he never heard of -s or maybe to silence warnings when the file does not exist. I'm tempted to replace it with:
sub file_size { -s shift || 0 }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found