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??

The condition is not "dense".

I didn't say it was dense. What does that even mean? At what point does something become dense? How can you claim it is or isn't dense?

I said the "condition is so dense you missed that it devolves into an infinite loop of prints and warns." You tried to jam so much into a single expression that you got the expression wrong. Worse, and maybe even more importantly, it's very hard to notice that it's wrong because it's so dense. I only noticed when I rewrote your code.

Works fine for me

How would you know? You didn't try giving EOF or an error. The fact that your code doesn't handle this immediately stood out after a rewrite.

I am sure that there are many Monks who will disagree with style issues!

Sure, but when it's so hard to read that errors crop in, and when the other alternative makes the error obvious, we start leaving the realm of subjectiveness and entering the realm of objectiveness.

Also, it leaks the $line variable to the surrounding scope.

Seeking work! You can reach me at ikegami@adaelis.com


In reply to Re^5: $_ not set in while <> by ikegami
in thread $_ not set in while <> by pidloop

Title:
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-09-25 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?