in reply to use variable as name for new file
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 :$!:");
|
|---|
| 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 | |
|