Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there a practical way of doing this? Anyway to do it without even having to pass the $comm to the subroutines?package Common; { my $username,$sessionid; } ### #set their values in the main code $comm=new Common; $comm->$username=user; $comm->$sessionid=1234; subone($comm); #in subroutines i could call subone { print "$comm->$username"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Persistent Variable
by Fastolfe (Vicar) on Jan 15, 2001 at 22:24 UTC | |
by Anonymous Monk on Jan 15, 2001 at 22:35 UTC | |
by Fastolfe (Vicar) on Jan 15, 2001 at 23:17 UTC | |
|
Re: Persistent Variable
by Adam (Vicar) on Jan 15, 2001 at 22:42 UTC | |
by Anonymous Monk on Jan 15, 2001 at 22:45 UTC | |
by Adam (Vicar) on Jan 16, 2001 at 03:30 UTC | |
|
Re: Persistent Variable
by InterGuru (Sexton) on Jan 15, 2001 at 23:58 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |