diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-05-01 04:10:19 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-05-01 04:10:19 +0000 |
commit | 5428dc403a489224dbeaeeb5a897d8844b0849f8 (patch) | |
tree | 7a8a56fddc13e74417621d54edbc65dd3a033bfb /lib/IPC/Open2.pm | |
parent | 88e49c4edb2a787ae2511fc161f64df90409dd17 (diff) | |
download | perl-5428dc403a489224dbeaeeb5a897d8844b0849f8.tar.gz |
Eliminate $& to avoid runtime penalty
Diffstat (limited to 'lib/IPC/Open2.pm')
-rw-r--r-- | lib/IPC/Open2.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IPC/Open2.pm b/lib/IPC/Open2.pm index 243412ef09..62ec69b335 100644 --- a/lib/IPC/Open2.pm +++ b/lib/IPC/Open2.pm @@ -80,8 +80,8 @@ sub open2 { # force unqualified filehandles into callers' package local($package) = caller; - $dad_rdr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr; - $dad_wtr =~ s/^[^']+$/$package'$&/ unless ref $dad_wtr; + $dad_rdr =~ s/^([^']+$)/$package'$1/ unless ref $dad_rdr; + $dad_wtr =~ s/^([^']+$)/$package'$1/ unless ref $dad_wtr; local($kid_rdr) = ++$fh; local($kid_wtr) = ++$fh; |