Help for this page
my $str = 'this is some text 1989 blah'; my $year; $year = $1 if( $str =~ /\b((?:19|20)\d\d)\b/ );
sub find_year { my( $str ) = @_; ... if( $str =~ /\b((?:19|20)\d\d)\b/ ); return $year }