in reply to Re: Re: Complex Data Structures 2
in thread Complex Data Structures 2
So, you want to create a new global variable %hello because some input said "hello", right?
That's what I'm questioning the wisdom of, since it's a manditory response and I was the first to answer.
If you really want to do it, use symbolic references. to wit:
You can read more about that in the perlref man page that came with Perl. I suggest you play around with it a little beore using it in the real program.no strict refs; $x= "hello"; $$x{bar}= "foo"; print $hello{bar}; # yup, it's there.
—John
|
|---|