September 11th, 2000, 06:20 AM
if I have this in my script on the unix server;
@lines = 'ls -Atl *';
the command ls -Atl * is run and the result stored in @lines.
If I have this in my script on my windows machine;
@lines = 'dir/4/od';
well, it doesn't work. Double-quoting it just stores it as a string.
Can someone tell me how to write for Win 32 so that a command like the dir above is actually executed (and so that I can store the output in my array).
September 11th, 2000, 06:52 PM
' is a single quote
` is a backtick
You need to try backtick. As I said previously, I don't know if Perl for win32 understands backtick and have the same effect as Perl for UNIX.
September 11th, 2000, 10:12 PM
It does. I mean, at least when I tried it it worked as expected. Anyway, if it should fail for some reason, the man can always use system().