Just operate on $_[0] directly, as it aliases the parameter.
#define the sub sub strip_space { # remove whitespace and retrn true on success $_[0] =~ s/\s+//g; return 1; }
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re: get a reference implicitly within a subroutine call?
by xdg
in thread get a reference implicitly within a subroutine call?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |