in reply to [Have solution now but am still puzzled] Why can't I give system the same command I've been giving to exec?

Are you sure that perl is doing the variable expansion ? If you' passing the string 'ftpscrpt -w $password -f $script_file' to the shell (or what passes for one in Windoze) via system(), then the 'shell' won't understand the $ variable names - since it DOS uses %<var>% to denote environment variables.

It might also pay to have a look round Dave Roths' website (www.roth.net) - invariably most helpful when Windoze problems are encountered...

.oO(I wonder if it might possibly be something to do with ftpscrpt requiring a controlling terminal to be attached? - Ah well, that's thinx bubbles for you;-))

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^2: Why can't I give system the same command I've been giving to exec?
by Narveson (Chaplain) on Nov 18, 2008 at 15:17 UTC
    Are you sure that perl is doing the variable expansion ?

    Yes, I print my command before passing it to exec, and get confirmation both from the printout and from the log file that's generated when the command runs under exec.

    Thanks for the Roth link.

    Thanks especially for the thought about the controlling terminal. I don't exactly know how to act on that thought, but this sounds like the kind of thing that might vary between exec and system.