in reply to Irregular Expression??

$n= $a=~ s/\46/\46\46/g; if ($n) { print "Had $n quotes, doubled them\n"; } else { print "No qoutes\n"; }

Update: it's 047, not 046.

Replies are listed 'Best First'.
Re: Re: Irregular Expression??
by Skeeve (Parson) on Feb 24, 2004 at 07:13 UTC
    You missed the \-part...
    $n= $a=~ s/\46/\\\46\\\46/g; # ^^ ^^ : :