How to read and write to an external program using Perl ?
Hi
There is en htpasswd.exe file used by apache server located in Bin directory. This file is used in order to handle different login functions on the server. I have tried to communicate with this exe using my perl script that looks like this:
#!C:\Perl\bin\perl.exe
# funktion.pl
use strict;
use warnings;
use IO::Handle;
use File::Spec;
use CPAN;
use Win32::Registry;
system ('C:\Perl\eg\htpasswd.exe -b logg user passwd'); #this one works but i would like to be more flexible and do it like this:
$str = 'C:\Perl\eg\htpasswd.exe -b logg user passwd';
system ($str);
#this one doesn't work, WHY ?
Is there any other (better) way of opening, reading and writing to an external program using Perl.
Thanks
|