dfog has asked for the wisdom of the Perl Monks concerning the following question:
required.cgi#!perl -w use strict; $| = 1; my $TestVar = "Test"; require ("required.cgi"); my $Message = &TestPrint (0); print "Output Message : $Message\n";
#!perl -w use strict; sub TestPrint { #--- Variables Needed ---# my ($Received) = $_[0]; my $OutputMessage = ""; my ($Test2Var) = $main::TestVar; print "Test Var $Test2Var\n"; $OutputMessage .= "TestVar : $main::TestVar, "; $OutputMessage .= "Received : $Received"; return $OutputMessage; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scope of variables using strict
by japhy (Canon) on Mar 22, 2001 at 23:47 UTC | |
by dfog (Scribe) on Mar 23, 2001 at 00:05 UTC | |
|
Re: Scope of variables using strict
by btrott (Parson) on Mar 22, 2001 at 23:45 UTC |