in reply to use variable as name for new file

Hi

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 :$!:");

"Keep pouring your ideas"

Replies are listed 'Best First'.
Re^2: use variable as name for new file
by Zcity (Novice) on Jun 16, 2006 at 12:08 UTC
    Hi Jesuahok Thanks for the reply. I did the above and still is not working. Are there other tricks you can think of to make the above work.
    A reply falls below the community's threshold of quality. You may see it by logging in.