-
Recovering deleted files the DIY way
I can’t really remember if I’ve written about this or not (old age I suppose :-p), so here it goes: There are certainly easier (and better) ways to do it, here is the DIY way for those who enjoy some hands-on fun: Save the contents of the entire partition (or disk) in a separate file.…
-
Compressed HTTP
The HTTP standard allows for the delivered content to be compressed (to be more precise it allows for it to be encoded in different ways, one of the encoding being compression). Under Apache there are two simple ways to do this: Using the mod_deflate Apache module If you have mod_php activated, setting the zlib.output_compression variable…
-
Regex magic
First of all I want to apologize to my readers (both of them :-)) for bein AWOL, but real life sometimes interferes pretty badly. I always been a big fan or regular expressions and one of the main reasons I love Perl is because they are so deeply integrated in it and are natural to…
-
Cleaning it all up – temporary files in Perl
One of the most frustrating things in programming is doing all of the extra plumbing. You can just say (if you are trying to create a stable product): open file A, read a line, transform it and dump it to file B. You have to think about all the error conditions which may appear: what…
-
Starting to program
Today I was asked if somebody who is getting into programming should start out with Perl? First of all I would like to say that I feel honored that somebody would consider taking my advice. Second of all, I don’t really feel that I can give an objective answer, since I’ve been doing it so…
-
Perl, Windows and File Locking
For some Perl scripts you want to make sure that only one instance of it is running at the same time. So you use lockfiles, in a way like this: open(LockFile, “>$lock_file”) or die(“Failed to lock file $lock_file, error: $^E”); flock(LockFile, LOCK_EX) or die(“Failed to lock file $lock_file”); The idea being that the OS guarantees…
-
Implementing Web Services with Open Source Software
Today many services are available (both internal and external to a company) as Web Services, more specifically as SOAP. Companies like Microsoft, IBM or Sun have heavily invested in this field and made many of their products compatible with it (as a client and/or as a server). In this article I will study the different…
-
Perl and Windows
Perl is a nice scripting language, but originally it wasn’t designed for the Win32 OS. There have been many improvements over time however (the greatest of them all being ActivePerl with PPM, which – as opposed to CPAN – doesn’t require you to have all those command line tools which you have on 99.9* on…
-
What I learned about Perl today
When you start using a new programming language for quite some time you will regularly find new things in it. Some will make you think I wish I knew this yesterday and some will seem interesting. So here is something I learned about Perl today: If your recursion level exceeds 100 (meaning that you call…
-
Perl contest
I’m not a Perl guru (although I consider myself a medium level wizard :)), and this last contest shows it. My entry for it was 4.6258 times longer than the shortest one submitted. :(. Some tips (maybe you can do better than me): Wrapping your head around Roman Numerals is hard. I suggest that in…