on Mon, 27 May 2002 12:57:20 GMT, [EMAIL PROTECTED] (Heiko Heggen) wrote:
> $mystring = "hello this is a string ";
> $chop($mystring);
>
> the chop command is what you are looking for I think.
> Just try it out.
No it isn't. From 'perldoc -f chop':
chop Chops off the last character of a string and
returns the character chopped.
And you don't want a '$' in front of 'chop'.
(Why didn't you try it out yourself if you were not sure ;-)
Sudarsan Raghavan already provided the correct solution (s/\s+$//).
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]