perl CGI (3)
Visual Basic (1)
Why should we switch from perl 5.6 to perl 5.8?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:Why should we switch from perl 5.6 to perl 5.8?
Answer:Prior to release 5.6.1 of Perl, bugs in the code of suidperl could introduce a security hole.
In Perl before 5.8.1 one could rather easily generate data that as hash keys would cause Perl to consume large amounts of time because internal structure of hashes would badly degenerate. In Perl 5.8.1 the hash function is randomly perturbed by a pseudorandom seed which makes generating such naughty hash keys harder.
Sorting - the quicksort algorithm used in Perls before 5.8.0 to implement the sort() function is very easy to trick into misbehaving so that it consumes a lot of time. Nothing more is required than resorting a list already sorted. Starting from Perl 5.8.0 a different sorting algorithm, mergesort, is used. Mergesort is insensitive to its input data, so it cannot be similarly fooled.
Another reason for switching to a 5.8 version of perl is its capability to handle multi-byte character strings.