in reply to Stripping characters from strings
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
- Comment on Re: Stripping characters from strings
- Download Code