Love Perl – Hate Perl

For the most part, I love Perl. I use it at work constantly to whip up little scripts to automate things, summarize things, etc. But sometimes it drives me crazy with it’s inconsistent syntax. An example:

To find the length of an array, you do:

scalar @array

or

$#array

But to find the length of a hash, you do:

scalar keys %hash

Sigh… just one minor example of the little gotcha’s that IMHO make it impossible to program in Perl without a reference manual.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s