I have been hearing a lot about this "Modern Perl." Can anyone explain what it is?
One of the things I heard was the new open syntax:
open my $FH, '<', $filename
and not
open FH, "<$filename";
What else is in Modern Perl?
Thanks, Boda Cydo.
I have been hearing a lot about this "Modern Perl." Can anyone explain what it is?
One of the things I heard was the new open syntax:
open my $FH, '<', $filename
and not
open FH, "<$filename";
What else is in Modern Perl?
Thanks, Boda Cydo.
Modern perl isn't a proper noun, it's just something people might say to refer to perl code that uses features only available in the last X years, where X will vary from person to person.
For information about various changes to perl, see the perldelta files, for instance at http://perldoc.perl.org/index-history.html
To quote the source
Modern Perl programming, circa 2010, relies on the collected wisdom of the entire Perl ecosystem. It's time to write elegant, reliable, maintainable, well-tested, and predictable code.
See also, the book. And this quote from the book
Modern Perl is a loose description of how experienced and effective Perl 5 programers work. They use language idioms. They take advantage of the CPAN. They're recognizably Perlish, and they show good taste and craftsmanship and a full understanding of Perl.
To add some specifics to deinst's overview, Modern Perl:
given / when) and sayuse strict and use warnings