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