perl: add sanity checks to t/perl/test_input_with_offset.pl