Greetings,
I don't know what the proper terminology is for what I want to do, so if somebody can tell me what it is, that would be great.
Basically I have my core code, then lots of subroutines. Right now I pass data to subroutines via a "parameter" hash. How can I pass an object that was created in the core code?
To put what Im thinking into code somewhat:
use CGI;
my $q = new CGI;
my %param_hash = ( cgi => $q, );
some_sub(\%param_hash);
sub some_sub { my $params = shift;
my $q = $params->{cgi}; }
The above is just a basic example of what im looking to do. Im only looking for the terminology for what this is called, but any code pointers is great too!
Thanks
The terminology as the other poster said is "Pass by Reference" specifically, in general you want more info on references themselves as they have much larger uses besides just "Pass by reference", see:
perldoc perlreftut perldoc perlref perldoc perllol perldoc perldsc
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>