in reply to How can I execute "eval" command in WINDOWS 2000?

You need an else { die $@ } for your if ($@ eq "alarm\n") and you'd see that calling alarm on Win32 gives:

The Unsupported function alarm function is unimplemented at
which prevents the rest of the evaled block from running.

                - tye

Replies are listed 'Best First'.
Re: Re: How can I execute "eval" command in WINDOWS 2000? (alarm)
by bart (Canon) on Jan 12, 2004 at 19:12 UTC
    But alarm does work on ActivePerl 5.8.x (tested with ActivePerl 5.8.0, Build 804), by contrast to 5.6.1 and earlier.
      According to your suggestion I have upgraded perl from v5.61. to v5.8.2 build 808 to get alarm function. But now I am facing a different problem. In my perl script I used win32-setupsup module to install a GUI based software and after installion completed, machine is rebooted and this reboot is the forceful reboot as the perl script is running. In v5.6.1 this is running fine but when I am testing with v5.8.2 then in the rebooting time I am getting an error which is telling thet failed to terminate programme and the execution of script is stopped at that point. Any pointer how can I resolve this problem.
      Thanks in advance.
      Regards
      -Pijush
Re: Re: How can I execute "eval" command in WINDOWS 2000? (alarm)
by pijush (Scribe) on Jan 12, 2004 at 17:36 UTC
    yes. you are right. I put two print statement before and after alarm call and it printed the print statement which is before the alarm call. Can you suggest how can I execute the programme successfully?
    TIA
    -Pijush