#!/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";
In reply to Re: regex patterns
by crouchingpenguin
in thread regex patterns
by dogbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |