Tom Kinzer wrote: > Try this: > > Caveat: This all assumes LOTS about the format of your data being > consistent, and so should be treated as a "quick and dirty" as opposed to > anything resembling a robust application... I'm not sure what your > intention with the script is, but is worth mentioning. > > -Tom Kinzer
Hi Tom, I think this may be getting too complicated. My understanding is that the OP was actually interested in a single datum, the total figure at the bottom. I haven't seen any clarification indicating otherwise, so I would suggest just doing it: my $junk = ''; $junk = <DATA> until $junk =~/^Total/; $pot_o_gold = <DATA>; $pot_o_gold =~ s/^\s*//; chomp $pot_o_gold; print "I got my value, and it's $pot_o_gold\n"; __DATA__ ... Format count a 100 b 51 c 130 d 5 e 6 Total: --- 292 I got my value, and it's 292 Remember KISS. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>