in reply to Re^4: Optional quotes: to use or not to
in thread Optional quotes: to use or not to

Sorry, wrong example. (I'm intentionally leaving strict off here. Enabling it would spoil the fun.) Is your IDE smart enough to catch the difference?
#!/usr/bin/perl my %example; $example{foo} = say; print $example{foo}, "\n";
->> 'say'
#!/usr/bin/perl use 5.010; my %example; $example{foo} = say; print $example{foo}, "\n";
->> '1'

Replies are listed 'Best First'.
Re^6: Optional quotes: to use or not to
by hurricup (Pilgrim) on Jul 10, 2015 at 13:10 UTC

    Nope, it doesn't. It parses script with implicit strict and say in your example will be always a sub call.

    And, i've asked about exact two situations when perl (as far as I know) always treats bareword as a string.