in reply to Find a filename in a text file
$!/usr/bin/perl use strict; use warnings; use List::Util qw(first); open(LOG, "LogFilename") or die "Unable to open logfile:$!\n"; while(<LOG>){ print if/\btest1.txt\b/i; } close(LOG);
updated: Fixed typo noted by jwkrahn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find a filename in a text file
by jwkrahn (Abbot) on Feb 12, 2008 at 02:46 UTC |