note
tachyon
<p>Precedence and operator binding is the issue. But...why not just.....
<code>
if (open FH, $log) {
....send tail of log file...
} else {
....send "server is down. Perl say $!"
}
</code>
<p>Note the error code (string reason) is set in $! if open, print, close, mkdir, unlink.....fail. Internal Perl functions return 1 if they succeed, 0 or undef if they fail. If you want to do the <code> || $scalar = 'blah'</code> you can do this:
<code>
blah() || do{ $scalar = 'blah'; more_stuff() }
</code>
<div class="pmsig"><div class="pmsig-80749">
<p>cheers
<p><font color="#0000ff">tachyon</font>
</div></div>
310407
310407