Did anyone knows why the following happens?
Please see the codes first:
---------------------------------------------------------------------------
#! user/bin/perl -w
use Win32;
$dbDestin="C:\\temp\\test.txt";
$dbdir="C:\\temp";
$name="Users";
$response=Win32::MsgBox("Are you sure to overwrite?",36);
if ($response==6) {
system("cacls $dbDestin /e /c /g $name:c") and die "$!";
system("cacls $dbdir /e /c /g $name:c") and die "$!";
}
------------------------------------------------------------------------------
After the window prompts, if you select "yes" by mouse, the program will halt on executing the first system call. But if you use "Ener" key to select "Yes" (keyboard), the program will go through. Does anyone know why this happens?
Please help me out! Thanks ahead!