Merlyn, I'm quite the newbie, and have only dipped my monastic toe into the pond of REGEX and haven't touched reading files at all, so this looks like a great place for me to learn something. ;)

A few weeks ago there was a math challenge posted (sorry I don't remember the node ID) about finding the shortest intiger that contained all the successive intigers from 0000 to 9999. In this particular problem, if the file contained only the number sequence "12345" would /^(\d+)/ pick up 12, 34, 45, 234, or even 12345 as .found elements? Why or why not? Coming from a programing language that isn't as text based as Perl (hey, I forgot to mention the language name!) I find regexes useful and a little difficult to wrap my brain around, even after RTFM a few times (okay, after reading the Indigo Perl version of the friendly manual!). Thanks for any insight.

Looking to learn!
Petras.
Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

-Howard Aiken

In reply to Re^2: Array: inserting what isn't there by Petras
in thread Array: inserting what isn't there by Anonymous Monk

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.