It works with or without the shebang for me, go figure... I have windows 10 64bit and active-state perl 5.16.3 32bit. I think you should declare $y before the loop though like my $y = 0; that would probably get rid of your errors.
Comment on Re^3: Debugger actions: On which lines?
Hmmm.... It has never worked for me. I always thought I was doing some thing wrong but I never needed it. I needed it today....
My Perl
/tmp$ perl -v
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-li
+nux-gnu-thread-multi
(with 41 registered patches, see perl -V for more detail)
[snip]