
Zhris
Enthusiast
Dec 15, 2014, 12:59 PM
Post #3 of 3
(4652 views)
|
Re: [Iconx] What is this thing and why not strict?
[In reply to]
|
Can't Post
|
|
Hi, I can duplicate your problem if I supply Del_Home_Dir a single level hash: http://codepad.org/jKNIfBWZ
use strict; Del_Home_Dir ( one => 1, two => 2, ); sub Del_Home_Dir { print "Remove::Del_Home_Dir() sub \n"; my (%delete_acct) = (@_); my $tenv; DEL_ENV: foreach $tenv (sort keys %delete_acct) { DEL_PLATFORM: foreach my $tplatform (sort keys %{$delete_acct{$tenv}}) { print "TPLATFORM: $tplatform \n"; } } } In this case the error is because I am attempting to use a string i.e. '1' as a hash. Here is minimal code that replicates the error: http://codepad.org/0OVI28dS
use strict; my %hash = ( one => 1 ); print %{$hash{one}}; I don't know enough about your code / data, but Del_Home_Dir expects a hash of hash:
Del_Home_Dir ( one => { 1 => 'won', 2 => 'wand' }, two => { 1 => 'too', 2 => 'true' }, ); Regards, Chris
(This post was edited by Zhris on Dec 15, 2014, 1:33 PM)
|