Maybe its the version of perl im using. Im also on windows. when I run perl -d script.pl I get a gui and I can step thru each line of code. I get no errors at all using the code I posted. I can remove the -w or the whole shebang and it makes no difference in -d or any other instance of it running.