my $foo = 'foofoofoo'; print map {s/foo/bar/g; $_} ($foo); [download]
-Mark
In reply to Re: Non-destructive string substitution by kvale in thread Non-destructive string substitution by Sprad