The stupid question is the question not asked | |
PerlMonks |
Re: replacing close-single-quote with apostropheby choroba (Cardinal) |
on Nov 07, 2021 at 21:28 UTC ( [id://11138557]=note: 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 Section
Seekers of Perl Wisdom
|
|