Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Comment on

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


I'd suggest not shelling out to sed to print a line. Instead, read the file into an array and print the appropriate line. That would be better than rescanning the file over and over. Or build an array of lines to print, then after the while loop, scan the file once, printing each line in your array.


When your only tool is a hammer, all problems look like your thumb.

In reply to Re: Need help to fine tune perl script to make it faster( currently taking more than 30 minutes) by roboticus
in thread Need help to fine tune perl script to make it faster( currently taking more than 30 minutes) by anujajoseph

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?

    What's my password?
    Create A New User
    [Your Mother]: Network, the 70's movie? Yes. Wonderful. Though it's been 20 years. Time to do it again.
    [Your Mother]: I miss the Sci-Fi authors of that era quite a lot...
    [LanX]: Network (1976 film) yeah
    [LanX]: yeah, we just had a discussion at work that SciFi in the 70s had more inovation
    [LanX]: (movies)
    [Your Mother]: Real ideas. Ideas grounded in reality as well.
    [LanX]: still some good newer ones. Oblivion had a great design, Moon was well acted
    [Your Mother]: Moon was mind bending and lovely and what's his nose Sam is *always* fun.
    [LanX]: the new BS Galactica series is my all time SoapFiction favourite ...
    [Your Mother]: I even liked "The Arrival" and I generally hate time travel (oriented) stuff.

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (9)
    As of 2018-03-19 15:06 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (240 votes). Check out past polls.