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

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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2016-02-11 07:14 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (362 votes), past polls