if you "use strict" then you do need to declare $a somewhere in the file before you use it. Somebody else said that $a is a special variable so try to use something more descriptive.
Comment on Re: Re: Using UNIX commands inside Perl scripts, with Perl variables