in reply to Handling both string and numeric comparisons
You can force the numeric context for your string in the following fashion:
- if (0 + $param == 5) { ... }
perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Handling both string and numeric comparisons
by Roy Johnson (Monsignor) on May 12, 2005 at 12:01 UTC |
In Section
Seekers of Perl Wisdom