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

Re^4: my new article, "A Romp Through Infinity"

by John M. Dlugosz (Monsignor)
on Aug 07, 2008 at 10:02 UTC ( [id://702846]=note: print w/replies, xml ) Need Help??


in reply to Re^3: my new article, "A Romp Through Infinity"
in thread my new article, "A Romp Through Infinity"

You would need a keyword or other syntactic marker, since a literal pair before anything else would not know its to be taken as an adverb.

Larry said that :lc would refer to the single use of the operator only, not the whole chain. The parser just could not work to apply it to the whole chain. But putting it first somehow would avoid that problem, so I like the idea in general. Basically, establish the options in a lexical scope and then use the operators as many times as you want.

For strings in particular, contextual variables might be good for controlling the default options. This is not a case of using different accessors -- you would want to compare strings using whatever rules rather than transforming (and copying) the whole string first. Especially when the comparison may decide after only a few characters, and not need to look at the whole string.

In your last example, :lc won't do anything to the numeric comparison. You have a more serious bug of using > where you meant gt. —John

  • Comment on Re^4: my new article, "A Romp Through Infinity"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://702846]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found