[EMAIL PROTECTED] wrote:
>
> Can someone please explain why this
>
> while (1) {
>my $item = ;
>chomp $item;
>last unless $item;
You should use a different test then true or false for $item
last unless length $item;
>$inventory{1c
Madison Daily <[EMAIL PROTECTED]> wrote:
: Can someone please explain why this
:
: while (1) {
:my $item = ;
:chomp $item;
:last unless $item;
:$inventory{1c $item}++;
: }
:
:
: Gets Bare word found where operator expected
: Syntax error line 13
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
K Old said:
> On Thu, 2003-09-04 at 12:24, [EMAIL PROTECTED] wrote:
>> Can someone please explain why this
>>
>> while (1) {
>>my $item = ;
>>chomp $item;
>>last unless $item;
>>$inventory{1c $item}++;
>> }
>
> You probably wanted:
>
> $inventory{'1
On Thu, 2003-09-04 at 12:24, [EMAIL PROTECTED] wrote:
> Can someone please explain why this
>
> while (1) {
>my $item = ;
>chomp $item;
>last unless $item;
>$inventory{1c $item}++;
> }
You probably wanted:
$inventory{'1c'}++;
or
$inventory{$item}+
Can someone please explain why this
while (1) {
my $item = ;
chomp $item;
last unless $item;
$inventory{1c $item}++;
}
Gets Bare word found where operator expected
Syntax error line 13 near 1c
thanks
Madison Daily
Weldon, Williams & Lick, Inc.
(479