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

Re^3: Short version of database push for multiple variables

by Eliya (Vicar)
on May 13, 2012 at 20:19 UTC ( #970327=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MData::Dumper -e'@a = split /\t/, "foo\t\tbar"; print Dumper \
    +@a'
    $VAR1 = [
    ...
              '',
              'bar'
            ];
    
  2. or download this
    $ perl -MData::Dumper -e'@a = map $_//"NA", split /\t/, "foo\t\tbar"; 
    +print Dumper \@a'
    $VAR1 = [
    ...
              'bar'
            ];
    
  3. or download this
    $ perl -MData::Dumper -e'@a = map $_ ne "" ? $_ : "NA", split /\t/, "f
    +oo\t\tbar"; print Dumper \@a'
    $VAR1 = [
    ...
              'NA',
              'bar'
            ];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-08-30 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls