ulaksh has asked for the wisdom of the Perl Monks concerning the following question:
My output shows as below.use strict; use warnings; my $sentence = shift; my @words = split(/\s+/, $sentence); my $i; for($i=0;$i<scalar (@words);$i++) { print "$i: " . $words[$i] . "\n"; }
0: i
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: not able to get the output using split function
by NetWallah (Canon) on Sep 01, 2012 at 22:09 UTC | |
|
Re: not able to get the output using split function
by philiprbrenan (Monk) on Sep 01, 2012 at 21:35 UTC | |
|
Re: not able to get the output using split function
by AnomalousMonk (Archbishop) on Sep 02, 2012 at 07:44 UTC | |
|
Re: not able to get the output using split function
by CountZero (Bishop) on Sep 02, 2012 at 17:39 UTC | |
|
Re: not able to get the output using split function
by GrandFather (Saint) on Sep 03, 2012 at 05:09 UTC |