I have two programs working on win32 system program 1: Create a TXT File and write data
$FH = FileHandle::Rollback->new("> $filepath") or die "cannot open fil +ehandle: $!"; select($FH); for my $i(0..$#{$temp_array1[0]}) { my $stringline=join(" ",@{$temp_array1[0]->[$i]}); print("$stringline \n"); } $FH->commit;
program2 : read TXT files and write them in one bin file
opendir(my $FILELIST,"temp")|| die $_; while(my $filename=readdir($FILELIST)) { my @temp_ref=grep{($_->{SecID}.substr($_->{Date},0,4).subs +tr($_->{Date},5,2).substr($_->{Date},8,2).".TXT") eq $filename}@Task_ +list; my $TaskRef=$temp_ref[0]; if((-e-r $TXTfilepath.$filename)&&defined($TaskRef)) { &writebin($TaskRef) } }
usually, I run program2 when program1 is finished, but now it is a need to run both on the same time,which means we need interprocess comunication between these two programs. I dont want to connect them in threads way, It is not stable on windows Xp . Is there any easy way to send task from program1 to program2 ,and let program2 waiting for task? thanks

In reply to send info between 2 programs by jiwei800715

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.