Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^3: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6

by rg0now (Chaplain)
on Mar 12, 2005 at 17:09 UTC ( #438951=note: print w/replies, xml ) Need Help??

in reply to Re^2: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
in thread Replaying Santa Claus Golf Apocalypse with Pugs/Perl6

You are absolutely right just about everything, you wrote, except that when golfing with Pugs, you must take into account that many things will not work as expected, or will not work at all...:-)

For example, Pugs does not have reverse yet. And while it seems to recognize the parenless form of for, it requires an extra space not just before the loop statement, but immedaitely after it, too. So, the code takes the form:

my@l= =open@ARGS[0]; for @l {print @l.pop}
And this is just as long as the form with parens, but less clean.

However, the more I see the @l.pop form, the more I like it. Thank you for pointing this out to me...

Update: I was stupid, parenless for is working just right, as TimToady suggested, I don't know, what the hell I was messing up...:-)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://438951]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-12-14 06:57 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (384 votes). Check out past polls.