#!/usr/bin/perl use strict; use Tk; sub clicked { system ( 'myscript.pl' ); } my $top = MainWindow->new(); my $button = $top->Button ( -text => "click me", -command => \&clicked )->pack(); ... MainLoop(); #### my $button = $top->Button ( -text => "click me", -command => [\&clicked, \$filename] )->pack();