Yeah, my guess is that open is looking at the the 'my' stuff in list context, that is, open takes 1, 2, 3 or more arguments and you can put an array var in the first position - so my is warning you that you've got an un-paren-ed list of vars because open's trying to get it to handle the rest of the list. "my" is a uni-valued function (so you need parens/list for multiple values). If you use the 3 element form (your example has the var names backwards or, misleading, anway) though:
open my $filehandle, ">", $file
or add the 'or die ... ' test
open my $filehandle, $file
or die "can't open $file: $!";
(both recommended best practices for "open") you don't get the complaint.
Yeah, not really the clear-cut answer you were looking for though ... hmm, may just be a parser corner case:
$ perl -e 'use warnings; use strict; my $filename = "/tmp/hey"; open m
+y $file, $filename'
$ perl -e 'use warnings; use strict; my $filename = "/tmp/hey"; open m
+y $file, $filename;'
Parentheses missing around "my" list at -e line 1.
only diff is the final semicolon before the close quote