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

I feel that i was misunderstood .. sorry. THe array contains the contents of the file, not the file name itself ...
  • 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:02 UTC
    So you're trying to pass the contents of the file as an argument to your program? That's not going to work unless the contents of the file are small and suitable to be passed on the command line. Otherwise, consider using pipes (see perlipc) and sending the data to the other program some other way. Like I said above, this works for me:
    @array = ("file1", "file2"); @output = `cat @array`; # @output now has the output of that command
    Either you did not explain your problem correctly, something is not as you say it is (check assumptions), or something is screwey with your particular system.

    Either way, if @array had a large amount of data in it, I would still not expect the error message you received. Be sure you're using strict and running Perl with the -w flag turned on (or 'use warnings' in 5.6). This might point you in the direction of the problem.