in reply to Testing CLI commands on Windows machines

Do I need to detect the OS and write a special command for Windows?

Yes - one solution for windows would be to execute the command as `bin\\anki_import`.

Maybe I can just cd into the bin and execute from there?

That would also work.

Update: Just realised that, as regards running system commands in perl (as opposed to running the command from the command line prompt), `bin/anki_import` should be fine on Windows so long as "anki_import" is recognized as an executable. If windows doesn't recognize "anki_import" as an executable, then you get the message you reported.
So ... maybe that's your problem. Does "anki_import" have an extension that windows recognizes as executable ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Testing CLI commands on Windows machines
by nysus (Parson) on Sep 12, 2018 at 15:00 UTC
    anki_import is just an executable perl script.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      Unfortunately, MS Windows doesn't know what to do with a file that has no extension. Maybe a MS Windows expert could make it work, but I'm pretty sure that would not be a good idea on Windows.

      Assuming the .pl extension is properly registered and associated with perl.exe, MS Windows will "open" the program using perl.exe, which will then run it.

      However, the most common way to run Perl (or other compile-on-execute (or interpreted) languages) is to create a .bat file to run the program.