Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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: (16)
As of 2015-07-01 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (19 votes), past polls