in reply to Best way(s) to process form data into fixed-length values?

Many thanks to all... so far I've got this lovely chunk o'code:
# format for fixed-length line: my $filebegin_format = "%-1.1s%-8.8s%-6.6s%-17.17s%-25.25s%-16.16s +%-1.1s%-9.9s%-9.9s%-8.8s%-35.35s%-25.25s%-2.2s%-12.12s%-3.3s"; #file +layout for characters 1-177 my $request_format = "%-4.4s%-4.4s%-1.1s%-1.1s%-35.35s%-35.35s%-35 +.35s%-25.25s%-2.2s%-12.12s%-3.3s%-4.4s"; #file layout for requests 1- +8 my $request9_format = "%-6.6s%-4.4s%-4.4s%-1.1s%-1.1s%-1.1s%-35.35 +s%-35.35s%-35.35s%-25.25s%-2.2s%-12.12s%-3.3s%-4.4s"; #file layout fo +r request 9 my $fileend_format = "%-5.5s%-1.1s%-16.16s%-4.4s%-25.25s%-16.16s%- +9.9s%-1.1s%-40.40s%-14.14s%-2.2s%-9.9s%-3.3s%-3.3s%-10.10s%-40.40s%-2 +2.22s%-1.1s"; #file layout for characters 1630-1850 my $format = $filebegin_format . $request_format . $request_format + . $request_format . $request_format . $request_format . $request_for +mat . $request_format . $request_format . $request9_format . $fileend +_format; # build fixed-length line: $fl_line = sprintf $format, $filetype, $batch, $serial, $sys_time, + $t_lastname, $t_firstname, $t_mi, $t_mi, $ssn, $ssn_cor, $dob, $t_ad +dress, $t_city, $t_state, $t_zip, $t_country, $code_1, $date_1, $type +_1, $priority_1, $addressee_1, $institution_1, $address_1, $city_1, $ +state_1, $zip_1, $country_1, $filler, $code_2, $date_2, $type_2, $pri +ority_2, $addressee_2, $institution_2, $address_2, $city_2, $state_2, + $zip_2, $country_2, $filler, $code_3, $date_3, $type_3, $priority_3, + $addressee_3, $institution_3, $address_3, $city_3, $state_3, $zip_3, + $country_3, $filler, $code_4, $date_4, $type_4, $priority_4, $addres +see_4, $institution_4, $address_4, $city_4, $state_4, $zip_4, $countr +y_4, $filler, $code_5, $date_5, $type_5, $priority_5, $addressee_5, $ +institution_5, $address_5, $city_5, $state_5, $zip_5, $country_5, $fi +ller, $code_6, $date_6, $type_6, $priority_6, $addressee_6, $institut +ion_6, $address_6, $city_6, $state_6, $zip_6, $country_6, $filler, $c +ode_7, $date_7, $type_7, $priority_7, $addressee_7, $institution_7, $ +address_7, $city_7, $state_7, $zip_7, $country_7, $filler, $code_8, $ +date_8, $type_8, $priority_8, $addressee_8, $institution_8, $address_ +8, $city_8, $state_8, $zip_8, $country_8, $filler, $code_9, $date_9, +$type_9, $exception_9, $priority_9, $addressee_9, $institution_9, $ad +dress_9, $city_9, $state_9, $zip_9, $country_9, $filler, $bill_total, + $cc_type, $cc_number, $cc_exp, $cc_name, $cur_lastname, $cur_firstna +me, $cur_mi, $cur_address, $cur_city, $cur_state, $cur_zip9, $cur_pco +de, $cur_country, $phone, $email, $filler, $reject; my $asr_line = uc($fl_line); #make the line uppercase
Which so far is giving me just what I need. And should be fairly simple to update when the client changes their minds again. Thanks to all!

I learn more and more about less and less until eventually I know everything about nothing.