When did this form become valid? I used on my dev box (5.28) but on production (5.16) I get a syntax error and need to use
use constant {true=>1,false=>0}
| [reply] [Watch: Dir/Any] [d/l] |
Interestingly, it's a difference in Perl parser, not in constant. As usually, help the parser by telling it the { doesn't start a block, but a hash reference:
use constant +{ qw( true 1 false 0 ) };
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [Watch: Dir/Any] [d/l] [select] |
| [reply] [Watch: Dir/Any] [d/l] |