yes you can do something like this (very quick 
example - not tested):

<snip>
my $ping = `ping -c4 | tail -n1`; chomp($ping);
if ($ping =~ s/unreachable/)
{
        print <<EOF
        <html>
        <head><title>error</title>
        <body>
        <font color=red size=9> cannot reach machine </font
        </html>
        EOF
        ;
}
else
{
        print <<EOF
        <html>
        <head><title>ok</title>
        <body>
        <font color=green size=9> everything is ok </font
        </html>
        EOF
        ;
}
</snip>

On Thu, Sep 11, 2003 at 01:05:30PM +0000, Anadi Taylor wrote:
> 
> Hi Again,
> I want to run a perl script that does a check and depending on the results 
> of that check i want to run different HTML pages.
> For example: if the check is positive i want to run index1.htm else I want 
> to run index2.htm
> 
> can this be done ??
> 
> Thanks again
> 
> Anadi
> 
> 
> 
> You are just a dewdrop, and as you meditate the dewdrop starts slipping 
> from the petals of the Lotus towards the ocean. When the meditation is 
> complete, the dewdrop has disappeared into the ocean. Or you can say, the 
> ocean has disappeared into the dewdrop.
> 
> Bhagwan Shree Rajneesh.
> 
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends 
> http://www.msn.co.uk/messenger
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Mat Harrison
Technical Developer
3d Computer Systems Ltd.
[EMAIL PROTECTED]

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to