get_copyright()

Copyright 2000-2008 Gabor Szabo, all rights reserved.

What if you don't want or can't realisticly expect an exact match with the result?

You can use like that compares with =~

examples/perl/t/copyright.t
use strict;
use warnings;

use lib 'lib';
use MyTools;

use Test::More tests => 2;

like( get_copyright(),
    qr/Copyright 2000-\d{4} Gabor Szabo, all rights reserved./, 'copyright');

like( get_copyright_broken(),
    qr/Copyright 2000-\d{4} Gabor Szabo, all rights reserved./, 'copyright');

perl t/copyright.t

1..2
ok 1 - copyright
not ok 2 - copyright
#   Failed test 'copyright'
#   at t/copyright.t line 11.
#               'Copyright 2000-19108 Gabor Szabo, all rights reserved.'
#     doesn't match
#       '(?-xism:Copyright 2000-\d{4} Gabor Szabo, all rights reserved.)'
# Looks like you failed 1 test of 2.