#!/usr/bin/perl use strict; use Tk; use Tk::DropSite qw(Win32); my $mw = new MainWindow(-width => 500, -height => 300); my $label = $mw->Label(-text => "this is test")->pack->place(-relwidth => 1.0, -relheight => 1.0); #$label->DropSite(-droptypes => ['XDND'], -dropcommand => [\&dropFile, $label]); $label->DropSite( -dropcommand => [\&dropFile, $label]); MainLoop; sub dropFile { print "DROP\n"; }