sub doSomethingX { my $string = shift; $string =~ tr/foo/X/; return doSomething($string); } sub doSomethingY { my $string = shift; $string =~ tr/foo/Y/; return doSomething($string); } sub doSomething { my ($var) = shift; print $var; }
In reply to Re: Best way to handle small changes to subroutines
by Anonymous Monk
in thread Best way to handle small changes to subroutines
by code4pay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |