"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?? |
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
In Section
Meditations
|
|