My first guess is that the string you put togther for $cmd is not being interpreted right by pdftohtml, and is just quickly failing. It's not that it isn't waiting. Try something like this instead: (experiment around till it works) :-)
#my $cmd = 'pdftohtml ' . $filename_pdf . ' ' . $filename_html . ' -no +f #+rames -c -i >/dev/null' ; #system("$cmd"); my @args = ( $filename_pdf, $filename_html, 'noframes', '-c-, '-i' , ' +>', '/dev/null' ); system ('pdftohtml', @args);
Sometimes programs want '>', '/dev/null' , separated. Others might want '> /dev/null' as a single string. Try some variations in the @arg list until you get the desired output. I remember one tricky program I had, that wouldn't accept @args like '-o', "$filename", but needed "-o $filename".... took me all day to figure it out by trial and error. :-)

UPDATE It was pointed out to me that the /dev/null redirection, may be nonsense, in this particular instance. It didn't make much sense to me either, when I first saw it, but I have seen other apps, like mplayer or mencoder, which required the following odd redirection

$pid = open(MP, "| mplayer @options init.mpg >/dev/null 2>&1 ");

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku

In reply to Re: Sytem Call Not Waiting by zentara
in thread Sytem Call Not Waiting by jai_dgl

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.