develooper Front page | perl.fwp | Postings from December 2001

Re: Daily Perl FAQ - How do I select a random line from a file? (fwd)

Thread Previous | Thread Next
From:
Philip Newton
Date:
December 2, 2001 03:11
Subject:
Re: Daily Perl FAQ - How do I select a random line from a file? (fwd)
Message ID:
ci1k0u84bb21klem9f1gjb9bvhh55ob21k@4ax.com
On Thu, 29 Nov 2001 11:51:40 -0500, schwern@pobox.com (Michael G Schwern) wrote:

> On Thu, Nov 29, 2001 at 06:36:06AM +0100, Philip Newton wrote:
> > Obi-Wan error in there? I think you need rand(@arr), or you're never
> > going to get the last element (since rand($#arr) always is < $#arr).
> 
> I'm trying to put together Obi-Wan and off-by-one together somehow...

Similar pronunciation, as far as I'm concerned.

See http://www.tuxedo.org/~esr/jargon/html/entry/obi-wan-error.html .

Cheers,
Philip

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About