Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: String extraction

by suaveant (Parson)
on Aug 30, 2007 at 18:20 UTC ( [id://636162]=note: print w/replies, xml ) Need Help??


in reply to String extraction

substr
my $chr = substr($str,0,1);
ord will do it, too, but returns the ascii value of the first char of the string.

                - Ant
                - Some of my best work - (1 2 3)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-16 23:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found