CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Fun With Perl: Perl Golf: Re: [fashimpaur] String Replacement Golf: Edit Log



freddo
User

Feb 14, 2002, 3:23 PM


Views: 44268
Re: [fashimpaur] String Replacement Golf

Hi Fashimpaur,

we're both wrong... Crazy
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] Wink

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)


Edit Log:
Post edited by freddo (User) on Feb 14, 2002, 3:31 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives