I've been playing around with this bit, but can't quite seem to get the last part right.
$checkit = "tony!|bob&sue|me@me.com";
$checkit =~ tr/[A-Za-z0-9][ ][.][|]/\*/c;
I've got it matching all non-character, non-numeric (except for space, period and pipe).
I want to replace the non-items with a backslash and the non-item. (tony\!|bob\&sue|me\@me.com).
I can't seem to figure out what to use where the * is in the tr// bit. I tried $1 (and about 6 million other things) but that didn't work.
Any suggestions?
$checkit = "tony!|bob&sue|me@me.com";
$checkit =~ tr/[A-Za-z0-9][ ][.][|]/\*/c;
I've got it matching all non-character, non-numeric (except for space, period and pipe).
I want to replace the non-items with a backslash and the non-item. (tony\!|bob\&sue|me\@me.com).
I can't seem to figure out what to use where the * is in the tr// bit. I tried $1 (and about 6 million other things) but that didn't work.
Any suggestions?