Closed p5pRT closed 20 years ago
When I run this program:
my @bar{1\,2\,3} = (1\,2\,3); my @foo{map $_\,1\,2\,3} = (1\,2\,3);
I get the output:
Can't declare hash slice in my at foo.pl line 1\, near "} =" Can't use global $_ in "my" at foo.pl line 2.
I think the error reported on line 2 is confusing. I expect to see the same error on line 2 as on line 1\, since both lines are erroneously trying to declare a hash slice with "my".
Migrated from rt.perl.org#896 (status was 'resolved')
Searchable as RT896$