summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2014-07-24 17:43:29 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2014-09-30 08:17:50 +0200
commit157fb5a14d10ed16ffc6ebfc43d2637a016fdfce (patch)
treeb2410287e269d41f3295678586e62ce4fa459188 /pp_sys.c
parentf276fdad8f6660f36944c895587a7748585e4969 (diff)
downloadperl-157fb5a14d10ed16ffc6ebfc43d2637a016fdfce.tar.gz
Introduce the double-diamond operator <<>>
This operator works like <> or <ARGV>, as it reads the list of file names to open from the command-line arguments. However, it disables the magic-open feature (that forks to execute piped commands) : $ bleadperl -e 'while(<>){print}' 'echo foo |' foo $ bleadperl -e 'while(<<>>){print}' 'echo foo |' Can't open echo foo |: No such file or directory at -e line 1.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 014ec425e5..95a709b0e4 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2124,7 +2124,7 @@ PP(pp_eof)
GvSV(gv) = newSVpvs("-");
SvSETMAGIC(GvSV(gv));
}
- else if (!nextargv(gv))
+ else if (!nextargv(gv, FALSE))
RETPUSHYES;
}
}