Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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

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?
[erix]: perlmonks has become read-only ?
[marto]: erix unlikely, we've had posts within the last few minutes ;)
[ambrus]: nysus: make sure you enter at least two lines for the title and then preview, and read warnings the preview form prints
[davies]: There is an option (I have it set) to force preview before submission. Perhaps your option has been set (accidentally?) and you are not expecting it.
[ambrus]: sorry, I mean at least two words for the title and then preview
[ambrus]: davies: that option is the default. and it's not really "force", it just hides the button.
[marto]: yes, not reading the errors displayed has been a cause of this type of report in the past
[nysus]: Ambrus, ah. I think that was the problem. I'll try. Thanks!
[davies]: Ambrus: you've missed it by a couple of weeks, but consider next year's London Perl Workshop.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-12-15 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?