in reply to s/// operator and undef question...

I could only duplicate your results with adding /g to the first regex. I have no frickin' clue how the substitution works. Incidentally, the following is a no-op:
for ($target =~ /is/g) { s//are/; }
But if I take of the /g switch:
for ($target =~ /is/) { s//are/; }
I get the following error message:
Modification of a read-only value attempted at eval.pl line 6.
This is beginning to look like a bug to me.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.