mhearse has asked for the wisdom of the Perl Monks concerning the following question:
I have a script which takes two arguments. A start datetime and and end datetime.
The script then does a binary search to the first occurrence of --start... and prints lines until it reaches --end. I'd like to make this a bit more user friendly. Mainly by not making the use enter a regex as --end. And instead taking a datetime Oct 10 05:59:59 and automatically creating a regex from it.. Is it possible to do this?script.pl --start ’Oct 10 05:50:’ --end ’Oct 10 05:5[0-2]:’
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: dynamic regex
by graff (Chancellor) on Dec 04, 2012 at 00:16 UTC | |
Re: dynamic regex
by LanX (Saint) on Dec 03, 2012 at 23:44 UTC | |
Re: dynamic regex
by Kenosis (Priest) on Dec 04, 2012 at 03:59 UTC |
Back to
Seekers of Perl Wisdom