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]
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