Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: read file from ARGV

by 2teez (Priest)
on Feb 02, 2013 at 09:13 UTC ( #1016684=note: print w/ replies, xml ) Need Help??

in reply to Re: read file from ARGV
in thread read file from ARGV

Hi nithins,
I think it would be a good practice to check the return of open function and to also close an opened filehandles like

open my $fh,'<',$ARGV[0] or die "can't open file: $!"; ... close $fh or die "can't close file: $!";
Except one is doinguse autodie qw(open close);

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Comment on Re^2: read file from ARGV
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2015-11-29 01:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls