Hello,
when I try this example for aliases:
use warnings;
# use strict;
$foo = 26;
@foo = ("here's", "a", "list");
&testsub (*foo);
print ("The value of \$foo is now $foo\n");
sub testsub {
local (*printarray) = @_;
foreach $element ( @printarray) {
print ("$element\n");
}
$printarray = 61;
}
it gives the expected result.
But the perl's guru recommend to use, "use strict".
I can't make this script work with "use strict", always perl complains ?
Can someone explain to me why perl complains.
perldoc -f local -> perldoc perlsub
WARNING: In general, you should be using "my" instead of
"local", because it's faster and safer.
tia
--
Gérard
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>