Re: proper referencing of hashes returned by fetchrow_hashref . . .

2003-06-24 Thread Richard Schilling
Thanks, folks! I'll save these messages forever. Oddly enough, it's hard to find a manual entry that explains all the answers I got in that much detail. Possible, mind you, but hard . . . --Richard On 2003.06.24 21:08 b wrote: Richard, This is the way I think of it. And you can extend this

Re: proper referencing of hashes returned by fetchrow_hashref . . .

2003-06-24 Thread b
Richard, This is the way I think of it. And you can extend this logic to all your dereferencing needs. Forgive me if I tell you things you already know. A scalar is one "thing". ${} An array is many things stacked together, one after the other. @{} A hash is a set of named things %{}. So I want

Re: proper referencing of hashes returned by fetchrow_hashref . ..(typo)

2003-06-24 Thread Patrick Galbraith
> Now, with hash references, you can do it two ways. $foo{whatever} is the > same as $foo->{whatever} I meant $$foo{whatever} is the same as $foo->{whatever} ;) Patrick Galbraith wrote: that's called a reference in perl $foo = 'hu'; if I want to pass that as a reference to a subroutine (much

Re: proper referencing of hashes returned by fetchrow_hashref . ..

2003-06-24 Thread Patrick Galbraith
that's called a reference in perl $foo = 'hu'; if I want to pass that as a reference to a subroutine (much better way to do things than by value) I would do this: speak(\$foo); sub speak { my ($foo) = @_; # this is by reference "$$" print $$foo . "\n"; # als

proper referencing of hashes returned by fetchrow_hashref . . .

2003-06-24 Thread Richard Schilling
Just a quick question, and perhaps it's a Perl language question. I forget, but why do you have to reference a hash with a double "$$" when you use fetchrow_hashref? [- use DBI; # code to open connection, run query, etc . . . -] [$ if $hashed_row = $query