in reply to Re: Re: Complex Data Structures 2
in thread Complex Data Structures 2

Look at the preview window before you post. Your square brackets are being eaten and turned into links! Or put <code> around things.

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:

no strict refs; $x= "hello"; $$x{bar}= "foo"; print $hello{bar}; # yup, it's there.
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.

—John