simple question on perl
Daniel R . Kilbourne
drk@voyager.net
Fri, 1 Sep 2000 15:02:35 -0400
doesnt work...al that does is remove the last character....
On Fri, Sep 01, 2000 at 02:58:12PM -0400, Dpk spake:
> On Fri, Sep 01, 2000 at 02:54:46PM -0400, Daniel R . Kilbourne wrote:
>
> Call me a perl idiot, but how do I remove the last character from a string?
>
> I will need to pull the last character from a line such as:
>
> 3.3219333333e+02 (I need to get the 2 in this case)
>
> the string will always be of constant length.
>
> Anyone?
>
> The easiest way:
>
> chop("line");
>
> or
>
> chop($variable);
>
> dpk
--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Daniel R. Kilbourne
daniel.kilbourne@voyager.net
Voyager.net Network Engineer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^