Nik has asked for the wisdom of the Perl Monks concerning the following question:

Any idea why the following wont work since backticks are interpolating and iam quoting the path?
I work on xp, tried very single combinations 2 hours now and i cant make it work.
print `"/Program Files/Apache Group/Apache2/bin/htpasswd" -b d:/www/pa +sswd.txt $username $password` or die $!;

2006-04-17 Retitled by planetscape, as per Monastery guidelines
Original title: 'Tryign to run shell commnd through Perl Source'

Replies are listed 'Best First'.
Re: Trying to run shell command through Perl Source
by McDarren (Abbot) on Apr 16, 2006 at 21:21 UTC
    Can you please define "wont work"?
    That is - what is the output/error that you get?

    Perhaps you might want to consider Apache::Htpasswd - as far as I can see, it should work fine on Win32.

    Cheers,
    Darren :)

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Trying to run shell command through Perl Source
by johngg (Canon) on Apr 16, 2006 at 22:12 UTC
    Just wondering if there should be a drive letter at the start of the command. Like C: or something. Just a thought.

    Cheers,

    JohnGG

    A reply falls below the community's threshold of quality. You may see it by logging in.