I have some misunderstanding.
The next code has the same behaviour.
But I was thinking differently...
#!/usr/bin/perl
use strict;
print "TEST3 start...\n";
my @code;
push @code, "01";
push @code, "02";
push @code, "03";
for (1..2) { test_val($_) }
sub test_val {
my $p = shift;
print "test_v
Hello,
I'm just maintain this odd script.
On the code;
foreach my $val (@{$$code{"1"}}) {
I think $val is lexical but in the 2nd call of test_val
the data is changed.
I don't want it.
I must code like;
my $val2 = $val;
$val2 =~ s/^0+//;
to avoid the changing.
I cann't understand why?
#