Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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 
  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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003075]
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)
[LanX]: Choroba: do you miss chaos with ties? apply at the US government.. ;)
[ambrus]: Corion: those are good rules.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2017-03-29 12:12 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (350 votes). Check out past polls.