in reply to help with my unlink

Hello,

If I'm understanding the problem correctly, you need to open a file named "$Form{han}.txt" which contains a list of file names you wish to delete; you want to delete these files as well we the file "$Form{han}.txt". If this is what you need, then follow the example:

open (FNAMES, "<$Form{han}.txt") or die "Cannot open $Form{han}.txt: $!\n"; while(<FNAMES>){ # for every line in the file. chomp; # remove trailing end of line character unlink $_ or die "Cannot unlink $_: $!\n"; } close FNAMES; # close it before you unlink it. unlink "$Form{han}.txt" or die "Cannot unlink $Form{han}.txt: $!\n";
Hope this helps,,,

Update: If you just need to delete the file "$Form{han}.txt" then all you need to do it follow mt2k's suggestion and:

unlink "$Form{han}.txt" or die "Cannot unlink $Form{han}.txt: $!\n";
No need to open the file.