dump_photos

I am using dump_photos.pl script to copy (or move) images from my Canon EOS 300D to my computer. Canon’s in-camera filesystem is not very convenient to copy files manually, because images are distributed across a number of folders (100 images per folder thing). Canon original software is for Windows only and is way too complicated and slow for such an easy task.

My script uses standard Perl modules (Getopt::Long, File::Copy, and POSIX) to copy or move files to specified or default (date-based) directory. It also mounts the Compact Flash before processing images, and umounts it after everything is done. It also uses jhead to optionally rotate images based on the information in EXIF header.

Run “dump_photos.pl –help” for a list of options. Although it was tested only with my Digital Rebel, I think it should work fine with most of Canon cameras.

dump_photos.pl

PHP IN CONTRAST TO PERL

There are plenty of holy wars on the web that argue about superiority of PHP over Perl and vice versa. There are many people who prefer PHP, and there are many others who prefer Perl. I am, of course, in the Perl camp. I have programmed both Perl and PHP over some time, and there is no doubt in my head that Perl is way better than PHP as a language. The only point that I like about PHP is the how mod_php works. mod_php is a PHP module for Apache web server, for those who don’t know.

Anyway, back to the subject. I came across an excellent document titled “PHP IN CONTRAST TO PERL“. It summarizes the benefits of Perl compared to PHP nicely and clearly. It also links to a number of other resources on the subject, as well as provides the summary of those resources. Really neat paper and a must read for anyone who has or will have to deal with Perl and/or PHP.

Working with hashes in Perl

There are several very useful modules at CPAN to work with Perl hashes. Here is a short list to get you started.

I’ve used this article (in Russian) as a base for this post.

Building a Vector Space Search Engine in Perl

There is a very interesting article at Perl.com. It is about building a search engine using perl language. The interesting part is that the article is not about the usual reverse index type search engines. It takes a different approach – vector space searching.

Reading the article reminded me of the few things:

  • The subject of searching is interesting to me.
  • Perl is great!
  • Linear algebra is actually useful and I should take it again (and pass it this time).

Advantages of mod_perl over Java servlets

Pretty often, in the mailing lists, people ask why should they use one solution instead of another. There is a similar discussion on mod_perl mailing list. While there are, as usual, a number of reasons to use Perl over Java, it gets interesting when it comes to examples and references. Particularly, these lines from reply by Perrin Harkins:

Amazon runs on Perl. Yahoo runs a lot of Perl. Ticketmaster is all
mod_perl. IMDB is Perl. All of these get tons more traffic than Slashdot.