Hi
There is en file htpasswd.exe 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 file 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 ? I got an error message "$str requires a special package...?
Is there any other (better) way of opening, reading and writing to an external program in Perl.
Thanks
There is en file htpasswd.exe 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 file 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 ? I got an error message "$str requires a special package...?
Is there any other (better) way of opening, reading and writing to an external program in Perl.
Thanks