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

Mine does. Braced time is a string and other time is a sub. And even:

grep {time} @somearray;
Understood right and time is a sub.

Replies are listed 'Best First'.
Re^5: Optional quotes: to use or not to
by Monk::Thomas (Friar) on Jul 10, 2015 at 12:25 UTC
    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'

      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.