diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-05-01 04:10:28 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-05-01 04:10:28 +0000 |
commit | 6ecfc29d5a0d124e6e6ffb770d1f00e249928746 (patch) | |
tree | 2ac3bc65a0158f031ce739cd76f3383b1ce84922 /lib/open3.pl | |
parent | 01d0d956947d0fae590145ef30d50b879af36b0e (diff) | |
download | perl-6ecfc29d5a0d124e6e6ffb770d1f00e249928746.tar.gz |
Eliminate use of $& to avoid runtime penalty
Diffstat (limited to 'lib/open3.pl')
-rw-r--r-- | lib/open3.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/open3.pl b/lib/open3.pl index 7c8b6ae288..03e151c2d6 100644 --- a/lib/open3.pl +++ b/lib/open3.pl @@ -46,9 +46,9 @@ sub main'open3 { # force unqualified filehandles into callers' package local($package) = caller; - $dad_wtr =~ s/^[^']+$/$package'$&/; - $dad_rdr =~ s/^[^']+$/$package'$&/; - $dad_err =~ s/^[^']+$/$package'$&/; + $dad_wtr =~ s/^([^']+$)/$package'$1/; + $dad_rdr =~ s/^([^']+$)/$package'$1/; + $dad_err =~ s/^([^']+$)/$package'$1/; local($kid_rdr) = ++$fh; local($kid_wtr) = ++$fh; |