CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1689
content-type: text/html; charset=utf-8
last-modified: Sat, 11 Oct 2025 15:52:05 GMT
traceparent: 65544d397395753c468dbd0ec5fc7d48
strict-transport-security: max-age=15768000
Re: FW: Alarums and Excursions (was [perl #2783] Security of ARGVusing 2-argument open) - nntp.perl.org
Front page | perl.perl5.porters |
Postings from July 2008
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: FW: Alarums and Excursions (was [perl #2783] Security of ARGVusing 2-argument open)
Thread PreviousFrom:
Aristotle PagaltzisDate:
July 28, 2008 13:56Subject:
Re: FW: Alarums and Excursions (was [perl #2783] Security of ARGVusing 2-argument open)Message ID:
20080728205651.GC9326@klangraum.plasmasturm.org* Ed Avis <eda@waniasset.com> [2008-07-28 19:00]: > Rafael Garcia-Suarez wrote: >> We can add a simple way to restore the old behaviour, though : >> a command-line flag (-N and -P were suggested as counterparts >> to -n and -p. -P was conveniently made free previously:) > > I don't think it matters much if -n and -p continue being the > magical file loop as at present. For quick oneliners you often > want the extra power, and don't really care about whether it's > safe in general. OTOH when writing one-liners you are usually closest to the shell with its process substitution feature, so unless you are on Windows that’s when the feature provided by 2-arg open matters least. It’s more useful when the diamond is used deep inside a program (perhaps with `local *ARGV = [ @api_client_input_goes_here ]`), and is documented as API, since that’s when you can’t easily do process substitution in another way. (It’s *possible*, even if the function expects a filename and uses 3-arg open: you can pass it a reference to a tied scalar as the filename. Yes, very pretty.) Regards, -- Aristotle Pagaltzis // <https://plasmasturm.org/>Thread Previous
- FW: Alarums and Excursions (was [perl #2783] Security of ARGV using 2-argument open) by Ed Avis
- Re: FW: Alarums and Excursions (was [perl #2783] Security of ARGVusing 2-argument open) by Aristotle Pagaltzis
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About