Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 chanting in the Monastery: (11)
As of 2014-10-31 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (220 votes), past polls