CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
replace text with en dash

 



tej.87g
Novice

Jun 30, 2010, 8:04 PM

Post #1 of 3 (434 views)
replace text with en dash Can't Post

Hi..

Crazy

i have a file in which i want to replace certain tags with en dash. Can anybody please tell me how to add en dash using perl?..

Thank you..


(This post was edited by tej.87g on Jun 30, 2010, 8:06 PM)


shawnhcorey
Enthusiast


Jul 1, 2010, 7:20 AM

Post #2 of 3 (419 views)
Re: [tej.87g] replace text with en dash [In reply to] Can't Post


Code
my $en_dash = "\x{2013}";


You may also want to change your output file handle to UTF-8:

Code
binmode *STDOUT, ':encoding(utf8)';


See `perldoc -f binmode` for details.

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".


tej.87g
Novice

Jul 1, 2010, 6:49 PM

Post #3 of 3 (408 views)
Re: [shawnhcorey] replace text with en dash [In reply to] Can't Post

Thank you so much...

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives