my $foo="foo"; my $bar=substr($foo, -1, 1, ''); print "Foo: $foo\tBar: $bar\n"; # or substr($foo,-1)=''; print "Foo: $foo\n";