$!/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
In reply to Re: Find a filename in a text file
by Khen1950fx
in thread Find a filename in a text file
by jgatrell42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |