Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: die not exiting Application

by Corion (Patriarch)
on Apr 16, 2008 at 06:35 UTC ( [id://680736]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(my $fh, "<", $file) or die("file open failed for '$file': $!");
    
  2. or download this
    X:\>perl -e "open($file) || die('file open failed');"
    file open failed at -e line 1.
    
    X:\>perl -e "open('xx') || die('file open failed');"
    file open failed at -e line 1.
    
  3. or download this
    perl -e "$FILE='file_that_exists';open(FILE) || die('file open failed'
    +);"
    
  4. or download this
    X:\>perl -w tmp.pl
    Name "main::IN" used only once: possible typo at tmp.pl line 5.
    ...
        my $file= "/tmp/test123";
        open(IN, $file) || die "Couldn't open `$file'";
    }
    
  5. or download this
    use strict;
    sub push_report {
    ...
        };
        open(IN, $file) || die "Couldn't open `$file'";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2024-04-16 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found