Hi Jorge

You can define the host name as a string eg.
$host = "hostname";
where hostname represents the host name on your network,
and then refer to the string in the ping command:
unless ($p->ping($host))

Hope this helps
Robert Graham

> Hi I have the following code:
>
> use Net::Ping;
> $p = Net::Ping->new();
> unless ($p->ping(cu5s46))
> {
> require Tk::Dialog;
>         $dialog =$mw-> Dialog( -title => 'NETWORK ALERT BOX',
>                -text => "THE NETWORK IS DOWN",
>        -font => "Arial 16 normal",
>                -justify => 'center',
>                -default_button => 'OK',
>                -bitmap =>'error',
>        -buttons => [qw/OK/] );
>
>
>         $dialog->Show;
> }
>
>
> $p->close;
>
>
> But I would like to put a variable instead of cu5s46, a variable which
could
> represent some host name in my network.
>
> How can i do this?Thanks
>
> ------------- End Forwarded Message -------------
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to