Re: removing spaces from the end of a string WITHOUT a REGEX

2001-08-30 Thread Edwin Günthner
Why not using chomp instead? from perlfunc: "This safer version of chop removes any trailing string that corresponds to the current value of $/ ..." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: removing spaces from the end of a string WITHOUT a REGEX

2001-08-30 Thread John Edwards
Well, I think a regex is your best bet. --- $data = 'This is a very long string '; $data =~ s/\s+$//; --- That will trim all trailing spaces. Without a regex you could try something like --- $data = 'This is a very long string '; do { $_ = $data; $test = chop; cho