farang has asked for the wisdom of the Perl Monks concerning the following question:
Greetings monks, new Perl hacker here, about three weeks into the journey, having fun and figuring out the lay of the land.
Alright, so perldoc -f say tells me this:
This keyword is available only when the "say" feature is enabled; see feature. Alternately, include a "use v5.10" or later to the current scope.
This leads me to believe the following code shouldn't work.
use strict; use warnings; say STDOUT 'like a charm';
Yet with an explicit filehandle, it does work (tested on v5.16 and v5.14). The question in this case is: why does the code work?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unexpected behavior of function 'say'
by tobyink (Canon) on Mar 05, 2013 at 15:22 UTC | |
|
Re: Unexpected behavior of function 'say'
by toolic (Bishop) on Mar 05, 2013 at 15:21 UTC | |
|
Re: Unexpected behavior of function 'say'
by LanX (Saint) on Mar 05, 2013 at 15:24 UTC | |
by tobyink (Canon) on Mar 05, 2013 at 15:32 UTC | |
by LanX (Saint) on Mar 05, 2013 at 15:48 UTC | |
by ikegami (Patriarch) on Mar 06, 2013 at 04:55 UTC |