in reply to Re: map question
in thread map question

I already started writing what I'v done and the answers stopped me in the middle, but here goes my old and wrong code:
my $str = 'test number X'; my @numbers = (2, 3, 4); @newArray = map { ($_ = $str) =~ s/X/$_/ } @numbers;
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.

Thanks.

Hotshot