> Ted wrote:
>> mysql -u my_uid --password=my_pword --database=my_db <
> This illustrates something you should understand about shell command
> processing if you're going to use the system() call from Perl.
> The shell don't pass all the args you see above to the child process.
> Specifically, redirects with ">" or "<" or "|" are handled by the shell,
> by remapping the file descriptors of the child process.
> Once the file descriptors are set up for the child process, then the
> remainder of the command line is passed to that child process as it
> exec's the named program. This is basically the way most UNIX shells
> work, with respect to I/O redirection.
> If you want to learn more about this, read POSIX C API docs on system
> calls like dup(), dup2(), execl(), fork(), etc.
> As far as I can tell, the modern "cmd.exe" on Windows works the same,
> though I believe the older DOS command shells actually pass the "<"
> redirection symbol to the child processes as arguments. But the mysql
> client assumes it's being run by the modern type of shell, and does not
> recognize "<" as an argument.
> The mysql client application provides a way to load a script without
> redirecting I/O. You can execute the literal client statement "SOURCE
> <file>" from the command line, using the mysql -e option.
> For example:
> my args =
> print system(args);
> Bill K.