#!/usr/bin/perl $file = "current.txt"; print "file to open is $file \n"; open (FILE, ">>$current") or die "Unable to access $file:$!\n"; print FILE "testline \n"; close FILE;