Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Eliya (Vicar)
on May 13, 2012 at 18:05 UTC ( [id://970310]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Short version of database push for multiple variables
in thread Short version of database push for multiple variables

In case the original version doesn't work for you (error "Search pattern not terminated at ..."), your Perl might be too old (<5.10).  In this case, you could say instead

my @a = map defined $_ ? $_ : 'NA', split /\t/, $line;

Or upgrade Perl.

Replies are listed 'Best First'.
Re^4: Short version of database push for multiple variables
by Anonymous Monk on May 13, 2012 at 18:18 UTC
    My version is 5.8.5. When I try your code I get the following error; Did not find leading dereferencer, detected at offset 14434String found where operator expected at Process.pl line 146, near "// 'NA'" Thanks for your help!
      ... near "// 'NA'"

      There is no "//" in my code, so it's unlikely you'd get this error :)

Log In?
Username:
Password:

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

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

    No recent polls found