Sam Ravindhran <[EMAIL PROTECTED]> wrote on 10/24/2004 09:06:49 PM:
> The following lines of code taken from Unix fails for
> me on VMS:
> ----------------------
> if(open(EXEC_WRITER, "|$executable > $filename"))
> {
Snip!
> I get an error indicating that the ">" character is
> invalid in a command line. It looks like there is an
> attempt to redirect output to a file ($filename) the
> syntax of which fails. Is there a way to recode this
> to make it work on VMS or is it possible that I am
> missing some patch/fix for this problem? I am using
> Perl distribution at version 5.6.
> Appreciate any pointers.
> Thanks,
> Sam
Yep, that's an error. VMS DCL doesn't work at all the way a UNIX shell
does, and there's no general solution.
If you're a reasonably recent version of VMS, though, you can try
if(open(EXEC_WRITER, "|pipe $executable > $filename"))
If this doesn't work, your alternatives are more or less ugly:
If your executable supports the "/out=" qualifier, substitute it for the
">". Otherwise you may have to launch a DCL script to do your dirty work,
and I'm not sure off the top of my head how you get the assignment for
sys$input right.
Good luck,
Tom Wyant
This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender
by return e-mail and delete this e-mail from your system. Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer. This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html