![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
'main' can be a hash ref, or an array, or whatever -- differentiated by the character in front and what's been put in there (I'm a little shaky on the Perl internals). The code that you had, in order to print '1' needed to have a '$' in front of the 'main' in the first line. Now, if you:
Then you get a 'bareword' error without the '$' and you get a 'undefined' error with the '$' -- all as expected.
-- Wade In reply to Re: what does main->{x} = 1 do?
by wade
|
|