Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Comment on

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

You have some strange things going on at the top of your file. Comments interspersed:

my $words_file = @ARGV; # Evaluating an array in scalar context returns the length # of the array. So if you are passing your script one filename, # $words_file will equal '1', not the first argument from the # command line. Pass it two filenames, and it will equal 2, etc. # But that doesn't matter, because of another bug: open (my $fh, ">", $words_file); # Here you open the file for writing, but never use it. # (You should also check for errors, or use autodie.) my @words; while (<>) { push(@words, $_); } # Which turns out also not to matter, because you then use # the <> operator, which reads from the files in @ARGV # automagically. So lines 4 & 5 (the first two I quoted), # though broken, don't affect anything else, and could be # discarded.

Aaron B.
Available for small or large Perl jobs; see my home node.


In reply to Re: Looking for pointers or optimizations. by aaron_baugher
in thread Looking for pointers or optimizations. by thmsdrew

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!
  • 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?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (8)
    As of 2015-07-07 03:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (86 votes), past polls