in reply to Copy files to Perl/Tk clipboard

Here is a code snippet from a Perl/Tk password generating app I wrote that copies stuff to the clipboard. Hope it helps.
my($entry) = $main_frame->Entry ( -textvariable => \$password ); $entry->clipboardClear(); $entry->clipboardAppend($password); $entry->SelectionClear(); $entry->SelectionHandle( sub { $password } ); $entry->SelectionOwn;