Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

Is Perl good for windows applications?

I want to build a program using Perl and have a GUI for the end user to operate on.

Basically I want to program a little application that lets the user click on a "browse" button and the File Dialog (to search for files on your comp) box displays. Then the user would add any text files he wants stored into a list. The list will then load up everytime windows starts up.

I'm pretty sure Perl can build such an application, but would Visual Basic probably be the way to go? Or is Perl just as capable? If I was to learn more about Perl TK, does that involve compiling the actual application for windows users to download and work properly? Reason, that I do not want this jus tto be a perl script, is that not all people have Perl installed on their comps to execute the script.

Thanks for taking your time to read this. May be an odd post, but just need some feedback be4 I really get started on this little project. Thanks.

2006-03-05 Retitled by planetscape, as per Monastery guidelines
Original title: 'Perl Applications'

Replies are listed 'Best First'.
Re: Is Perl good for Windows applications?
by Corion (Patriarch) on Mar 03, 2006 at 21:36 UTC

    If you want to do Visual Basic-like stuff in Perl, have a look at the GUI Loft, which is quite nice for writing user interfaces in Perl. Other options are Tk and WxPerl.

    For distributing a Perl application with Perl included, look at PAR.

Re: Is Perl good for Windows applications?
by zentara (Cardinal) on Mar 03, 2006 at 23:07 UTC
    Well most people with Perl on Windows, get it from ActiveState. Tk comes standard with ActiveStatePerl. Here is a sample to get you started.
    #!/usr/bin/perl use warnings; use strict; use Tk; my @types =( ["All files", '*'], ["C files", [qw/.c++ .cpp .c/]], ["Log files", [qw/.log/]],, ["Text files", [qw/.txt/]], ); my $mw = new MainWindow ( ) ; my @files; $mw -> Button ( -text => 'Select Files ' , -command => \&select_files )-> pack(-padx=>5, -pady=>5) ; MainLoop ( ) ; sub select_files { my $return_ref = $mw ->getOpenFile ( -initialdir => '.', -filetypes => \@types, -multiple => 1) ; foreach my $file( @{$return_ref} ){ print "Result ", $file, "\n" ; } }

    I'm not really a human, but I play one on earth. flash japh
Re: Is Perl good for Windows applications?
by cbrandtbuffalo (Deacon) on Mar 03, 2006 at 23:38 UTC
    Some other options:

    wxperl for multi-platform GUI coding in Perl and the utilities offered by Indigo Star for packaging things up.

Re: Is Perl good for Windows applications?
by mattr (Curate) on Mar 05, 2006 at 12:22 UTC
    I like Wx::Perl (link above) and have found it relatively easy to build a file list panel which you drag files or folders onto and it remembers and lists all the contents to do something to them. It may take a little while to get used to it but is very powerful.

    Also have used Win32::GUI a couple years ago, it was easy for really simple things but wasn't what I was looking for. The wxperl mailing list also has good people responding to questions, I'd recommend it.