[OT] golf

Uri Guttman uri at stemsystems.com
Tue Mar 4 21:46:03 GMT 2008


>>>>> "A" == Abigail  <abigail at abigail.be> writes:

  A> On Tue, Mar 04, 2008 at 06:53:00PM +0000, Nicholas Clark wrote:
  >> 
  >> perl -0777lp015e0

  A> I've used a similar trick to replace characters. For instance,
  A> to replace \r with \n, one could do:

  A>     perl -015pl12e1

i think nick's code has a bug or extra opts. the 015 needs to follow the
-l option as abigail does with 12. in his it follows the -p which takes
no argument. maybe perl will use 015 for the record separator arg and
override the -0777 (which slurps the whole file in). i don't see how
slurping and also setting -l and -015 would work. of course i didn't run
it as that would take the fun out of analyzing it. :)

uri

-- 
Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Architecture, Development, Training, Support, Code Review  ------
-----------  Search or Offer Perl Jobs  ----- http://jobs.perl.org  ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


More information about the london.pm mailing list