Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Try not to get hung up on the "switch" issue. In my view given/when is a fine addition to the language, but it came bundled with the smart match operator. It turned out the smart match operator was a bad idea (much too powerful and arcane) and unfortunately, because it was bundled with given/when, given/when acquired the same bad rep. As eyepopslikeamosquito suggests, there are other ways to do it - and that is really a cornerstone of Perl: there are many ways to do most things so you can play around and see what works best for you and the task at hand.

Perl is a great language for this sort of task where you are munging files. But tricky stuff is tricky stuff and all a good language can do is make it easier to think about the key parts of the problem while it hides the boring stuff away. If someone else hasn't already done the job for you (or you can't find it) and you don't want to pay someone to do it, ya just gotta do the tricky stuff.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

In reply to Re^6: Yet another config file editing programme : Tell me how to make it better ! by GrandFather
in thread Yet another config file editing programme : Tell me how to make it better ! by dazz

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 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?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-26 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found