> > 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;
> }

All three of those returns the number of matches like what I tried!
I also tried 
return ($_[0] =~ s/^\<|\>$|\n|\r|\s$//g); 
Same thing.

Thanks for all the replies! Any other ideas?

Dan

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

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

Reply via email to