http://qs321.pair.com?node_id=1013446


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.