in reply to Cannot open a file using a relative path

You might find FindBin (which ships with Perl 5.8.8 and later) useful:

Use it as following:

use FindBin qw($Bin);

Then insert $Bin (path to bin directory from where script was invoked) after >> and before your relative path in your open() call.