in reply to Close a file and reopen a new one at midnight
You have to use a global variable of an open file:
In addition, are you assured that at this time there is data on the socket for reading?
my $file; open $file, ">$filename" || die("Couldn't open file"); ...
In addition, are you assured that at this time there is data on the socket for reading?
In Section
Seekers of Perl Wisdom