in reply to Re^8: Sorting text-number values
in thread Sorting text-number values
Fair enough - but I need to use this sort in a Perl application that may need facilities in 5.20 which are not in 5.010.
And in what way do you suppose having the use 5.010; statement in the code would prohibit that?
You cannot take working code, remove lines which you don't understand and then complain that it no longer works. This is as true of Perl as in any other language.
If you do remove a line from working code which then breaks then the appropriate course of action is to learn what that line means. In many cases this is as simple as running perldoc -f use which would have told you. Among other very useful information it says:
"use VERSION" also lexically enables all features available in the requested version as defined by the "feature" pragma, disabling any features not in the requested version's feature bundle. See feature. Similarly, if the specified Perl version is greater than or equal to 5.12.0, strictures are enabled lexically as with "use strict". Any explicit use of "use strict" or "no strict" overrides "use VERSION", even if it comes before it. Later use of "use VERSION" will override all behavior of a previous "use VERSION", possibly removing the "strict" and "feature" added by "use VERSION". "use VERSION" does not load the feature.pm or strict.pm files.
... etc. Feel free to play with code, take it apart, break it, reassemble it. All this is good for learning. But when it breaks, try to understand how and why.
HTH, Hippo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Sorting text-number values
by merrymonk (Hermit) on Nov 30, 2016 at 12:12 UTC | |
by marto (Cardinal) on Nov 30, 2016 at 12:16 UTC |