Perl file syntax check
If you want to check the syntax of a perl file without running it, use the -c command line switch perl -c foo.pl
View ArticleEliminating duplicates from a list
Say, I have a list as follows (1, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5) I want to remove duplicates from my list(without using a dictionary) i.e I want the above list transformed to (1, 2, 3, 4, 5) Following...
View ArticlePerl quirks
I have been coding in Perl for a few months now and below is a list of few things which I find quirky. This is not an attempt at flaming or trolling or “X language is better then Y language” sort of...
View ArticleScript for bulk CVS commit
At work, I was developing a POC for search using Lucene. I kept working on it and it worked out pretty well. My manager asked me to check this into revision control as it looked really promising. Ok. I...
View ArticleWhy it is good to know a scripting language
Recently, I was porting some code from Perl to Java. There was a huge snippet of code in Perl in which a hash was defined and data was being added to it. I had to use the same data in my Java code...
View ArticleSQL and case insensitiveness
Can you figure out the flaw in the below code snippet(hint:take a look at the title again)? my $sql = "select count(*) as noOfUsers from users"; my $sth = $dbh->prepare($sql); $sth->execute(); my...
View Article
More Pages to Explore .....