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"; [download]