I've tried your suggestions and the program still stalls at the same point. As for the "$count =((...." line, that's probably the only part of the program that I'm sure is working properly. The $count variable takes the form of "1" if a change is made and stays null if no changes are made. If a match is found, the $change variable copies the $_ variable and then all of the $change variable characters are replaced with 00s. I think that there is some kind of conflict between the loop and the promptUser subroutine. I've tried using the promptUser command within a while loop and a foreach loop and it only works once in each of them and then stalls. However, the promptUser command works fine outside of a loop. Where is the conflict? Why is this happening?

In reply to Re^2: perl command line prompts by pccode
in thread perl command line prompts by pccode

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.