Dear Users

is there a possibility to use "use strict" and to define variables in
the programm, which are also seen in the subroutines called from this
block? I want the same value in the var in the subroutine like before,
but without it to define as global. What could I do?

Thanks for all ideas and help.
Greetings Raphael

eg:

use strict;
my $var = 20;

print "$var\n";
&routine;
exit;


sub routine {
        print "$var\n";
}



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to