Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: can PERL just quit?

by boftx (Deacon)
on Jun 09, 2014 at 21:24 UTC ( #1089336=note: print w/replies, xml ) Need Help??


in reply to can PERL just quit?

Since you are not testing the return values of open or anything else, I would definitely have use autodie; in place.

You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

Replies are listed 'Best First'.
Re^2: can PERL just quit?
by gupr1980 (Acolyte) on Jun 09, 2014 at 21:33 UTC
    i get Can't locate autodie.pm on Linux. How can i get this? I have autodie.pm on my windows workstation, is there a way i can copy it over to Linux server?
      Hmm, surprising... The autodie module has been a standard Perl package for quite a while. Which version of Perl are you running?
        v5.8.8

      You can get it from metaCPAN: autodie

      I would normally say get it from CPAN, but they have been down a lot lately. :(

      You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

        For clarity, CPAN has not been down. http://search.cpan.org has been unavailable for various reasons recently.

        Hi :) you confused search.CPAN.org with CPAN :) cpan autodie
      You don't need autodie. You can rewrite your code so that it checks for errors and reports the reason for failure, e.g.:
      open my $INFILE, '<', $infilename or die "Cannot open $infilename: $!" +; seek $INFILE, $readoffset, 0 or die "Cannot seek: $!"; open my $OUTFILE, '>>', $outfilename or die "Cannot open $outfilename: + $!";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2022-05-24 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?