On Sunday 09 May 2010 14:30:06 Owen wrote:
> I have perl v5.10.0 on an up to date Ubuntu-9.04
> ====================perldoc -f say=============================
> say FILEHANDLE LIST
> say LIST
> say Just like "print", but implicitly appends a newline.
> "say LIST" is simply an abbreviation for "{ local $\ = "\n";
> print LIST }".
>
> This keyword is only available when the "say" feature is enabled: see
> feature.
> =====================perldoc -q feature========================
> No documentation for perl FAQ keyword `feature' found
>
>
>
> Just wondering how I can featureise 'say'
>
See perldoc feature.
[code]
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
say "Hello!";
[/code]
This prints "Hello!" followed by a newline.
You can also do:
[code]
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
say "Hello!";
[/code]
Which enables all the 5.010 features.
Hope that helps. You are right that the documentation may need to be clearer
to the uninitiated.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs
God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/