Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Nice approach. And my be merged with mine, e.g.:

#!/usr/bin/perl -l use strict; use warnings; my @fh=map { open my $fh, '<', $_ or die "Can't open `$_': $!\n"; $fh } @ARGV; no warnings 'uninitialized'; print while $_=join '', map { chomp(my $line=<$_>); $line } @fh, __END__

However:

  • you should s/undefined/uninitialized/;
  • it may not be fully reliable if empty lines are to be expected in the files.

Update: the second point was a thinko as Zaxo pointed out.


In reply to Re^2: parallel reading by blazar
in thread parallel reading by azaria

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Your Mother]: I think Trump might be better specifically because no one respects him so he won't get his way the way the others did.
    [Your Mother]: (I certainly did not vote for him and have been an outspoken critic of his for three decades, by the by.)
    [erix]: I'd like Russia threatened a bit more, flattered a bit less
    [Your Mother]: The last two regimes killed a million, displaced 10 million, torture prisons, and ruined countries… somehow it's magically bad _now_.
    [erix]: what/who are the last two regimes?
    [Your Mother]: Bush/Obama. 15 straight years of warfare, torture, etc, etc.
    [Your Mother]: All caused by the political fallout of Carter/Reagan when the Afghan chickens came home to roost on 9/11.
    [Your Mother]: US foreign policy is toxic and like a broken record.
    [erix]: still, dismantling NATO is a /bad/ idea
    [Your Mother]: I know. I am a buzzkill.

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (5)
    As of 2017-01-20 01:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you watch meteor showers?




      Results (173 votes). Check out past polls.