Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Help needed understanding global variables in Perl

by shotgunefx (Parson)
on Mar 05, 2002 at 13:28 UTC ( #149358=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Help needed understanding global variables in Perl
in thread Help needed understanding global variables in Perl

Are punctuation variables truly global or are they forced to be in main:: when unqualified?

-Lee

"To be civilized is to deny one's nature."


Comment on Re: Re: Re: Help needed understanding global variables in Perl
Replies are listed 'Best First'.
Re: Re: Re: Re: Help needed understanding global variables in Perl
by Juerd (Abbot) on Mar 05, 2002 at 14:12 UTC
    They are forced into main::, but they are global. You can abuse this by starting your string with a control character: ${^Foo} is also forced into main::. (it's actually ${"\cFoo"})

    ++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
    Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
    -- vs lbh hfrq OFQ pnrfne ;)
        - Whreq
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://149358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2016-02-07 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (256 votes), past polls