Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

parentheses missing in action

by Anonymous Monk
on Apr 28, 2026 at 18:15 UTC ( [id://11167649]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11167649]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2026-05-12 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.