in reply to Perl/Tk invoking a batch command and passing argument

And of course you should have

use strict; use warnings;

at the top of your code.