Take me over?
NAME
Parse::FixedLength - parse a string containing fixed length fields into component parts
SYNOPSIS
use Parse::FixedLength;
$phone_number=8037814191;
parse($phone_number,
\%moms_phone,
[
{'area_code' => 3},
{'exchange' => 3},
{'number' => 4} ] );
for (keys %moms_phone) {
print $_, " ", $moms_phone{$_}, $/;
}
# yields $moms_phone{area_code} == 803
# $moms_phone{exchange} == 781
# $moms_phone{number} == 4191
DESCRIPTION
The Parse::FixedLength
module facilitates the process of breaking a string into its fixed-length components.
PARSING ROUTINES
- parse()
-
parse($string_to_parse, $href_storing_parse, $LOH_parse_instructions)
This function takes a string, a reference to a hash and a reference to a list of hashes and stores the results of fixed length parsing into the hash reference passed in.
- quick_parse()
-
To facilitate the parsing of certain common fixed-length strings, the
quick_parse()
function takes the name of an LOH (list of hashes) containing formatting information, a string, and a reference to a hah in which to store parsing results. The currently available formatting routines are: - *
@us_phone
-
$phone_number=8882221234; Parse::FixedLength::quick_parse("us_phone",$phone_number, \%lncs_phone);
- *
@us_ssan
- *
@MM_DD_YYYY
- *
@MM_DD_YY
- *
@YY_MM_DD
- *
@YYYY_MM_DD
- print_parsed()
-
This routine can be called after parsing to print a record of parse results.
EXAMPLES
see SYNOPSIS
AUTHOR
Terrence Brannon <tbone@cpan.org>
COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
6 POD Errors
The following errors were encountered while parsing the POD:
- Around line 181:
Expected text after =item, not a bullet
- Around line 187:
Expected text after =item, not a bullet
- Around line 189:
Expected text after =item, not a bullet
- Around line 191:
Expected text after =item, not a bullet
- Around line 193:
Expected text after =item, not a bullet
- Around line 195:
Expected text after =item, not a bullet