Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: xs modifying passed value

by afoken (Abbot)
on Nov 18, 2012 at 07:57 UTC ( #1004384=note: print w/replies, xml ) Need Help??


in reply to Re^2: xs modifying passed value
in thread xs modifying passed value

I always get em backwards

Easy: If you want to compare characters (strings, char* or char[] if you know C), use the operators made from characters (eq, ne, lt, gt, le, ge, cmp). If you want to compare numbers like in mathematics, use the operators you know from mathematics (==, !=, <, >, <=, >=, <=>).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: xs modifying passed value
by Festus Hagen (Novice) on Nov 19, 2012 at 13:31 UTC
    Excellent way to remember it ...

    Thank you!

    -Enjoy
    fh : )_~

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004384]
help
Chatterbox?
[ambrus]: Something you can have at home and your corner print shop, without a whole printing press's worth of equipment.
[ambrus]: As for TeX, I'm not trying to discourage anyone from writing carefully beautifully typeset documents, in maths or outside. But most people aren't willing to do that, and will spend only little time about the formatting,
[ambrus]: and try to leave everything else to automated systems without checking how what they write came out format-wise, and for those people, discounting the part about journals with a specific format above,
[ambrus]: just blindly recommending to use LaTeX is a bad idea now.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-09-26 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?