Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by Eliya (Vicar)
on May 13, 2012 at 20:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://970327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found