Starting perl GUI programming
I need to extend my programming knowledge, I know as a system administrator, I should automate everything I need to do more than twice and therefore I need more programming skills. I've been thinking of learning shell programming, as it is the most ubiquitous in Linux systems. I already know some shell programming and for most of the simple tasks I can easily write a small shell script. The problem is I really need more to become more skilled, to speed up the things I do and make my life easier.
While I like shell scripting I think it's a little archaic (no harm meant, I do like it and if it's your skill more power to you) and it would be nice to learn something I can use in more situations. The other problem is that I quickly loose my interest when things don't give me enough of a spark, I need something to fuel my interest. That's why I've build an interest for perl programming.
I'm looking at perl for the following reasons:
Availability
Perl is installed by default on most systems I use or administer. This is an important prerequisite as it wouldn't be much of a help if I would learn to code in a language which doesn't run on my systems. I actually like java better(I'm biased as I know a bit of Java from my education) but java is something I would need to install and perl is already there.
Multi purpose
Perl is a real multi purpose language, flexible and versatile. It can be used for web programming, as a command line one liner, for GUI programming, to build system tools, you name it. As I write this it starts attracting me even more to learn this stuff.
Source code available
There's a lot of source code available I can learn from and adapt for my needs. This is one of the nice things of being on an open source os. Even when I just grep trough my /usr/bin (grep "bin/perl" /usr/bin*) I find a lot of perl programs I can try to read which are written by experienced programmers. Maybe I can even one day contribute something back to the open source community.
GUI programming
I think it's very nice to write command line programs and there's a lot to say for it, but writing GUI programs just attracts me a lot more. I've been reading about the gtk2-perl toolkit and it seems real easy to create and adapt programs based on this. And as it seems to be installed by default (the gtk2 libraries are part of gnome I believe) this makes my programs portable too, so I can easily show off to my friends and colleagues.
Coming up
Next time I'll write about installing Eclipse perl plugin, configuring it to run perl, and a little coding fun.
Do you think I should not spend my time learning this? Are there better alternatives? Should I just learn bash scripting? Tell me what you think. It can take a while before comments are published (different time zone)
This is the first article in a ongoing series about learning perl GUI programming. You may be interested in the other articles too. You can find the other articles here:
1. starting perl GUI programming
2. Installing Eclipse, the Epic Perl plugin and my first Perl GUI program
3. Open Source rocks! Learning from code by debugging
4. Quick and dirty linux GUI programming
5. resources for learning Perl Graphical Programming
6. Drawing and animating directly to the Desktop with Perl
7. Dynamically-creating-gui-objects-on-demand-in-Perl
- kaikokan's blog
- Login to post comments
-
Popular content
Recent blog posts
- Dynamically creating gui objects on demand in Perl
- Easy and cheap web developement in Java with the google App Engine
- Differences in Linux hosting options
- Drawing and animating directly to the Desktop with Perl
- 5 resources for learning Perl Graphical Programming
- Quick and dirty linux GUI programming
- Open Source rocks! Learning from code by debugging
- Installing Eclipse, the Epic Perl plugin and my first Perl GUI program
- Starting perl GUI programming
- More ways to gain access to systems you have physical access to
don't forget to vote if you find something useful!!
- Diffuse is smaller
21 weeks 6 days ago - Looks like a great tool but
22 weeks 1 day ago - I think that this is a cool
22 weeks 1 day ago - This seems a very nice
22 weeks 2 days ago - Geany too for me...
22 weeks 4 days ago - opesource is always hard to
24 weeks 5 days ago - Thanks
24 weeks 5 days ago - Cairo dock
24 weeks 6 days ago - True
25 weeks 2 days ago - wow. this article sure did
27 weeks 5 days ago
Navigation
Tags
Best karma users
- wolfrickwilmer
- susan
- reet1983
- KarenBecker82
- jack1234
Categories


Fast and easy GUI programming with PerlQt
LinuxGuru 38 weeks 5 days 9 hours 20 min ago
I just wanted to let everyone know PerlQt is great.
Tutorials and examples on PerlQt.wikidot.com
PerlQt is a very fast and easy way to create great looking GUI programs using the Qt drag and drop form designer and Perl. PerlQt is powerful enough for advanced developers and easy for beginners as well.
I've been coding
Anonymous 39 weeks 4 days 3 hours 47 min ago
I've been coding professionally for 19 years now. I earned a BS and MS in Comp Sci from an competitive engineering school in the US. I've programmed in Pascal, C, C++, Java, sh/csh/tcsh/bash, Python, PHP, Basic, VB, Schema, ADA, JavaScript, and various DB procedural languages. Perl is my absolute favorite, by far, bar none. I've found it to be the ideal tool for any programming task except those demanding the absolute speed of a well-designed C program. Procedural, OO, doesn't matter. I've used it to build everything from that one-line utility to major enterprise-level commercial applications. Looking back, I can't believe how much money I've seen wasted building stuff in C++, tracking down nasty bugs, waiting for builds ... perl makes everything faster and easier, and CPAN is the killer.
Have you looked into Wx perl?
Anonymous 39 weeks 4 days 6 hours 29 min ago
http://wxperl.sourceforge.net/
Seems like I'll have some to look into
kaikokan 39 weeks 3 days 21 hours 40 min ago
I think I have to look into a bunch of kits, I'll certainly take a good look at pro's and cons of the different kits around.
Thank you for the link!
Same situation here...
Anonymous 39 weeks 4 days 13 hours 53 min ago
Hello there,
I have been thinking the same thing lately. I have been writing PHP for some time but have also found the desire to pick up a different language. My programming skills are by far too procedural and I would really like to become more Object Oriented. I have been drawn to Python some, but just recently. I have no preferences really, but would like to be able to develop both web and local applications. I am going to do some more research in regards to Perl, and keep my eye on your blog.
Keep us updated and good luck!
OO Perl programming
Anonymous 39 weeks 3 days 12 hours 40 min ago
You should look at Moose and Mouse at CPAN. For web programming look at Catalyst and CGI::Application.
I started doing this many
Anonymous 39 weeks 4 days 14 hours 6 min ago
I started doing this many years ago with Perl/Tk, the main gui tool for Perl available then, and developed several tools over the years that I still use daily. Perl/Tk works in *nix and Windows (very portable). Unfortunately the widgets look dated and I don't believe it's still being maintained since the untimely death of it's author Nick Ing. Simmons (RIP).
Perl is still by far the BEST Dynamic Scripting Language
Anonymous 39 weeks 4 days 14 hours 35 min ago
As one other poster mentioned, you need to have a 'purpose'.
If you have one, then put Perl to work. In my experience, there is no faster way to learn and Perl is capable of doing the 'heavy lifting'.
I've watched all of the new languages unfold and still none is as interesting and rich as Perl.
Grab yourself a copy of O'Reilly Publishing 'Learning Perl' and have Fun!
God Bless Larry Wall.
Dietrich T. Schmitz
Dietrich T. Schmitz & Associates
http://www.dtschmitz.com
Twitter: @dtschmitz
Look into Perl/Tk
Anonymous 39 weeks 4 days 16 hours 10 min ago
I agree with your selection of Perl as a good basepoint language; it's flexible enough to do most anything you want (other than stringent OO) without always tripping over limitations (the way I find myself doing in bash) and lends itself well to migration.
I tend to code first in Perl. Running a Perl script does pull in the Perl interpreter, and on some old or small machines that can take too big a bite out of available memory, so if I need a program to be more shallow, I then take the time and trouble to translate it into shellscript. If I need the program to be faster, I push it into C instead.
Gtk is a great widget set, supported by a very good RAD, Glade, but it's a moving target; I've already been bit once by that, when I coded something in C using Gtk/Gnome 1 and the world moved to Gtk/Gnome 2 and things I was counting on got deprecated out. Now they're planning the next move, to Gnome 3? When I write something in Perl, I'd rather not have to migrate it to a new platform every few years. Plus, given that Gtk is tied to Gnome, which is tied to Mono, well, I'm doing whatever it takes to keep my systems from being infected with Mono and poisoned with Miguel's Redmond Kool-Aid.
Tk is a more mature and stable widget set. These days it looks maybe a little bit funky, but I can live with that, in return for its continuing to work long after I've moved on to other equally-pressing coding tasks. It's at least as universal as Gtk, probably moreso, so I can better count on my code running wherever it's installed. Spectix, which is written for and in Tcl/Tk but can emit Perl/Tk framework code, is a decent RAD for quickly whipping up a window layout. Perl/Tk is in CPAN, along with a bunch of new or improved widgets folks have contributed, so it basically goes everywhere Perl goes. Plus, I find Tk to be a good parallel to the widget set implicit in CGI, so I get two interfaces (local desktop in Tk, browser-based in CGI) for a lot less than twice the trouble. The Perl/Tk coverage in O'Reilly books helped me get productive quickly.
Go ahead and check out Perl/Gtk, as it can only help your understanding of event-based GUI systems, and no knowledge is ever totally wasted, but do also check out Perl/Tk.
Wx
Anonymous 39 weeks 3 days 12 hours 37 min ago
Wx is crossplatform and can be easily installed. Padre Perl IDE is written in it.
padre looks nice
kaikokan 39 weeks 3 days 11 hours 35 min ago
I think Iĺl install that too. Seems worth checking out.
I'll look into that
kaikokan 39 weeks 4 days 9 hours 14 sec ago
thank you for the information, this is really something I have to look in to. I'll be looking into eclipse and gtk first. It seems I have a lot of interesting stuff to look into.
Thank you.
good luck
Anonymous 39 weeks 4 days 18 hours 29 min ago
You can post/link your blogs to ironman.enlightenedperl.org.
Learn what you like :)
Anonymous 39 weeks 4 days 19 hours 1 min ago
Hi,
I'm a sysadmin by trade as well and for as long as I can remember (around 15 years), I've used perl for just about anything and everything. To me it is the perfect versatile language. Great for system tools but I've also written a couple of GUI apps. Using Win32 api no less. Though fortunately my programming on windows days are over.
Simply put though there are just too many languages, too many toolkits these days. It's impossible to become proficient in all of them so I'd suggest to stick to learning what interests you and what you can make the most out of. There's no point going off to learn python (as I have done many times), to find you don't really have an interest or end goal in mind. You have to need it for a purpose to learn it from my experience.
Good luck with it and if it's fun, challenging and rewarding, then it is the right choice :)
Cheers,
Arkay.
I think I'll do that
kaikokan 39 weeks 4 days 8 hours 57 min ago
I think I can dream up a purpose or two at my job this time, so I'll start having some fun soon
Great!
Anonymous 39 weeks 4 days 22 hours 55 min ago
Hello
I teach at Colegio America. Sometimes we have computer programming as workshop for small groups of students.
We use scratch.mit.edu for preliminary concepts then perl to introduce to coding.
We planned to use Netbeans for GUI programming but maybe we can change it ;-).
Greetings from Peru.