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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sorting non-standard elements
by fglock (Vicar) on Oct 29, 2004 at 21:22 UTC | |
Re: Sorting non-standard elements
by Fletch (Bishop) on Oct 29, 2004 at 19:18 UTC | |
Re: Sorting non-standard elements
by artist (Parson) on Oct 29, 2004 at 19:17 UTC | |
Re: Sorting non-standard elements
by theorbtwo (Prior) on Oct 29, 2004 at 21:08 UTC | |
Re: Sorting non-standard elements
by TedPride (Priest) on Oct 29, 2004 at 19:39 UTC |
Back to
Seekers of Perl Wisdom