This part doesn't look good (copy & paste?):

my $execf=$t2wp."swift -f $sounddir/message.txt -p audio/channels= +1,audio/volume=70,audio/sampling-rate=8000,audio/deada$ system( +$execf);

Despite the error here, my guess would be that the error message is generated by the call to system, not by perl. You could try to manually start the swift application with appropriate parameters to see if you can reproduce this error. Maybe it's the input file with wrong properties (too long, encoding, etc.) that is the primary root of the problem? So check that too.

Appending something like  > /tmp/swiftcall.log 2>&1 to $execf would be another approach. Run the Perl program and then have a look at /tmp/swiftcall.log - if you see the same error message there, its the call to swift that caused the problem. Here, the cause could be an updated binary or a mismatch with a dynamic library.

Running ldd or strace on /opt/swift/bin/swift and examining $LD_LIBRARY_PATH may provide further insights.

Finally, your program should check the return value of system. Security might be improved by using the system PROGRAM LIST form (but then the redirection-trick above would not work since the shell is no longer involved).

HTH, Perlbotics


In reply to Re: mail::imapclient + gmail + mmap() invalid argument by Perlbotics
in thread mail::imapclient + gmail + mmap() invalid argument by sara ibn el ahrache

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.