in reply to
Re^3: Search logs with crontab
in thread Search logs with crontab
"As to your original approach with replacing strings, this also can be done, but this requires opening file in "read-write" mode open(FILE, "+<mylog.file")."
There's also a potential "gotcha" here. That being; permissions. The subject file (in +RW) will require the maintenance of not only the current RWX bits, but that the script implementer has sufficient rights, and doesn't change ownership of said file.
All in all, seems keeping markers in a separate file would probably be the most sensible approach -- FAR less overhead.
use Perl::Always or die;
my $perl_version = (5.12.5);