Unless you have a reason for specifically using Perl, the shutdown.exe program that is usually located in %systemroot%\system32 directory will allow you to easily perform your task. Just type shutdown.exe /? at the command prompt to display the options.
Thanks,UPDATE: or you could just read the above post Re: Automatic Windows Reboot using Perl
In reply to Re: Automatic Windows Reboot using Perl
by gawatkins
in thread Automatic Windows Reboot using Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |