stream_test.pl: integer logic