mahbubur has asked for the wisdom of the Perl Monks concerning the following question:
when I print this from inside the script it works fine but when I pass this array to a subroutine it doesn't print anything. This is the code I am using to print:push @AoH, { email => $email, reason => $reason, std_reason => $std_re +ason };
The subroutine I am calling is Bounce(@AoH) which is in a .pm file and here is how I am initializing it:my $href = ""; my $role = ""; for $href ( @AoH ) { print "{ "; for $role ( keys % +$href ) { print "$role= +$href->{$role} "; } print "}\n"; }
not sure what I am doing wrong, there is no error either.sub Bounce($) { my @AoH = @_; <rest are same as above>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array of Hashes
by trizen (Hermit) on Apr 19, 2012 at 15:37 UTC | |
|
Re: Array of Hashes
by stevieb (Canon) on Apr 19, 2012 at 16:41 UTC |