------------------------------------------------
On Thu, 4 Sep 2003 18:46:48 +0200 (CEST), "Paul Johnson" <[EMAIL PROTECTED]> wrote:
>
> K Old said:
> > On Thu, 2003-09-04 at 12:24, [EMAIL PROTECTED] wrote:
> >> Can someone please explain why this
> >>
> >> while (1) {
> >> my $item = <STDIN>;
> >> chomp $item;
> >> last unless $item;
> >> $inventory{1c $item}++;
> >> }
> >
> > You probably wanted:
> >
> > $inventory{'1c'}++;
> > or
> > $inventory{$item}++;
>
> or more likely:
>
> $inventory{lc $item}++;
>
> That is the letter L rather than the number ONE.
>
> lc for lowercase.
>
Or:
$inventory{'1c ' . $item}++;
or
$inventory{"1c $item"}++;
or
$| = 1;
Oh wait, probably not that last....
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]