in reply to Re: sending arguements to external program
in thread sending arguements to external program

I'm trying to avoid using any exertanl modules ... the system that it iwll ultimately run on only has a standard perl install.

Is it possible to pass an external program a variable at the command line that contains the contents of a file, so that the program runs it as such?
  • Comment on RE: Re: sending arguements to external program

Replies are listed 'Best First'.
RE: RE: Re: sending arguements to external program
by Fastolfe (Vicar) on Nov 09, 2000 at 19:09 UTC
    No. Command line arguments cannot exceed a small size. If you want to be passing larger amounts of data between applications, you need to use standard IPC techniques (see perlipc). Something like this:
    # in parent open(CHILD, "|other_program arg1 arg2") or die "other: $!"; print CHILD $large_amount_of_data; close(CHILD); # in child local $/; $large_amount_of_data = <STDIN>;
    Again, see perlipc for more examples and alternatives.