Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You're free to use another implementation if you don't want to use perl's

I wasn't trying to imply that I have a better recommendation - I don't.
Personally, I will just use lc(), as it is quite adequate for the situations in which I use it.
However, just as there are situations in which lc() does not do the right thing, there are also portability issues with fc() - and I think it would have been better if you had mentioned those portability issues when you said that "fc should be used for case-insensitive comparisons, not lc".

I suspect that *you* are so well aware of that portability issue, that it didn't even occur to you to mention it.
But dumb pricks like me are not so quick on the uptake, especially when the crucial information is held back until the very end of the documentation (not your fault).

This is one of the interesting aspects of the way that Larry Wall has "stitched up" perl5.
In a normal situation, if there were a number of features that we wished to add to perl, the porters would just release a new version of perl named "perl-6.0.0" - a version of perl that provided those new features whilst promising no compatibility (yet providing extensive compatibility) with perl-5.x.x.
But Larry has successfully (and with deliberate intention) ensured that can't happen.
Therefore, in accordance with the backward-compatibility of perl-5.x.x, the only way that new features can be added is via 'use feature'.
I expect that, by about perl-5.36.0, the recommendation will no longer be that you start your perl script with:
use strict; use warnings;
Rather, it will be that you begin your scripts with:
use strict; use warnings; use feature ':5.26.0';
And, with 5.46.0, you begin your scripts with:
use strict; use warnings; use feature ':5.36.0';
... or something along those lines.

The disappointing thing about that is that there's a large number of monks here (1nickt ++ is a notable exception) who think that's completely acceptable.

Cheers,
Rob

In reply to Re^5: Can we make hash key check in 'if' condition case insensitive? by syphilis
in thread [SOLVED: Can we make hash key check in 'if' condition case insensitive? by Perl300

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 cooling their heels in the Monastery: (8)
As of 2024-04-18 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found