I have this subroutine and it does what I need :: print rmgtlt($var);
sub rmgtlt { $_[0] =~ s/^\<|\>$|\n|\r|\s$//g; return $_[0]; } Is there a way to so the substitution and return the result in one line? Like :: sub rmgtlt { return ??? $_[0] =~ s/^\<|\>$|\n|\r|\s$//g; } I tried using parenthesis and using list context :: return my($q) = $_[0] =~ s/(^\<|\>$|\n|\r|\s$)//g; } And you might have figured it returned the number of elements matched and not the newly fixed up variable contentes. Is there a way to do this? I know I must be missing something obvious , thanks for any guidance! Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]