in reply to Re^4: int's behaviour
in thread int's behaviour

Sorry, but I can't easily follow your code. It is not a self-contained program, you don't show the input values to your subroutine find_range and I don't see how your second subroutine, read_tagdata relates to the first subroutine at all. I imagine something like the following skeleton that shows us what values you pass in to find_range and also shows how these values are not what you expect:

#!/usr/bin/perl -w use strict; sub find_range { ... } print find_range('100/65535'); # prints 1, OK print find_range('1/1'); # prints warning and 255, OK print find_range('99/99999'); # prints 1, should print 2