Hello,

I have the following piece of code:

--snip--
if ($_ eq "read") {
        open(fileid, "/tmp/mysql_lastid") || $lastid=0;
        $lastid = <fileid>;
        close(fileid);
        }
--snip--

With the fail of opening the file, I want the variable to be set to zero and print a message to standard out. How can I do both ?

Michael.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to