in reply to Parentheses missing around "my" list
f g EXPR, EXPR
is the same as
f(g(EXPR, EXPR))
my is very special in the sense that it won't gobble arguments that wouldn't be valid for it, which is why adding the quotes help.
This resolves the ambiguity:
open my ($file), $filename
This is probably what you actually want:
open my $file, '<', $filename
|
|---|