Rajeev Prasad wrote:

thx, but when i am using it in a script i am getting error, from CLI
the same input is recognized as numeric and i get proper output. here
it is:

You said: "input would be: 32 bit hex value like: 0x00FE3453".


i am getting the input value by splitting a string to an array. does
split function makes the array values character?

$string = a:b:1:2:0x00D70803:0x00FE3490;

You didn't say that "0x00FE3453" would be a string, or part of a larger string.

And, by the way, that statement is not valid Perl. You have to use quotes of some kind to delimit strings.

$ perl -e'$string = a:b:1:2:0x00D70803:0x00FE3490;'
syntax error at -e line 1, near "a:"
Execution of -e aborted due to compilation errors.



John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction.                   -- Albert Einstein

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to