in reply to Need to search for a string in a file
sub get_file_from_log(){ my $log_name=shift; open(my $log_file, "<", $log_name); my $file_name; while (<logFile>){ last if ($file_name) = /^Generated filename\s*=\s*(.+)$/; } return $file_name; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need to search for a string in a file
by jwkrahn (Abbot) on Oct 20, 2011 at 20:38 UTC | |
|
Re^2: Need to search for a string in a file
by akrrs7 (Acolyte) on Oct 20, 2011 at 11:51 UTC | |
by aartist (Pilgrim) on Oct 20, 2011 at 14:19 UTC | |
|
Re^2: Need to search for a string in a file
by anneli (Pilgrim) on Oct 20, 2011 at 21:25 UTC | |
by aaron_baugher (Curate) on Oct 20, 2011 at 22:29 UTC | |
by anneli (Pilgrim) on Oct 20, 2011 at 23:07 UTC | |
by aaron_baugher (Curate) on Oct 21, 2011 at 18:36 UTC |