is($actual, $expected, $descriptionOfWhatYouTried); # to check effect of parameters passed to subroutine is(substr('abcdef', 0, 2), 'ab', q(tried subtr(..,0,2)}); # to check what got captured by a regular expression is(eval { 'abcdef' =~ /^(\w+)/; $1 }, 'ab', q{tried /^\w+/});