Tk::Error: bad file type "ARRAY(0x22619c)", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?" at site/lib/Tk.pm line 337.
####
my $open_file_types = [ ['NZB Files', '.nzb'] , []];
####
$file->command(
-label => "Import",
-accelerator => 'Ctrl-i',
-underline => 0,
-command => [
sub {
my ( $mw, $file_open_dir ) = @_;
my $nzb_file = $mw->getOpenFile(
-title => "Select NZB File",
-initialdir => $file_open_dir,
-filetypes => [ [ 'NZB Files', '.nzb' ], [] ],
-defaultextension => '.nzb'
);
print qq{You chose to open "$nzb_file"\n} if $nzb_file;
},
$mw,
$file_open_dir
],
);