> 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;
> }
>
> Is there a way to do this?
> I know I must be missing something obvious , thanks for any guidance!

Without more comments or sample data, I'm not really sure what your function
is doing, but here are some things to try:

sub rmgtlt {
    $_[0] =~ s/^\<|\>$|\n|\r|\s$//g;
}

sub rmgtlt {
    return $_[0] =~ s/^\<|\>$|\n|\r|\s$//g;
}

sub rmgtlt {
    return ($tmp = $_[0]) =~ s/^\<|\>$|\n|\r|\s$//g;
}



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to