Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by Laurent_R (Monsignor)
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
Replies are listed 'Best First'.
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 surveying the Monastery: (10)
As of 2015-07-29 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls