Well thanks to all who posted.

You exposed a flaw in my thought process... I was thinking of system(@xyz) as only suspending metachar expansion, but of course if I can't already do that in the shell why would it work in perl. I saw '>>' as part of the shell's command expansion. But I didn't realise that system(@abc) executes the called program directly, so does no shell expansion.

I hadn't realised that it would be so complicated for a late night 'simple' task.

I think that all the solutions posted (correct me if I'm wrong (again)) are effectively variations on using a pipe and capturing the output into the wanted file. For my comfort zone I'll stick with the core perl solution rather than the lower level IPC stuff.

Thanks for your time, I hope this question saves a few others from the confusion I created for myself


In reply to Re: Another system redirect problem by trendle
in thread Another system redirect problem by trendle

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.