diff options
-rwxr-xr-x | sort-deb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -24,9 +24,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# change the argument to system calls to a list. -- Peter Palfrader sub dpkgcmp{my ($i,$j)=@_;chomp $i;chomp $j; - return system(" dpkg --compare-versions $i lt $j " ) * 1 - + system(" dpkg --compare-versions $i gt $j " ) *-1; + return system('dpkg', '--compare-versions', $i, 'lt', $j) * 1 + + system('dpkg', '--compare-versions', $i, 'gt', $j) *-1; ;} print (sort {dpkgcmp($a,$b)} <>); |