Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PERL script creates file but mleaves it locked

Status
Not open for further replies.

vm146971

IS-IT--Management
Sep 18, 2002
39
US
I am new to Perl so this is probably a very basic question:

I have a script that creates a file and is then supposed to email the filevia an email executable called BLAT.

The script creates the file and initilizes the email program. The email program returns an error that it cannot access the file. If I point the email program to a different file the script finish and send that file, so it appears that the script is working as it should except that it is not releasing the file it created. Is there a command to force the file to close, that I should insert before the email program is initialized.

Here is the part of the script I neeed to fix:

open (OUTFILE, ">$statfile" )
or die ( "Can't find $statfile : $!" );
print (OUTFILE "$header$ok$header$partial$header$failed");

system ("$mail_program $statfile -t $userlist ");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top