PERL Programming |
| Wednesday, 04 May 2005 18:20 | |||
|
I wouldn't say that PERL is my first and favorite language, but I would say that I have grown to appreciate it. I find that everyone has a different style when writing code in it. It is powerful with a lot of available CPAN modules, this makes development bit easier. I've seen some pretty amazing scripts...and some pretty unreadable perl code. So it goes. The Perl motto TMTOWTDI, "There's More Than One Way To Do It" ,pronounced "tim toady". Is no myth in Perl. blogs.perl.org - blogging the onion Perl Mongers - Perl User Groups. Planet Perl Iron Man Hacking Thy Fearful Symmetry - Dancing the Haka - great perl related blog. Five great Perl programming techniques to make your life fun again at Xaprb - map and grep, implement defaults with ||=,hash and array slices,executable regular expressions,dispatch tables of coderefs, oh my. The Perl Programming Language - www.perl.org - home of Perl. perl5i - Fix as much of Perl 5 as possible in one pragma - metacpan.org Perl 6 / Perl 6 Modern Perl, by chromatic - Onyx Neon Press - great, up to date book...(2011-2012 draft) Strawberry Perl for Windows - win32 binary distro, perl Makefile.pl, dmake,dmake install. DWIM Perl - the Perl distribution that contains everything you'll ever need - based on strawberry perl. Padre, the Perl IDE - install Padre::Perl, uses wxWidgets, very capable IDE. Perl Circus - Perl Tricks, Tips And Traps. Welcome to perlmeme.org - tutorials,faqs,howtos. perl Out of memory! (with solution) at Red Mercury Labs - remember ulimit... Perl has no switch statements. How do I avoid a long if-else-if pattern? - hashes! Quick reference for common tasks: Perl Programming - Wikibooks, collection of open-content textbooks perlop - perldoc.perl.org - specifically the Quote-Like-Operators. A nice function reference: Perl Programming/Function Reference - Wikibooks, collection of open-content textbooks Many times when you write PERL code, you want to use modules. These modules usually reside on the CPAN sites (The CPAN Search Site - search.cpan.org). To install them, find the module, download and install. One nice utility I've found is the CPAN management shell. Just run: perl -MCPAN -e shell;Then when you are inside the shell type: install <module> (which could be something like MODULE::Name) This will automatically download, unpack, and install the app. It will also grab any deps. that are needed when installing! Very nice indeed. :) For more information about it, search for: CPAN on the CPAN search. Here's a single liner to install a module from the CLI. perl -MCPAN -e 'install MODULE::ToInstall'Also, if you for some reason need to reconfigure your CPAN options: useful.things » Blog Archive » Perl CPAN reconfiguration App::cpanminus - search.cpan.org - App::cpanminus - get, unpack, build and install modules from CPAN Some really great PERL tutorials live here: Alex Batko :: Programming :: Perl Sam Graham's website > Perlblog Introduction to References How do I print a hash that has a hash within it? CPAN wrong directoryI have had issues in the past when uninstalling and installing perl on machines with cpan using the wrong directory. If you find yourself with the same issue, try checking for a MyConfig.pm in your local directory. In windows, I found it in "Local Settings\Application Data\.cpan\CPAN\MyConfig.pm"Nice way to start your perl file#!/usr/bin/perl -Tw # force taint checks, and print warnings use strict; # install all three strictures use warnings; # print warnings $|++; # force auto flush of output buffer dos2unix/unix2dos in perlperl -pi -e 's/\r\n/\n/;' *.ext #dos2unix perl -pi -e 's/\n/\r\n/;' *.ext #unix2dos teideal glic deisbhéalach » Blog Archive » Peruse popular Perl packages Perl version 5.10.0 documentation - perldoc.perl.org - where to go for docs on perl. Examples in Perl create a hash from comma delimited list of name value pairs.my %set_hash = map { split /=/ } split /,/, $setlist; should PERL be considered a functional language?I was a little surprised by this.Derivative Function as a Closure in Perl - Derivative Function From Calculus as a Closure in Perl Perl and C++Don't forget SWIG.Perl and C++ - Perl XS (the Perl native glue) and C++ PERL IDE in EclipseEPIC - Eclipse Perl Integration - EPIC is an open source Perl IDE (including editor and debugger) based on the Eclipse platform, compatible with Windows, Linux and Mac OS X. (http://e-p-i-c.sf.net/updates/testing)PERL for file renamingRecipe 9.9. Renaming FilesHow to Bulk Rename Files in Linux (Terminal or GUI) | Webmaster Tips array returned as undefThis made me take a double take. Try out the following:my @array = undef; if(@array) { print "defined\n"; } else { print "undefined\n"; }You will find that you get a defined value back! So when you return an array, returning undef does not make the returning @array undef. Instead, use the empty array (). Logging in perl8 Useful Log::Log4perl RecipesLog::Log4perl::FAQ - Frequently Asked Questions on Log::Log4perl Smart Logging With Log4per (PPT) or google quickview - really great set of slides. Debugging Perl DBI - gives quite a good intro on DBIx::log4perl. Email in perlSending Email with Perl Best Practice - I'll agree using MIME::Lite::TT::HTML is pretty awesome.Random CPAN modulesFindBin - perldoc.perl.org - module figures out where the script was invoked. useful for relative paths...IO-All README - metacpan.org The home of asterisk-perl - A PERL module for Asterisk: local::lib - search.cpan.org - - create and use a local lib/ for perl modules with PERL5LIB Perl Web FrameworksMeteor - perl web 2.0 http serverCatalyst - Web Framework - PERL MVC PSGI/Plack - Perl Superglue for Web Frameworks and Web Servers Dancer - Perl Web Framework for easy and fun webapp development Web-Simple - A quick and easy way to build simple web applications - metacpan.org jjn1056/Shutterstock-Guestbook-Web - GitHub - example web application using Web::Simple, Moo and HTML::Zoom. yanick/Galuga - GitHub - Galuga - Yet another blog engine HTML-Zoom - selector based streaming template engine - HTML::Zoom is the cure for JQuery envy. Object Systems in Perlstevan/p5-mop - GitHub - Meta Object Protocol, or MOP, to be perhaps included in a future version of Perl 5.Qore Programming Language - embeddable multi-threaded programming language. Moose - A postmodern object system for Perl Jesse Luehrs / Moose - search.cpan.org Dave Rolsky / Moose - search.cpan.org -Moose is a complete object system for Perl 5. Call of the Moose - Moose blog perl5i - Fix as much of Perl 5 as possible in one pragma - metacpan.org Matt S Trout / Moo - search.cpan.org - Moo - Minimalist Object Orientation (with Moose compatiblity) Object::InsideOut - search.cpan.org - support for implementing classes using the inside-out object model. Object::InsideOut Quick Reference - Yani DBIxTesting DBIx::Class Models without the Database - Modern Perl Books, a Modern Perl BlogDBIx::Class — An ORM for Perl that is extensible and flexible Hacking Thy Fearful Symmetry - DBIx::Class::DeploymentHandler is Awesome Arthur Axel "fREW" Schmidt / DBIx-Class-DeploymentHandler - search.cpan.org DBIx::Class::Manual::Intro - search.cpan.org Unicode in PerlUnicode: Good, Bad, & UglyTom Christiansen’s Materials for OSCON 2011 Unicode::Tussle - search.cpan.org
|
|||
| Last Updated on Monday, 23 April 2012 18:09 |

