in reply to shell prob
I don't know what shell you're using, but that's not valid syntax for the bash shell. Nor is it valid syntax for Perl. It looks like you're confusing Perl and shell scripting, trying to mix them together to make something.
--roboticus