Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Help! Stuck on methods to count file size.

by Laurent_R (Vicar)
on Oct 10, 2013 at 16:57 UTC ( #1057759=note: print w/ replies, xml ) Need Help??


in reply to Help! Stuck on methods to count file size.

open my $fh, $filin || die $!;

is not the best way to open a file (check the precedence of operators). Try this:

open my $fh, "<", $filin or die $!;

or:

open (my $fh, "<", $filin) || die $!;


Comment on Re: Help! Stuck on methods to count file size.
Select or Download Code
Re^2: Help! Stuck on methods to count file size.
by Anonymous Monk on Oct 11, 2013 at 02:31 UTC
    It's really good suggestion, thank you for all the valuable suggestions.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-07-24 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (156 votes), past polls