Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

that x's my y

by blackle (Beadle)
on Jan 02, 2011 at 13:23 UTC ( #880070=obfuscated: print w/ replies, xml ) Need Help??

open(D,"/usr/share/dict/words");@D=<D>; $x=$D[int,rand()*$#D];$y=$D[int(rand()* $#D)];$x=~s/'s\n$|s\n$|\n$//;$x.="s";$y =~s/'s\n$|s\n$//;print"that $x my $y";#
or an even *nix-ier way:
split/\n/,`cat /usr/share/dict/words`;$a =$_[rand$#_];$a=~s/s$|$/s/;$b=$_[rand$#_ ];$b=~s/s\n$//;print"that $a my $b";####
and in a smaller but not the same way:
split/\n/,`cat /usr/share/dict/words`;print "that ".$_[rand$#_]."'s my ".$_[rand$#_];##
Don't know if smaller is possible

Comment on that x's my y
Select or Download Code
Replies are listed 'Best First'.
Re: that x's my y
by Anonymous Monk on Jan 11, 2011 at 15:40 UTC
    split/\n/,`cat /usr/share/dict/words`;print "that ".$_[rand$#_]."'s my ".$_[rand$#_];
    remove the two ##, the most obvious shortening ;)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-07-29 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls