Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: My first perl script is working, what did I do wrong?

by eyepopslikeamosquito (Chancellor)
on Nov 09, 2012 at 07:13 UTC ( #1003075=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($#ARGV != 0) {
         print "One, and only one (not $#ARGV), command line parameter is 
    +expected\n";
         exit;
    }
    
  2. or download this
    @ARGV == 1 or die "usage: $0 inputfile\n";
    
  3. or download this
    my $inputFile=$ARGV[0];
    
  4. or download this
    my $inputFile = shift;
    
  5. or download this
    if ( not -e $inputFile) {
         die "$inputFile doesn't exist!!!\nExiting.\n";
    }
    
  6. or download this
    -f $inputFile or die "input file '$inputFile' does not exist.\n";
    
  7. or download this
    open my $file, $inputFile or die "Could not open $inputFile: $!";
    
  8. or download this
    open my $file, '<', $inputFile or die "Could not open $inputFile: $!";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003075]
help
Chatterbox?
[marto]: hmm, the site running really slow for anyone else?
[choroba]: In recent days, I connect to 216.92.34.251 directly, otherwise I'm getting timeouts
[choroba]: YMMV

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2018-01-16 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (177 votes). Check out past polls.

    Notices?