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

Re: Perl script to read a tab delimited text file

by Crian (Curate)
on Apr 01, 2004 at 14:16 UTC ( [id://341634]=note: print w/replies, xml ) Need Help??


in reply to Perl script to read a tab delimited text file

Just a general hint: I think it's a good idea to print the reason ($!) when the opening (or else) of a file fails.

Because it gives the user a hint, whats going wrong.

Also it's helpful to name the file...

If you use q(...) or '...', you don't need to double the backslash.

All three tipps together remain in something like

my $file = 'C:\StudyPerl\Projects\tab_file.txt'; open(DAT, $file) or die "Could not open the file '$file': $!";
hth

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-28 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found