Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 imbibing at the Monastery: (6)
As of 2014-07-25 23:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls