Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Filling a hash

by chester (Hermit)
on Oct 26, 2005 at 16:41 UTC ( #503108=note: print w/ replies, xml ) Need Help??


in reply to Re: Filling a hash
in thread Filling a hash

Here is another simple solution. Inputs are taken 2 per line, separated by ^Q for clarity's sake, ignoring malformed input.

until (defined($flag) and defined($flag) == $flag) { ($_=substr(<STDIN>,0,-1)) !~ /\A^\be{1,1}\B(?=x(?=i(?=t)))\Bx{1,1} +\B(?=i(?=t))i(?=t)\Bt{1,1}\b\Z\z$/ and ((index($_,"\x11") == -1) or ($_{ substr($_,0,index($_,"\x +11")) } = substr($_,index($_,"\x11")+1))) or ($flag = print map {$_.$".$_{$_}.$/} keys %_) }


Comment on Re^2: Filling a hash
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://503108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-10-25 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls