Difference between revisions of "Perl:Count 0 to 9"

From Progzoo
Jump to: navigation, search
(New page: <p>You can use a <code>for</code> loop to count from zero to nine.</p> ==Output 0 1 2 3 4 5 6 7 8 9== <question xmlns:htm="http://www.w3.org/1999/xhtml" lang="pl" className="Demo"><prog> f...)
(No difference)

Revision as of 11:38, 31 December 2007

You can use a for loop to count from zero to nine.

Output 0 1 2 3 4 5 6 7 8 9

A more perlish solution:

for (0..9){
print "$_\n";
}
[Font] [Default] [Show] [Resize] [History] [Profile]