in reply to appending is not done

The only thing I can see is that your #! line is bollixed:
    
#!usr/bin/perl

should be
    
#!/usr/bin/perl

Is it (remotely) possible that there is something going wrong with the shell call to Perl because of this? It sounds strange, but wierder things have happend, especially on systems that have been around and been upgraded since the days of punch cards. You didn't specify the OS or vintage, so I thought I'd bring this possibility up because your code should otherwise work.

In any event, welcome to the programming world! :D