CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [piper68] parsing a line of numbers: Edit Log



murugaperumal
Novice


Mar 14, 2010, 10:49 PM


Views: 4356
Re: [piper68] parsing a line of numbers

Use the following code

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)


Edit Log:
Post edited by murugaperumal (Novice) on Mar 14, 2010, 10:49 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives