Thanks for clarifying my bug. Like I said I am coming in after someone and trying to clean up their code which had errors to begin with. I have tried it all ways with backticks without and every other permutation there of and when I used your code: my $sed_command = 'sed -e :a -e '$d;N;2,3ba' -e 'P;D' /db2/$DB2DBDFT/Messages/temp.txt'; I got this: Scalar found where operator expected at report.pl line 187, near "'sed -e :a -e '$d" (Missing operator before $d?) syntax error at report.pl line 187, near "'sed -e :a -e '$d" Bad name after ba' at report.pl line 187. Any who I got rid of that code plus 3 other lines and I get the same output from the email without any errors. This just illustrates the importance of commenting code because people come behind you and have to deal with your programs after you are long gone. Oops I couldn't my opinions to myself. THANK YOU to all of you that responded. I appreciate your help and explanations.

In reply to Re^6: Troubleshooting question by elittle
in thread Troubleshooting question by elittle

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.