I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-08-25 05:33:06-07 by newperler
Getting file name
I am using the following code to browse to a file in a directory.
#!/usr/bin/perl -w use strict; use Tk; use Cwd; my $top = new MainWindow; my $selected_file; print "Filename: ", $top->getOpenFile(-defaultextension => ".pl", -filetypes => [['Excel files', '.xls' ], ['Text Files', ['.txt', '.text']], ['All Files', '*', ], ], -initialdir => Cwd::cwd(), -initialfile => "", -title => "Ysdsdsad", ), "\n"; print " Selected file is $selected_file\n";
How do I put the select file name into $selected_file? Thanks
Direct Responses: Write a response