in reply to Regular expressionhelp

One way to do it is to use capturing parentheses (perlre):
use strict; use warnings; my $match = 'Warning: Found baddata Block list file: 231092'; if ( $match =~ /Warning: Found (\w+) Block/ ) { my $block_type = $1; print $block_type; }