CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [spuds] Manipulating a Hash with keys that have more than one value: Edit Log



Karazam
User

Mar 20, 2011, 3:10 PM


Views: 6208
Re: [spuds] Manipulating a Hash with keys that have more than one value


Quote
Any ideas on why my $aref is automatically set to 1 the first time

No, that's strange. But if you still get the "Can't use string ("1") as an ARRAY ref" message,
my guess is that there's still some problem with passing references.

About the hash content... It looks weird, doesn't it? There's one value in $VAR1,
which is then repeated in $VAR2 together with another value in the same array element,
and with a linebreak after it? And why the hash sign?
Looks like it's been created this way:


Code
$rules{"cRule-test"} = [ "# cRule-test rulenumber=8\n", "8" ];


Maybe you need to look at how you populate the hash.


(This post was edited by Karazam on Mar 20, 2011, 3:11 PM)


Edit Log:
Post edited by Karazam (User) on Mar 20, 2011, 3:11 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives