Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Golf: Embedded In Order

by jynx (Priest)
on Apr 28, 2001 at 02:56 UTC ( #76295=note: print w/replies, xml ) Need Help??


in reply to Golf: Embedded In Order


Yet Another Attempt. Hefty though, weighs in at 110 characters, is strict and warnings compliant and solves extra credit though...
sub x{ my($s,$t,$p)=(@_,0); (join'',map{$s=~/$_/g?($p<pos$s?($p=pos$s and$s=~s/$_//and$_):''):' +'}split//,$t)eq$t?$s:undef }
i'd be delighted to see someone trim it down...

nuf evah,
jynx

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76295]
help
Chatterbox?
[LanX]: YM: BTW learn to mute your humanity
[Your Mother]: Cumin? Now I want tacos...
[Eily]: there should be an option in grep for fuzzy order of the letters in the pattern
[Eily]: as in "I might have inverted two, but my eyes misread in the some order as my fingers mistype"
[LanX]: can't find a definition for the sound

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2017-03-27 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.