Date: 5 Sep 2001 11:40:49 GMT From: rgarciasuarez@free.fr (Rafael Garcia-Suarez) Subject: Re: Undef'ing multiple variables Message-Id: Tina Mueller wrote in comp.lang.perl.misc: } } hm, i just tried your version with strict and so i declared } all variables with my(). now i'm getting } defined(@array) is deprecated at -e line 6. } (Maybe you should just omit the defined()?) } defined(%hash) is deprecated at -e line 7. } (Maybe you should just omit the defined()?) } } so i guess } ($s,@a,%h)=(); } should be ok. There's no difference at the Perl level. Your solution has the advantage over other solutions that $#a becomes -1. And I had forgotten that the internal difference should now be considered accidental and undocumented ;-( -- Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/