in reply to regex patterns

#!/usr/bin/perl use strict; use warnings; + die unless $ARGV[0]; my ($reg,$count) = (qr/$ARGV[0]/,0); open( my $fh, '<data.txt') or die; $count += scalar( my @m = m/$reg/g ) while( <$fh> ); print $count,"\n";


"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."