simple question on perl
Dpk
dpk@egr.msu.edu
Fri, 1 Sep 2000 15:00:14 -0400
On Fri, Sep 01, 2000 at 02:57:06PM -0400, Adam McDougall wrote:
chop or chomp?
chomp *only* removes the trailing character if it is a newline and is
a good/safe replacement for chop in the case removing a carriage
return.
chop removes the last character regardless of what it is.
dpk
On Fri, 1 Sep 2000, 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?
>
> ___
> Dan
> _______________________________________________