-
Installing Perl 5.10 on Ubuntu
So I upgraded to Ubuntu 8.04 and I’m not very impressed unfortunately. I got Compiz working, thanks to Compiz-Check (it works only at lower resolutions, so I switched it off, however it’s nice to have the option) and also Monodevelop 1.0, however the installed Firefox is slightly outdated (Beta 5 rather than RC1) and sound…
-
Test for available modules in Perl
As I mentioned earlier the difference between use and require is that the second is evaluated only at execution time, making it possible to test if a given module was imported successfully. One possible use for this is to make your script deployable on multiple machines where you might or might not have the option…
-
Mixed links and commentary
MS Office took a page out of IdeaJ’s book and uses every available method to annoy users (check for valid licenses) – on the bright side hopefully I will time to update my machine to Ubuntu 8.04 today 🙂 The Backup Song. Very, very funny! Writing a small web crawler in Python. Why it demonstrates…
-
Perl split gotcha
One of those things which are spelled out in the documentation, but most people (including myself) don’t really read the fine manual, until really, really forced to, and from the way it’s described, it’s not immediately clear how it can byte you. From perldoc: Empty trailing fields, on the other hand, are produced when there…
-
The difference between use and require in Perl
Contrary to PHP (if you ever used it), require is the more dynamic one of the two. Both statements are used to import modules, however use is executed compile time (ie when the parser runs through the script), and require is executed when the actual line is evaluated. Generally speaking you should use use (:-)),…
-
The problem with amateur crimefighters
I wish to preface this with the fact that I am a deep believer in cooperation and data sharing. Also, I really appreciate the work that volunteers put into maintaining different resources (like the excellent CastleCops forums). But you have to remember that these people are not professionals and sometimes don’t have a complete understanding…
-
An alternative for Perl heredoc’s
Perl has (true to its motto – there more than one way to do it) many methods for declaring string. Here are a few: The single quote (‘) – does not interpolate variables, does not understand escape sequences (like n for newline) The double quote (“) – interpolates variables (replaces $foo with the value of…
-
Web Applicaiton Firewalls – are they usefull?
I was looking through a presentation by .mario about PHPIDS (embedded below for your convenience), which got me thinking about Web Application Firewalls (or WAFs for short). Currently I don’t see very much value in WAFs. My way of thinking goes something like this – there are two types of web applications you might run…
-
Converting rows (records) to and from arrays in Postgres
Arrays are one of those more special features in PostgreSQL. Like any more esoteric features, you have people both in favor and opposed to them. On the pro side you have the fact that you can have an arbitrary number of elements without wasting space and/or having cumbersome table structure. On the con side you…
-
Random links and commentary
From the Mechanix blog comes the tale of the blocking CREATE INDEX call under PostgreSQL – I consider myself lucky that the databases I run are of internal use and I can permit myself to take them offline for a couple of minutes. Via use Perl;: comments in the Perl debugger. Reminds me of the…