[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] $_=$l[rand@l];



>>>>> "Kevin" == Kevin Reid <kpreid@ibm.net> writes:

    Kevin> Something to try shortening:
    Kevin> @ARGV='iMax:Documents:Info:lwall-quotes.txt';$/='%%
    Kevin> ';@l=<>;$_=$l[rand@l];chomp;print

Three less characters:

@ARGV='iMax:Documents:Info:lwall-quotes.txt';$/='%%
';chomp(@l=<>);print$l[rand@l]

-- 
Stephen
 --- 
"If 8-year-old boys discharging loaded firearms into their own legs
isn't necessary to the maintenance of a well-regulated militia, I
don't know what is." - Randal Cummings as reported in The Onion, 25/5/99

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe