|  |  
 |   |   
 NAMEString::RexxParse - Perl implementation of REXX parse command Download: http://www.danofsteel.com/Parser/String-RexxParse-1.10.tar.gz ftp://www.danofsteel.com/pub/RexxParse/String-RexxParse-1.10.tar.gz AUTHORDan Campbell 
 DESCRIPTIONSome long-time REXX programmers switching to Perl find it difficult to give up REXX's template-based parsing abilities. This module is my attempt to provide such parsing in Perl. The documentation assumes a familiarity with REXX parse statements. CHANGES
 SYNOPSIS
 SYNTAX
 EXAMPLES REXX:
 parse var a b c '.' d '([' e '])' f qq.one
 Perl:
 parse $a, q! $b $c '.' $d '([' $e '])' $f $qq{one} !;
 # or
 $p = String::RexxParse->new(q! $b $c '.' $d '([' $e '])' $f $qq{one} !);
 $p->parse($a);
 ~~~~~~~~~~~~~~~
 REXX:
 parse var a b . '.' d '([' e '])' f qq.one
 Perl:
 parse $a, q!$b . '.' $d '([' $e '])' $f $qq{one}!;
 ~~~~~~~~~~~~~~~
 REXX:
 parse linein b c '.' d '([' e '])' f qq.one
 Perl:
 parse <>, q! $b $c '.' $d '([' $e '])' $f $qq{one} !;
 ~~~~~~~~~~~~~~~
 REXX:
 parse linein('filename') b c '.' d '([' e '])' f qq.one
 Perl:
 open FILE,"filename";
 parse <FILE>, q! $b $c '.' $d '([' $e '])' $f $qq{one}!;
 ~~~~~~~~~~~~~~~
 REXX:
 parse value(func(a)) with b c '.' d '([' e '])' f qq.one
 Perl:
 parse func($a), q! $b $c '.' $d '([' $e '])' $f $qq{one}!;
 ~~~~~~~~~~~~~~~
 REXX:
 variable = '.'
 parse a b c (variable) d 
 Perl:
 $variable = '.';
 parse $a, q/$b $c ($variable) $d/;
 ~~~~~~~~~~~~~~~
 REXX:
 variable = "abc"
 parse a b c (' 'variable' ') d 
 Perl:
 parse $a, q/$b $c (" $variable ") $d/;
 ~~~~~~~~~~~~~~~
 REXX:
 parse a b 12 c +8 d 
 Perl:
 parse $a, q! $b 11 $c +8 $d !;
 # position 12 in REXX is position 11 in Perl!
 ~~~~~~~~~~~~~~~
 
 REXX:
 parse var a b . d '([' e '])' f -13 g +(eight) qq.one
 Perl:
 @list = parse $a,  q!$b '.' $d '([' $e '])' $f -13 $g +($eight) $qq{one}!;
 # In addition to assiging values to the variables identified in the template,
 # @list will contain a list of corresponding values.
BUGS, QUESTIONS, COMMENTSPlease report any suspected bugs to Dan Campbell (String::RexxParse->email). Include the template and sample text that produces the incorrect results, along with a description of the problem. Questions and comments are also welcome. POD ERRORSHey! The above document had some coding errors, which are explained below: 
 
 
 |