<?xml version="1.0" encoding="windows-1252"?>
<node id="87142" title="Re: Re: Removing the first character from a variable" created="2001-06-09 04:21:28" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="37222">
Elgon</author>
<data>
<field name="doctext">
&lt;p&gt;I was thinking to chop off the first character...

&lt;p&gt;&lt;code&gt;
$id=~s/^(.)//;
&lt;/code&gt;

&lt;p&gt;and if you want to save it afterwards...
&lt;p&gt;&lt;code&gt;$chopped_character = $1;
&lt;/code&gt;

&lt;p&gt;NB: Regexps are not my strongest point, so post a reply if I am talking crap, preferably with an explanation of why!

&lt;p&gt;"Violence is the first resort of those faced with yet another BSOD."
&lt;br&gt;--/me</field>
<field name="root_node">
87077</field>
<field name="parent_node">
87083</field>
</data>
</node>
