> >eg: > >use strict; >my $var = 20; > >print "$var\n"; >&routine; >exit; > > >sub routine { > print "$var\n"; >} >
Hi,you can do it by passing the vars to the subroutine like: my $var = 20; &routine($var); sub routine { my $var = shift; print $var; } -- Books below translated by me to Chinese. Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>