|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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). Cheers ------------------ |
|
#2
|
|||
|
|||
|
' 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. |
|
#3
|
|||
|
|||
|
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().
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Unix and Win probs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|