use strict; use warnings; use Test::More tests => 1; my $corpus = q{foobar}; my $lookfor = q{}; my $res = index ($corpus, $lookfor) > -1 ? 1 : 0; ok $res, 'Substring found';