Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm using autodie so this seemed reasonable:
open my $pipe, $cmds;
But perl warns: Parentheses missing around "my" list at ...

It works but it warns and I know why. All of the following work too and silence the warning:

open (my  $pipe,  $cmds);
open  my ($pipe), $cmds;
open  my  $pipe, ($cmds);
  1. seems most correct.
  2. also seems correctish.
  3. what is going on here?

Replies are listed 'Best First'.
Re: parentheses missing in action
by Corion (Patriarch) on Apr 28, 2026 at 18:54 UTC