drock has asked for the wisdom of the Perl Monks concerning the following question:
I have tried to match a pattern stored in a variable like so 08/14/04.
I cannot get it to pull on certain dates from a file. My file looks like 08/14/04 timestampe exxxxxmy $dm=08/14/04; open F, file while (<F>) { if ( $_ =~ /$dm/ ) { blah blah blah } if ( $_ =~ m/^\$dm/ ) if ( $_ =~ m/[$dm]/ )
20040819 Edit by broquaint: Changed title from 'reg exp'
Back to
Seekers of Perl Wisdom