On 2/18/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
(If I had a nickel for every time I've wished Perl had an s///-like function that returned a modified copy instead of modifying the original string in placeā¦)
This was the impetus behind my Sed[0] module: my $a = "Hello, world"; my $b = sed { s/l/0/g } $a; print "'$a' => '$b'"; Prints: 'Hello, world' => 'He00o, wor0d' *shrug* I needed it at the time (2001-ish, ISTR), and put it on CPAN so that I could find it again. [0]: http://search.cpan.org/dist/Sed/ -- (darren)