Oh god. I'm digging through what might be on the order of.a hundred thousand lines of perl code on a system. The file that snippet came from is over ten thousand lines long. My brain is about to implode. Thanks.
-----Original message----- From: Ben Tilly <[email protected]> To: Greg London <[email protected]> Cc: [email protected] Sent: Tue, Sep 28, 2010 00:29:52 GMT+00:00 Subject: Re: [Boston.pm] $#{$Queue} Check perlvar. It is the index of the last array element, which is one less than the size. @$Queue will give you the size in scalar context. On Mon, Sep 27, 2010 at 5:28 PM, Greg London <[email protected]> wrote: > > > what the heck? > > my $Queue = \...@somearray; > > if ($#{$Queue} <= -1){ > # do something > } > > I thought $# was size, > but the code is checking for it to be minus one? > > -- > > > > _______________________________________________ > Boston-pm mailing list > [email protected] > http://mail.pm.org/mailman/listinfo/boston-pm > _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

