
murugaperumal
Novice

Mar 14, 2010, 10:49 PM
Views: 8454
|
Re: [piper68] parsing a line of numbers
|
|
|
Use the following code
my $var="UTC 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 "; my @array; @array=split(" ",$var); foreach(@array) { if(/\d+/) { print "$_,\n"; } }
(This post was edited by murugaperumal on Mar 14, 2010, 10:49 PM)
|