A slightly more readable version might be:
in reply to Re: split question
in thread split question
The reason for checking definedness is because of the potential for an erroneous year zero. (You might want to die on year 0 ... I dunno.)
my $inLine = "RPC, rpc #001b, (1987)";
my ($year) = $inLine =~ /\((\d+)\)/;
die "No year found in '$inLine'\n" unless defined $year;
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.