Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I do have some sample text in my origional post. That is simular to what can be found in my text file, except there are 26 of one type of tool, 20 of another type, and 10 of another. I am only conserned with the first 26. My actual code is:

while (<PD_FILE>){ if (/$tool_number/) $continue = 1; } if (/$end_tool/) $continue = 0; } if ($continue){ print $_; } }

the value for $tool_number is Tool01 which will and does give $end_tool a value of Tool02. Everything that I have checked up to this point seems to work except the loop. I tried some code that was posted as a reply to another question.
while (<^(*?)$tool_number(.*)$/) {

that did not seem to work either.


In reply to Re: Re: Reading entire file. by stuffy
in thread Reading entire file. by stuffy

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2021-11-28 08:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found