$0 is actually something that trips up a lot of C programmers who start using Perl. They expect $ARGV[0] to hold the name of the program and then pull their hair out trying to figure out why their scripts fail.
Cheers, Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.