in reply to loopy trouble

Here's probably the easiest way...

for (1..100){ print "$_\n"; }

Replies are listed 'Best First'.
Re^2: loopy trouble
by Anonymous Monk on Jan 07, 2016 at 21:28 UTC

    For perl 6?

      Exactly the same (note that with perl6, you can omit the parens):

      #!/usr/bin/perl6 for (1..3){ print "$_\n"; }

      ...or, you can use say. (You can in perl5 as well, if you use feature 'say';):

      for (1..3){ say $_; }

      or a shortcut if you're only doing a small task (same as perl5):

      print "$_\n" for 1..3; say $_ for 1..3;

        many thanks, very useful link you shared. Is there a place where i can get exercises from easy to very hard. I find that i learn better by solving problems.