Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Eliya (Vicar)
on May 13, 2012 at 18:05 UTC ( #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
Node Status?
node history
Node Type: note [id://970310]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-12-05 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (75 votes). Check out past polls.