New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser confused in block form of map with quote operators #905
Comments
From m.pearce@inpharmatica.co.uk[martyn]$ perl -ce 'map {qr"$x",1} @x' As shown, map seems to get confused by quotes & quotelikes with a list This is also true of 5.005_62 . Perl Info
|
From @ysthIn article <199912010856.IAA09792@kingsbury.inpharmatica.co.uk>,
The error is given when these are parsed as map EXPR not map BLOCK Whenever you need a map {... , ...} to be unambiguously a BLOCK, This leaves unanswered the question of why the different quote ops Also, map EXPR LIST (missing the comma) could give a more helpful error |
From @TimToadysthoenna@efn.org writes: Probably because qw and qr didn't exist when the {"a",1} dwimmer was written. {qw(a 1)} to mean { a => 1 } but this dwimmer wouldn't pick that up anyway, since it's looking for : Also, map EXPR LIST (missing the comma) could give a more helpful error Yes, it could, but not easily. A yacc is an unruly beast. Larry |
Migrated from rt.perl.org#1840 (status was 'resolved')
Searchable as RT1840$
The text was updated successfully, but these errors were encountered: