Welcome to monks. :-)
I assume you are not giving any file path in Subject.
you should add the relative path name while opening the file.
1) check whether $subject is empty or not.
2) check whether the file name already exists or not.
open ( LOG,">/home/user/log/$subject") or die("Error in opening the fi +le :$!:");
In reply to Re: use variable as name for new file
by jesuashok
in thread use variable as name for new file
by Zcity
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |