It seems to pass all tests for current Pugs svn build.my@l=(open@ARGS[0]).readline(); my$i;$i=@l-10 if@l>10; say@l[$i..Inf];
Update: After discovering that the good old ternary operator was renamed to ?? ::, I came up with the slightly more elegant solution:
This is exactly one character shorter...:-)my@l=(open@ARGS[0]).readline(); my$i=@l>10??@l-10::0; say@l[$i..Inf];
Update2: I have just discovered the = $filehandle operator in list context, so, take this one:
my@l= =open@ARGS[0]; my$i=@l>10??@l-10::0; say@l[$i..Inf];
In fact, my@l==open@ARGS[0]; seems to work too, but, in my opinion, this should better be a bug...
rg0now
In reply to Re: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
by rg0now
in thread Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |