On Wed, May 02, 2001 at 03:16:41PM -0700, Peter Lemus wrote:
: Hi,
: I'm having some trouble trying to execute the followin
: command from a perl script.
: rmdir /s /q username #this works from the command line
: in win2k.
: I tried:
: system 'rmdir /s /q $user' # no luck. Any
: suggestions?
My first suggestion is to look at the '$?' variable, it holds the
error code for system() calls.
system( "romdir /s /q $user" ) || dir $?;
Second, you were using single quotes with a variabe ( $user ) inside.
That means that $user was getting sent to rmdir instead of the value
of $user. Examples:
$user = 'cwest';
print '$user'; # prints $user
print "$user"; # prints cwest
Casey West
--
"I'm going to memorize your name and throw my head away."
--Oscar Levant