tradez has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks,
I am having an issue with sorting an non-standard set of elements, a list of Software Levels for multiple elements in our network. The network Elements are in the format Major.Minor.Load(LoadVersion) and meet the regex
in formatting. It might just be a very long week, but I am having an issue finding the all ecompassing way to sort these. *NOTE the final \w* is a letter that may or may not be there (hence the *) and should be sorted in a
Tradez
"Every official that come in
Cripples us leaves us maimed
Silent and tamed
And with our flesh and bones
He builds his homes"
- Zach de la Rocha
/\d+\.\d+\.\d+\w*/
in formatting. It might just be a very long week, but I am having an issue finding the all ecompassing way to sort these. *NOTE the final \w* is a letter that may or may not be there (hence the *) and should be sorted in a
fashion.my @sort = sort($prevLoadVersion, $currLoadVersion); my $max = shift @sort;
Tradez
"Every official that come in
Cripples us leaves us maimed
Silent and tamed
And with our flesh and bones
He builds his homes"
- Zach de la Rocha
Back to
Seekers of Perl Wisdom