in reply to Re^3: Printing largest number in array using loops and if statement
in thread Printing largest number in array using loops and if statement

In this case there is no reason to have a minimum version of Perl 5.6....

Indeed there is! This helps to prevent a future version of Perl 5 from using the wrong version of the grammar with this program.

You might as well argue that there's no reason to use strict with a specific piece of code because there are no stricture violations.

  • Comment on Re^4: Printing largest number in array using loops and if statement

Replies are listed 'Best First'.
Re^5: Printing largest number in array using loops and if statement
by CountZero (Bishop) on Jan 17, 2010 at 09:38 UTC
    Will future versions of Perl change their grammars according to a use Perl x.y.z pragma? That would be a nice trick. But wouldn't that break the present rule that the use Perl x.y.z indicates a minimum version only?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      Will future versions of Perl change their grammars according to a use Perl x.y.z pragma?

      From 5.10 onwards, yes. For now, that's optional features only.

      ... wouldn't that break the present rule that the use Perl x.y.z indicates a minimum version only?

      I hope so! That's the only workable solution I've ever seen to fix the optional features problem in Perl 5.