in reply to perl cgi without webserver?
It lists the files you have in your current directory, assuming you have ls.exe in your DOS PATH. "dir" won't work since it's a command within command.com or DOS shell, not a executable by itself.<html> <head> <TITLE>my tiny weeny tady lil test...</TITLE> <HTA:APPLICATION ID="HTAEx" APPLICATIONNAME="HTAEx" ICON="e.ico" WINDOWSTATE="normal" > </head> <body> <pre> <SCRIPT language="PerlScript"> use Win32::Script qw/WScript/ ; $output = WScript('Shell')->Exec("ls")->StdOut->ReadAll ; $window->document->write("\nFiles:\n\n$output") ; </SCRIPT> </pre> </body> </html>
|
|---|