P is for Practical | |
PerlMonks |
"Use of uninitialized value" due to empty elements in an arrayby michaelp (Initiate) |
on Mar 31, 2010 at 13:34 UTC ( [id://832047]=perlquestion: print w/replies, xml ) | Need Help?? |
michaelp has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone,
I have read in a tab-delimited file, and split each line by @line_split= split(/\t/,$line). To detect fields with empty strings I use
if (($line_split[0] eq "") {...}. From this I always get the "use of uninitialized value" warning. I´m not sure if this is a problem, but at least it spoils the output.. What am I doing wrong / how can I avoid that?
Cheers,
Michael
Back to
Seekers of Perl Wisdom
|
|