in reply to Re: map question
in thread map question
But I must add that I realized that wouldn't work even before I tried testing it, coz $_ in the regexp is no longer the one I expected.my $str = 'test number X'; my @numbers = (2, 3, 4); @newArray = map { ($_ = $str) =~ s/X/$_/ } @numbers;
|
|---|