Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by roboticus (Chancellor)
on Mar 31, 2010 at 14:32 UTC ( #832055=note: print w/ replies, xml ) Need Help??


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

michaelp:

If you simply want to turn undefined elements into an empty string, you could add a step to perform the conversion immediately after the split, like so:

@line_split = map { defined($_) ? $_ : '' } split (/\t/, $line);

...roboticus


Comment on Re: "Use of uninitialized value" due to empty elements in an array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (16)
As of 2015-07-01 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (12 votes), past polls