in reply to searching all directories with perl

Use File::Find - it comes with Perl. This task would be even easier to do using File::Find::Rule, actually.
my @matching_file = File::Find::Rule ->file() ->name( '*.html' ) ->grep( qr/\Q$keyword/ ) ->in( "." );

Makeshifts last the longest.