NAME Parse::FixedDelimiter - parse a string containing a fixed delimiter into component parts SYNOPSIS use Parse::FixedDelimiter; $phone_number=803-781-4191; Parse::FixedDelimiter::parse($phone_number, \%moms_phone, '-', [ 'area_code', 'exchange', 'number' ]); for (keys %moms_phone) { print $_, " ", $moms_phone{$_}, $/; } # yields $moms_phone{area_code} == 803 # $moms_phone{exchange} == 781 # $moms_phone{number} == 4191 =cut #----------------------------------------------------------------------- package Parse::FixedDelimiter; #use strict; #----------------------------------------------------------------------- DESCRIPTION The `Parse::FixedDelimiter' module facilitates the process of breaking a string into its fixed-length components. PARSING ROUTINES There are two parsing routines: `parse()' and `quick_parse'. parse() 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() This function takes the name of a pre-packaged datatype, a string, a reference to a hash and stores the results of fixed length parsing into the hash reference passed in. DIAGNOSTIC ROUTINES There is one diagnostic routine: `print_parsed()'. print_parsed() This function prints all parses performed. #=============================================================== ======== sub print_parsed { map { print "$_\n" } (@parse_record); } #--------------------------------------------------------------- -------- EXAMPLES see SYNOPSIS AUTHOR Terrence Brannon COPYRIGHT Copyright (c) 1999 End70 Corporation This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.