On Mon, Oct 22, 2001 at 05:43:58PM +0100, Sam Vilain wrote: > > More, someone has mentioned the %x{$_}++ feature, which IMHO, MUST > > continue to work. > > What is void plus one?
According to every Perl book I've ever read, 1. I've yet to run into someone who finds that a difficult concept when the first hit it in one of my classes. Take the example of the fairly common uniq function: require 5; sub uniq { my %tmp; my @ans; foreach my $e (@_) { push @ans, $e unless $tmp{$e}++ } return @ans; } or the even more common: require 5; while(<>) { $words{$1}++ if /^(\w+)/; } print map {"$_ found $words{$_} times\n"} sort keys %words; > I think a pragma for this would be ideal. A pragma that forces questionable strings to NaN in a numeric context would seem fair. A pragma that gets back the old functionality would just waste space in every program I write. That doesn't even mention the command-line: perl -Mundef_zero -nle ... Ick. -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs 6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF "Write your letters in the sand for the day I'll take your hand In the land that our grandchildren knew." -Queen/_'39_