RE: hi




ZHAO, BING <littleshrimp@xxxxxxxxxxxx> asked:
> How do you INPUT the output( of a file) to the
> designated file? To be specific, if the file being output
> generates a score/number which needs to be subsequently input
> into another file, how to you set up the output and input?
> Thannks a lot.

I'm not entirely sure I understood your question, but most
likely you're looking for a "pipe open", i.e.

if( open( OUT, '|/some/command' ) ){
print OUT "text is send to command";
} else {
die "open failed: $!"
}

This is a complicated subject that is best explained by the
perlipc and perlopen manual pages.

HTH,
Thomas

.



Relevant Pages

  • Re: two questions
    ... > On Thu, 6 Oct 2005, ZHAO, BING wrote: ... #19 Davis Road, ... Thomas town, ...
    (perl.beginners)
  • Re: delete file after on week
    ... ZHAO, BING wrote: ... You can set it up to run things from anywhere from every minute, to once a year (I think that's the limit of the scope of the cron time fields, I don't believe there is a year field). ...
    (perl.beginners)
  • Re: hi
    ... How do you INPUT the outputto the designated file? ... To be specific, if the file being output generates a score/number which needs to be subsequently input into another file, how to you set up the output and input? ... Do you have a Perl script that prints something to stdout and you want to redirect that output to some archive on disk instead of the console? ... do you want to do it from within the script or from the shell prompt? ...
    (perl.beginners)
  • Re: PS what is the correct/efficient function to create a file
    ... ZHAO, BING wrote: ... unlink $file works fine, but link $file doesn't even exist, ... know how to effectively create a file in some directory in perl? ...
    (perl.beginners)