in reply to A better way to print
One liners:
print ++$one, "\n" until $one == 10; print "$_\n" for 1..10; print join "\n", 1..10; # or even the somewhat less clear: s.$.$"=$/,@_=1\.\.10;qq<@_>.e&&print
The useful things to note are the , and range .. operators perlman:perlop, the aliasing of stuff to $_, the limited need for parentheses () and the fact you can add modifier functions like for, if, unless, until and while to the end of statements saving a lot of code perlman:perlfunc. You can also write totally incomprehensible Perl just for fun :-)
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|