Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Three argument version of open '>-' (updated)

by jcb (Parson)
on Mar 02, 2021 at 02:41 UTC ( [id://11128979] : note . print w/replies, xml ) Need Help??

in reply to Re: Three argument version of open '>-' (de-critic)
in thread Three argument version of open '>-' (updated)

Seconding this: Perl::Critic is simply wrong here. The primary risk of two-argument open is the possibility of a "strange" filename improperly triggering the magic (How about a "file" named 'rm -rf / |'?), but in this case the filename is a literal constant and that is not possible.

This is a bug in Perl::Critic — your particular use of the two-argument syntax is fine.