in reply to Stripping characters from strings

Also checkout substr. Setting the second argument to a negative number (-1) and the fourth (optional) argument to '' can achieve the same thing, or you can use it like an lvalue and assign a value to it.
my $foo="foo"; my $bar=substr($foo, -1, 1, ''); print "Foo: $foo\tBar: $bar\n"; # or substr($foo,-1)=''; print "Foo: $foo\n";
Results:
Foo: fo        Bar: o
Foo: f