Hello,
To check if the file exists, use the -e operator:
if(-e $PROG){
system $PROG;
} else {
require Tk::Dialog;
...
...
}
Hope this helps,,,
Aziz,,,
In article <[EMAIL PROTECTED]>, "Jorge
Goncalvez" <[EMAIL PROTECTED]> wrote:
> Hi , I must implement a alert box in Perl Tk.
>
> And I have the following code:
>
> $PROG = "c:/cygwin/usr/sbin/inetd.exe";
>
> system($PROG) or
> require Tk::Dialog;
> $dialog =$mw-> Dialog( -title => 'INETD ALERT BOX',
> -text => "Fail to execute Inetd daemon",
> -font => "Arial 16 normal",
> -justify => 'center',
> -default_button => 'OK',
> -bitmap =>'error',
> -buttons => [qw/OK/] );
>
>
> $dialog->Show;
>
> And What I want is to popup an alert box when there is no Inetd.exe
> file in
> the computer.
> It works fine when this file is not present but when it exists the
> popup
> appears too.
> It seems to do always the second condition of the or.
>
> Why Thanks
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]