Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
to RG - Lisp lunacy and Perl psychosis
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jürgen Exner, post: 4872014"] perldoc perlop: Binary "!=" returns true if the left argument is numerically not equal to the right argument. Depends on where they are used. Some common uses include enclosure of code block (perldoc perlsyn) and indexing of hashes (perldoc perldata). perldoc perlre: In addition, Perl defines the following: \d Match a digit character It's all there. Granted, in particular perlop is hopelessly overloaded and therefore information is hard to find, but you are very welcome to improve it. In other words: you have a very limited vocabulary. Sure, that makes it much easier to learn the vocabulary, there are just much fewer words to learn. But at the same time you are paying for this advantage with lenghty sentences (=code) to express the same content (=algorithm). Wasn't it the Inuit language, that has over 50 different words for snow? To express the same differentiation in other languages you need half a sentence for what Inuit can do in a single word. That Perl code clearly qualifies as obfuscuted, no sane programmer would write code like that. Ben already demonstrated how equivalent, actual, readable Perl code would look like. Why would you want to distinguish between them on such a low level? A scalar is all those simultaneously and you can use whichever version you need at any given moment. No awkward conversion from int to string only because you want to print that value, no need for special conversion from text (just read from a file or user input) to floating point to do some calculations. Seems very convenient to me. Well, those are very different animals. Strings are data while REs are code. Perl most certainly does clearly differentiate between strings (=data) and code, although you can breach the border using eval() or in REs. Yes, you can. See perldoc perlvar, perldoc perlop, perldoc perlop. If you don't want variables ($12) to be interpolated, then don't use quotes that interpolate variables: print 'The widget costs $12.75.' jue [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
to RG - Lisp lunacy and Perl psychosis
Top