> > For example this command: > > > > system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null"; > > > > writes the "help" output to the screen, when it should be going to > > /dev/null. > > That may need to be handled by GNV, or HP C RTL folks as the redirection > is being handled by m4, presumably a C program in GNV, not by the Perl > system function.
I think that is wrong. The Perl system function should handle redirection that same on Unix as it does on VMS. I was able to work around the problem by rewriting the above as the following: system "bash -c \"$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null\""; which demonstrates the problem doesn't need to be handled by m4. > > >>>another is long command lines don't work. I suspect "system" is > >>>implemented with lib$spawn? > >> > >>Yes, system is implemented via lib$spawn, so as far as I know, > >>there's no way around DCL command line limits. You can see the > >>implementation in the Perl_do_spawn() function in [.vms]vms.c in the > >>Perl sources. > > The line limits are increased in 8.2, do you have access to the > pre-release code before the field test? I think that is also wrong. The method I described handles virtually unlimited command line lengths. Unless the DCL command line length liimit has been completely removed (which I find very unlikely but maybe worth asking about), it won't be enough for other than trivial scripts.