Thank you for that insight.

the script called `python content2.py`

when ran from the terminal, clobers and then creates a directory called /cachedata

but when this script is ran inside the perl script,

sub print_content { `python content2.py`; print header; print start_html(-title=>'Strain entry', -style=>{'src'=>'/Attempt_2.css', 'type'=>'text/css'}); start_form(-action=>'forensics.cgi?button=pushed'); print table({-'align'=>'left',-'border'=>'1', -'bordercolor'=>'CCC +CCC', -'width'=>'45%', -'cellspacing'=>'0', -'cellpadding'=>'0'}); opendir CACHE_DIR, $cache_dir or die "Cannot open $cache_dir: $!"; my $file; foreach $file (readdir CACHE_DIR) { my $current_file = $file; next if ($file =~ /^\./); $file = "peregrine.local/cgi-bin/final/$cache_dir/$file"; print Tr(td({-'bgcolor'=>'#D4E4F0'}, "<a href=http://$file>$cu +rrent_file</a>")) ."\n"; } }

the /cachedata is indeed clobered, but the new directory is not written?
any insight as to why?
my first guess was that the perl script was not waiting for the python script to finish.


In reply to Re^2: wait command syntax by jperlq
in thread wait command syntax by jperlq

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.