NAME perlfeaturedelta - changes in perl features DESCRIPTION This document describes changes in features and notable bugs between perl versions 5.8,0 - 5.8.5. Version numbers indicate the perl version when a feature was introduced, deprecated or removed or a bug was fixed. See the perldelta document for that version for more details about the changes. See the perlhist document for the exact timeline of the different perl versions. For changes in core module versions see corelist (http://zeekat.nl/docs/perl/corelist.html). UNICODE In general, scripts handling unicode should use the latest stable perl version available. (currently, this is version 5.8.5) No fixes in unicode handling are present in this document (new features only). See also "REGULAR EXPRESSIONS" Unicode Character Database versions Perl Unicode database 5.8.4 - 4.0.1 5.8.1 - 4.0.1 5.8.0 - 3.2.0 5.6.1 - 3.0.1 Detect and read BOM-marked and (BOMless) UTF-16 scripts of either endianness. 5.8.5 Warnings on reading invalid utf8 from a filehandle 5.8.1 New Unicode Semantics (no more "use utf8", almost) 5.8.0 New Unicode Properties 5.8.0 binmode(FH) and ":raw" turn off all translation (including unicode) 5.8.0 \p{Blank} and \p{SpacePerl} 5.8.0 :utf8 pseudo IO layer 5.8.0 STD* handles marked UTF-8 if LC_ALL, LC_CTYPE, LANG =~ "/utf-?8/i" 5.8.0 :encoding() layer 5.8.0 Unicode in hash keys, regexes, tr/// and I/O 5.8.0 skip BOM on scripts 5.8.0 UTF-16 and UCS-2 encoded Perl files should be read correctly 5.8.0 Comparing with utf8 data does not magically upgrade non-utf8 data 5.8.0 Generating illegal Unicode code points causes warning 5.8.0 "IsAlnum", "IsAlpha", and "IsWord" now match titlecase. 5.8.0 ".", and variable interpolation, "eq", "substr", "reverse", "quotemeta", "x", "s///", and single-quoted UTF-8 5.8.0 REGULAR EXPRESSIONS Matching on the intersection of two Unicode character classes. 5.8.5 Refering to user-defined character classes from within other user defined character classes. 5.8.5 Correct pragmata propagation into (?{...}) constructions in regexps. 5.8.4 POSIX regex features [[.cc.]] and [[=c=]] give fatal error 5.8.0 (previously unsafely ignored) Unicode in regexes 5.8.0 $^N variable 5.8.0 Allow a read-only string on the left-hand side of a non-modifying tr///. 5.8.0 "[[:space:]]" includes vertical tab character 5.8.0 "[[:blank:]]" character class added 5.8.0 ITHREADS In general, scripts using threads should use the latest stable perl version available. (currently, this is version 5.8.5). The same is probably true for using fork() on Win32 systems. Note that the old threads (5.005 Thread.pm) implementation has been deprecated since 5.8.0. This document doesn't list most fixes in threading, because up till now there have been too many fixes for each release. Creating a new thread when weak references exist 5.8.5 Thread creation performance improved 5.8.5 threads->create() returns "undef" if thead creation fails 5.8.5 detached threads supported on windows. 5.8.4 threads support on cygwin 5.8.1 ithreads (threads.pm) 5.8.0 5.005 threads model (module "Thread") deprecated 5.8.0 CLONE subroutine 5.8.0 $AUTOLOAD, sort(), lock(), and spawning subprocesses are thread-safe. 5.8.0 FILES glob() on unreadable directories 5.8.5 glob() returns filenames in alphabetical order on all platforms 5.8.0 pipe open in list form (open KID_PS, "-|", "ps", "aux") 5.8.0 (platforms supporting fork() only) open($fh,'>', \$variable) 5.8.0 Anonymous temp files via open($fh,"+>", undef) 5.8.0 PerlIO as default (implies IO layers) 5.8.0 line numbers > 65536 (affects line number reporting only) 5.8.1 "utime undef, undef, @files" 5.8.0 mkdir() ignores trailing slashes in the directory name 5.8.0 TIE SCALAR for tied hashes 5.8.3 Negative index handling on tied arrays 5.8.1 Recursive calls to FETCH et. al. 5.8.1 warn() and die() write to tied "STDERR". 5.8.0 TAINTING "exec LIST" and "system LIST" warn on tainted data 5.8.0 "${^TAINT}" variable 5.8.0 taint propagation fixes 5.8.0 V-STRINGS single number vstrings before => are normal strings 5.8.1 (interpreted as vstring in versions 5.6.0 - 5.8.0) "eval "v200"" 5.8.0 "fields", "base" AND "attributes" Attributes for "my" variables handled at run-time 5.8.0 "our" attribute "unique" 5.8.0 Attributes work with our(). 5.8.0 PACK/UNPACK pack/unpack D/F recycled 5.8.0 "j", "J", "F", and "D" 5.8.0 "pack('U0a*', ...)" forces string to UTF-8. 5.8.0 pack "Z" correctly terminates the string with "\0". 5.8.0 MATH AND NUMBERS + - * / on integers use integer math 5.8.0 (previously, used floating point math) The numerical comparison operators return "undef" on NaN 5.8.0 Underscore between any digits allowed 5.8.0 Non-decimal number strings are conistent on all platforms ("0x32" ==0) 5.8.0 Infinity is a number. 5.8.0 printf() no longer resets the numeric locale to "C". 5.8.0 Printing quads (64-bit integers) with printf/sprintf now works without prefixes on 64 bit systems 5.8.0 OVERRIDABLE BUILTINS readline() 5.8.0 GENERAL FEATURES format enhancements 5.8.4 extra hash randomisation (unpredictable hash-key ordering) 5.8.1 one-at-a-time hash algorithm (other hash-key ordering) 5.8.0 %ENV values longer than 255 bytes 5.8.1 (max is now 32640 bytes) automatic binmode() on sockets and pipes on Win32 5.8.1 reference to reference stringifies as REF(...) Instead Of SCALAR(...) 5.8.0 Restricted Hashes (via Hash::Util) 5.8.0 Arrays always interpolate in strings 5.8.0 sub AUTOLOAD :lvalue 5.8.0 "perl -d:Module=arg,arg,arg" (multiple arguments) 5.8.0 overridable chop() and chomp() 5.8.0 END blocks run even if you exit/die in a BEGIN block. 5.8.0 Formats support zero-padded decimal fields. 5.8.0 Lvalue subroutines can return "undef" in list context 5.8.0 "no Module;" without unimport() method 5.8.0 "pack() / unpack()" group/repeat/count template letters with "()" 5.8.0 printf() and sprintf() parameter reordering ("%\d+\$" and "*\d+\$") 5.8.0 prototype(\[$@%&]) (create references) 5.8.0 Tied hash interfaces are required to have EXISTS and DELETE 5.8.0 SIGNALS Safe signals 5.8.0 safe signals can be disabled with PERL_SIGNALS 5.8.1 SIGPIPE while printing on to a closed socket 5.8.1 SIGFPE restored when calling external programs 5.8.1 LOCAL local ${$x} 5.8.1 local($TIED_VARIABLE) memory leak fixed 5.8.0 (but local @tied_array; and local %tied_hash; are broken!) Localised hash elements are correctly unlocalised to not exist, if they didn't before they were localised. 5.8.0 COMMAND LINE AND ENVIRONMENT perl -t 5.8.0 $^X makes better attempt to get full path 5.8.0 -s and -F supported on #! line 5.8.0 PERL5OPT with embedded spaces 5.8.0 GENERAL BUG FIXES In-place sort optimisation fixed (bug introduced in 5.8.4) 5.8.5 Optimisation for unnecessary assignments gives spurious warnings (introduced in 5.8.4) 5.8.5 "$a .. $b" when either $a or $b is "undef" 5.8.3 reading $^E preserves $! and errno 5.8.3 pipes using local rather than global DCL symbols for IPC 5.8.1 return value of the ioctl() built-in function fixed on Win32 5.8.1 (broken in 5.8.0) select() with 4-args on Win32 5.8.1 binmode(FH, ":crlf") on Win32 5.8.1 $Config{byteorder} if sizeof(long) is 4 and sizeof(IV) is 8. 5.8.0 "do keyword" calls keyword instead of &keyword 5.8.0 glob() errors fixed 5.6.1 POSIX::sleep() returns the number of *unslept* seconds 5.8.0 caller() returns a subroutine name of "(unknown)" for removed subs 5.8.0 (could dump core) More predictable order of DESTROYs 5.8.0 *foo{FORMAT} works 5.8.0 lexicals outside an eval "" always resolved inside the eval "" 5.8.0 lexicals don't leak at file scope into previously declared subs 5.8.0 lexical warnings propagate correctly into scopes and eval "" 5.8.0 Several eval "" memory leaks fixed 5.8.0 scalar() forces scalar context even when used in void context 5.8.0 OPTIMIZATIONS inplace sort 5.8.4 (buggy, fixed in 5.8.5) unnecessary assignment 5.8.4 (buggy, fixed in 5.8.5) sort() uses mergesort (better worst-case performance, and stable) 5.8.0 "map" in scalar context 5.8.4 "map" in void context 5.8.1 unshift() 5.8.0 getpwent() didn't work on some shadow systems. fixed. 5.8.0 SOCKS support improved 5.8.0 DEPRECATED Version numbers indicate perl versions where the feature was *deprecated*. chdir("") or chdir(undef) 5.8.0 dump() builtin 5.8.0 \8 \9 in string 5.8.0 *glob{FILEHANDLE} (use *glob{IO} instead) 5.8.0 package; (without argument) 5.8.0 pseudohashes 5.8.0 (fields.pm now uses restricted hashes) "@a->[...]" and "%h->{...}" 5.8.0 suidperl 5.8.0 sub foo (@bar) "prototype" 5.8.0 local @tied_array; and local %tied_hash; restoration of old value is broken 5.8.0 (may have been broken earlier) lstat(FILEHANDLE) 5.8.0 (never made sense) REMOVED Version numbers indicate perl versions where the feature was *removed*. bless(REF, REF) 5.8.0 chat2 library 5.8.0 EQ, NE, LT, LE, GE, GT 5.8.0 tr///C and tr///U 5.6.1