1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Milton Keynes, Bucks, England
    Rep Power
    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).


  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    ' 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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    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().

IMN logo majestic logo threadwatch logo seochat tools logo