or an even *nix-ier way: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";#
and in a smaller but not the same 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";####
Don't know if smaller is possiblesplit/\n/,`cat /usr/share/dict/words`;print "that ".$_[rand$#_]."'s my ".$_[rand$#_];##
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: that x's my y
by Anonymous Monk on Jan 11, 2011 at 15:40 UTC |