Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You can use the \x notation in a regex:
If you want to use it in a one-liner, you need to be careful about quoting. In bash, for example, you need to write
or use the \x for the single quote, as well:
Alternatively, if you want to use "smart quote" directly: use utf8; open my $in, '<:encoding(UTF-8)', 'file' or die $!; while (<$in>) { s/’/'/g; print; }
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In reply to Re: replacing close-single-quote with apostrophe
by choroba
|
|