Paul, I would say it is your last \s+ which probably should be written \s* which says there may or may not be whitespace after the last number you find. With the plus there must be at least one white space.
Wags ;) -----Original Message----- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 09:12 To: Perl Subject: If Statement Nested Regular Exp. Any ideas why this fails. If I remove if /aged/ and just have the if /Reports ... then everything works ok. Code.... #!/usr/bin/perl my @files; my %age; push (@files, glob "Aged*"); push (@files, glob "Receipts*"); foreach (@files){ open FILE,"<$_"; print "$_\n"; while(<FILE>){ if ($_=~/Aged/){ print "Test\n"; if (/Report Total:\s+([\d,.]+)\s+([\d,.]+)\s+([\d,.]+)\s+([\d,.]+)\s+([\d,.]+)\s+([\ d,.]+)\s+/){ $age{"Orignal"} = $1; $age{"Current"} = $2; $age{"30 Days"} = $3; $age{"60 Days"} = $4; $age{"90 Days"} = $5; $age{"120 Days"} = $6; } } } } print "$k => $v\n" while (($k,$v) = each %age); Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]