use strict; use warnings; my $pardir; if (exists $ENV{PAR_PROGNAME}){ # running via PAR/pp $pardir = $ENV{PAR_TEMP}; } use Tk; use Tk::PNG; my $png = 'myicon.png'; if ( $pardir ){ $png = $pardir . '/inc/' . $png; } my $mw = Tk::MainWindow->new(); my $icon = $mw->Photo(-file=> $png); my $btn = $mw->Button( -image => $icon, ); $btn->pack(); $mw->MainLoop();