On Thu, 1 Nov 2001, Gross, Stephan wrote: > The following script: > $a ="X"; > $a++; > print $a; > $a--; > print $a; > > prints > Y > -1 > > Why does the autoincrement work in the + direction but not in the -? How do > I get the letter before "Y" back? Is this a Perl bug?
Not exactly. From the Camel Book III, page 91: (in regards to autoincrement being magical with strings in this manner) "The autodecrement operator, however, is not magical, and we have no plans to make it so". Of course, no reason is given as to why... :-) -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ You lived with a man who wore white belts? Laura, I'm disappointed in you. -- Remington Steele -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]