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 <em...@greglondon.com> 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 > Boston-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/boston-pm > _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm