Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Removing the first character from a variable

by Elgon (Curate)
on Jun 09, 2001 at 08:21 UTC ( #87142=note: print w/ replies, xml ) Need Help??


in reply to Re: Removing the first character from a variable
in thread Removing the first character from a variable

I was thinking to chop off the first character...

$id=~s/^(.)//;

and if you want to save it afterwards...

$chopped_character = $1;

NB: Regexps are not my strongest point, so post a reply if I am talking crap, preferably with an explanation of why!

"Violence is the first resort of those faced with yet another BSOD."
--/me


Comment on Re: Re: Removing the first character from a variable
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (14)
As of 2015-07-31 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls