
freddo
User
Feb 14, 2002, 3:23 PM
Views: 28274
|
|
Re: [fashimpaur] String Replacement Golf
|
|
|
Hi Fashimpaur, we're both wrong... first, i just saw i copy/pasted the wrong mysubstr from the perl debugger, it should have been:[spoiler]sub mysubstr{$_=shift;/(.{$_[0]}).{$_[2]}(.*)/;"$1$_[1]$2"}[/spoiler](which makes it 46 bytes)... and secondly you inverted $_[2] & $_[3] so..... who shorten it next? freddo updated: finally pasted the good sub, damn. ;---
(This post was edited by freddo on Feb 14, 2002, 3:31 PM)
|