On Wed, May 02, 2001 at 05:37:27PM -0400, Casey West wrote:
: 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 $?;

dir??? "Casey, that's supposed to be die(), dummy."

: 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

  Casey West

-- 
"We're thinking about upgrading from SunOS 4.1.1 to SunOS 3.5."
 --Henry Spencer

Reply via email to