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

Re^3: Empty output file with Red Hat

by andyford (Curate)
on Dec 26, 2006 at 16:36 UTC ( [id://591721]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Empty output file with Red Hat
in thread Empty output file with Red Hat

To avoid puzzling problems with missing data files, test your input with something along these lines:

#!/usr/bin/perl if (!defined $ARGV[0]) { # make sure some input is given die "No input file provided: $!"; } elsif (!-f $ARGV[0]) { # input is not a file die "Input $ARGV[0] not available as a file"; }
Then you'll know when you've got no data file to work on.

Also suggested is the use of "use warnings" and "use strict" at the beginning of nearly every Perl program.

non-Perl: Andy Ford

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 07:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found