Monday, April 23, 2012

How do you schedule to shutdown computer after some mins (VISTA OS)?

@ECHO OFF
TITLE AUTO SHUTDOWN TIMER BY RABINDRA
SET /p min=Enter the number of mins :
SET /a sec=%min% * 60
TIMEOUT /T %sec% /NOBREAK >NUL
SHUTDOWN /s /t 0 /f

How do you set default value to a variable in Perl?

Use the '||=' or '|='operator.

For instance,

$color ||= 'Green';
will set $color to 'Green' if it is empty, undefined or contains zero. Otherwise it will retain its original value.