Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

(jeffa - data hiding) Re: Re: Re: Stupid question

by jeffa (Bishop)
on Dec 07, 2000 at 02:51 UTC ( [id://45374]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Stupid question
in thread Stupid question

I personally think that 'main' variables, while able to be accessed by subroutines declared in the same package, are safe enough, as long as you don't access them directly in a subroutine.
use strict; my $foo = 'yo'; &bar($foo); print "$foo\n"; sub bar { my $bar = shift; $bar .= ' dude'; }
Declare you variables in main, just don't use them directly in your subroutines and you'll be okay.

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-26 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found