#!/usr/bin/perl use strict; use warnings; my $errors = undef; sub ok { my( $test, $name ) = @_; print "[[[$test]]] [[[$name]]]\n"; }; ok( ($errors && ($errors->[0] =~ /Journal file not found/i)), "some text 1 $errors->[0]" ); ok( ($errors && ($errors->[0] =~ /Journal file not found/i)), "some text 2 $errors->[0]" );