[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: good perl list?



On Mon, 23 Aug 1999, Micah Yoder wrote:

> Aaron Turner wrote:
> 
> > Unless of course someone here knows how to create a sub with a hash and
> > scalar as arguments:
> > 
> > $return = &sub_command(%hash, $scalar);
> 
> References!!!

Do you have any idea how many hours I tried getting it working with
references?  Seriously, though just isn't working for me :-)  Worry about
that later though.

> > foreach my $keys (sort keys %hash) {
> >   print "$hash{$keys}";
> > }
> > 
> > generates a bogus result.  Basically I have 3 values for $keys: 0, 1 , 2.
> > 
> > But I get: '1', '2', '3', ' '.
> 
> What the....   more code???

I figured it out.

($ID, $hash{$ID}) = @$row;

Oops :)