Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-12-02 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (51 votes). Check out past polls.