Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: TexT::CSV and getline

by swl (Priest)
on Nov 04, 2020 at 21:03 UTC ( #11123409=note: print w/replies, xml ) Need Help??


in reply to TexT::CSV and getline

GrandFather has answered the question, so this just another data point.

Text::CSV returns undef when it is passed incorrect arguments. If you had added a print for the $csv as well as $fh then this would have come up as a warning about printing an undefined value. Or you could have added:

die "CSV object is undefined" if !defined $csv;

This is one of those things that is much clearer in hindsight.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-04-20 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?