Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Extracting only required length in a column in perl DBI

by sth (Priest)
on Jan 15, 2013 at 19:32 UTC ( #1013446=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Extracting only required length in a column in perl DBI
in thread Extracting only required length in a column in perl DBI

Then you need to unpack all 3, you can't unpack three variables at once AFAIK. The "A3 A3 A6" is a format for unpacking one variable, as Tux showed in the example. You could just used substrings,

$ans_rid = substr($ans_rid, 0, 3); $ans_qcn = substr($ans_qcn, 0, 3); $ans_loc = substr($ans_loc, 0, 6);
..or make new variables for each substr() leaving the original variable intact.


Comment on Re^3: Extracting only required length in a column in perl DBI
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-09-19 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (146 votes), past polls