|
From: Aldo C. <da...@pe...> - 2001-02-14 10:39:19
|
christopher sagayam wrote:
> I might be slow to learn but
> Actually what Im concerned about is the while loop
> How do I get out of the while loop ?
>
> while ( ($status, $status_text) = RasGetConnectStatus($hrasconn) ) {
> }
>
> once the control goes into this loop how it is going to get out ?
> Or are these kinds of daemons possible in Win32::GUI ?
as I already said, it depends on your application. and I also add,
it depends on your Perl programming style :-)
a possible way could be:
$stay_in_loop = 1;
while ( $stay_in_loop ) {
($status, $status_text) = RasGetConnectStatus($hrasconn)
or $stay_in_loop = 0;
# ...body of the loop...
$MainWindow->DoEvents();
}
at this point, you could have for example a 'Stop' button which
can control the loop like this:
sub Stop_Click {
$stay_in_loop = 0;
}
but you may prefer a different approach...
cheers,
Aldo
__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;
|