Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: "Use of uninitialized value" due to empty elements in an array

by ikegami (Pope)
on Mar 31, 2010 at 15:27 UTC ( #832076=note: print w/replies, xml ) Need Help??


in reply to "Use of uninitialized value" due to empty elements in an array

Tell split not to remove empty trailing fields.
my @line_split = split(/\t/, $line, -1);
And if you want, you can check if you got enough fields
if (@line_split != 3) { die("Not enough fields in line $.\n"); }

Replies are listed 'Best First'.
Re^2: "Use of uninitialized value" due to empty elements in an array
by michaelp (Initiate) on Mar 31, 2010 at 17:28 UTC
    Thanks for all the help!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://832076]
help
Chatterbox?
[choroba]: Most coffees? Depends on the country :-)
[choroba]: oh, you mean a cup with no water.
[Discipulus]: you are rigth, gory details but i remember from dunnowhere that concetrate caffein is more effective than brown water almost coffe..
[LanX]: prepared both kinds a 100 times and thinks the amount of grind code is about the same
Discipulus less effective i mean
[LanX]: (french press vs espresso cooker )
[LanX]: s/code/coffee/

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-01-16 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (148 votes). Check out past polls.