in reply to Re^2: use constant module (was moudle)
in thread use constant module

Sorry but you're wrong, look closely:

$ perl -we 'use constant WD => qw{Sun Mon}; print (WD)[1]' print (...) interpreted as function at -e line 1. syntax error at -e line 1, near ")[" Execution of -e aborted due to compilation errors. $ perl -we 'use constant WD => qw{Sun Mon}; print (WD)[1]' syntax error at -e line 1, near ")[" Execution of -e aborted due to compilation errors.

Replies are listed 'Best First'.
Re^4: use constant module (was moudle)
by kcott (Archbishop) on Feb 24, 2016 at 12:42 UTC

    That's very strange and unexpected behaviour. I've investigated this further and updated my post with the results.

    — Ken