in reply to Re: Time to golf
in thread Time to golf

Miranda: yours doesn't work - hangs forever because you don't auto-flush. (might be platform-dependent)

grep: Using your count, mine would be 64 actually.

In any case, yes what you're doing is majorly cheating. The script should work streaming, and you should use /TEST/ since the pattern is supposed to be replacable

Other than that however it is fairly nice.

The ark version certainly works, and beats my original by one char. Unfortunately for you, it inspired me to an even shorter one:

perl -pe's/(.* )(.*)/-$2?$$1=$&:$$1/e'
So, your turn again :-)

Replies are listed 'Best First'.
Re: Re: Re: Time to golf
by locked_user mtve (Deacon) on Feb 21, 2003 at 23:23 UTC

    Ah, yep, you're right about miranda, i noticed that.

    What regarding to ark, not so easy :)

    -p s/\S*$/-$&?${$`}=$&:${$`}/e

      -p s/ .*/-$&?${$`}=$&:${$`}/e

      •Update: forget I said this.. it opens possibility for messing up special vars

      •Update: looks like you've won on this one, damn congratulations :-)