Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Say String

by thundergnat (Deacon)
on Apr 09, 2008 at 16:54 UTC ( [id://679299]=note: print w/replies, xml ) Need Help??


in reply to Say String

Maybe you are thinking of the charnames pragma?

#!/usr/bin/perl use warnings; use strict; use charnames(); my $string = 'Lo1'; print string_to_text($string); sub string_to_text{ my @chars; push @chars, charnames::viacode(ord($_)) for split //, $_[0]; return join ', ', @chars; }

Yields...

LATIN CAPITAL LETTER L, LATIN SMALL LETTER O, DIGIT ONE

Replies are listed 'Best First'.
Re^2: Say String
by Odud (Pilgrim) on Apr 09, 2008 at 19:33 UTC
    Also looks good - I'll try both and see which will be easier for a non-specialist user to understand.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://679299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found