tcf03 has asked for the wisdom of the Perl Monks concerning the following question:
Basically the $MM1 - $MM6 are dates that Im searching for and $SEARCH-$SEARCH2 are Items Im searching for within those dates...sub search_file { my ($filename) = @_; open (TMPFILE, "$filename") or die("unable to open $filename: $!\n +"),br; print h3("$_\n"); while (<TMPFILE>) { if ( m/^....($MM1|$MM2|$MM3|$MM4|$MM5|$MM6)/) { s/($SEARCH|$SEARCH1|$SEARCH2)/<font color=\"#0000ff\"><b>$ +1<\/b><\/font>/o; print "$_\n",br; } } close (TMPFILE); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reusing temporary search output
by perrin (Chancellor) on May 02, 2005 at 22:46 UTC | |
by tcf03 (Deacon) on May 03, 2005 at 00:04 UTC | |
|
Re: reusing temporary search output
by Fletch (Bishop) on May 02, 2005 at 15:27 UTC |