For what other pairings of data types does eq ignore type?
eq pays no attention to the type whatsoever. eq stringifies its operands and compares those strings.
>perl -le"print( undef eq '' )"
>perl -le"print( 123 eq '123' )"
>perl -le"$r=\$s; print( $r eq sprintf('SCALAR(0x%x)', 0+$r) )"
>perl -le"print( qr/a/ eq '(?-xism:a)' )"
I know there is a way to overload operators but I was under the impression that one had to "use overload" to empower it
You use use overload to add overloading to a class, not to decide whether or not overloading will occur.
Regex pattern objects are magical. Overloading doesn't even come into play.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||