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

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -