Is there a generic way to do comparison both numeric and string in Perl? -
Is there a generic way to do comparison both numeric and string in Perl? -
as knows, numeric's comparing uses different operators string's. there generic way comparing both numeric , string in perl ? should check value numeric or string before doing comparison? freshman in perl. please help if have idea. thanks.
in add-on ways mentioned, when using perl > 5.10.1, smart matching can used. @ lines 29 .. 32 in referenced table. if 1 operand number, numeric comparing used, otherwise fallback string.
string perl numeric
Comments
Post a Comment