--- Nic LAWRENCE <[EMAIL PROTECTED]> wrote:
> Is it possible to pass hashes between subroutines? When I try stuff
> like &foo(%bar); or return %bar; it doesn't seem to work how I would
> expect.
That will flatten the whole hash out to a list. You could receive it
like this:
sub foo {
my
On Sun, 3 Jun 2001, Nic LAWRENCE wrote:
> Is it possible to pass hashes between subroutines? When I try stuff like
> &foo(%bar); or return %bar; it doesn't seem to work how I would expect.
> :-/
You need to pass by reference. Read perlref for details, but try this.
Use "&foo(\%bar)" or "return
$bar->{'key'} or could be a variable
$bar->{$mykey}
Wags ;)
-Original Message-
From: Nic LAWRENCE [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 03, 2001 14:27
To: [EMAIL PROTECTED]
Subject: passing hashes between subroutines
Is it possible to pass hashes
Is it possible to pass hashes between subroutines? When I try stuff like
&foo(%bar); or return %bar; it doesn't seem to work how I would expect.
:-/
Nic LAWRENCE <[EMAIL PROTECTED]> Technical Director
TFBnet Internet Services http://www.niclawrence.co.uk
eFax US: +1 (253)295-8297 eFax UK: +44