Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Fun with words (Golf?)

by Anonymous Monk
on Nov 09, 2005 at 09:56 UTC ( [id://507020]=note: print w/replies, xml ) Need Help??


in reply to Re: Fun with words (Golf?)
in thread Fun with words (Golf?)

using s/// to detect the punctuation, and it can be shorter still:
while(<DATA>){for(@x=split){s/([.,]?)$//;$s=substr$_,0,1,''; $e=chop;$s.=substr$_,rand(length),1,''while$_;$_="$s$e$1"} print"@x\n"}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found