simple question on perl

Dpk dpk@egr.msu.edu
Fri, 1 Sep 2000 14:58:12 -0400


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