Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: split and uninitialized variables

by antirice (Priest)
on Sep 03, 2004 at 15:33 UTC ( #388312=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > perl -wl
    my ($x,$y,$z) = ('','','');
    ...
    print "$x $y $z";
    __END__
    a  b
    
  2. or download this
    perl -wl
    my ($x, $y, $z) = map defined $_ ? $_ : '', (split(',', 'a,0,b'))[0..2
    +];
    print "$x $y $z";
    __END__
    a 0 b
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-01-28 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (212 votes), past polls