John Doe [JD], on Tuesday, May 10, 2005 at 09:22 (+0200) made these points:
JD> Or, shorter (no need to use while _and_ //g): JD> use warnings; JD> use strict; JD> $_ = 'atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N'; JD> my @decimals= /(\d+\.?\d*)/g; JD> print "@decimals\n"; very nice example, thanks for remembering this. Also I think it is faster then while loop. also there should be my @decimals= /(\d+\.?\d+)/g; #for valid decimal numbers e.g. "1.2" and not "1.", but these things should know author. -- How do you protect mail on web? I use http://www.2pu.net ["This is a copy; I want you to make me the original." - s.w.] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>