in reply to Re: Reduce the time taken for Huge Log files
in thread Reduce the time taken for Huge Log files

Hi Holli,
I tried your code with little modification and it was
really helpful.Thanks a lot. But i am stuck.
I have some lines having https:// and some lines having no
http:// at all.
I tried out some combimations of reg ex,but no luck.
Please advise.
Thanks
  • Comment on Re^2: Reduce the time taken for Huge Log files

Replies are listed 'Best First'.
Re^3: Reduce the time taken for Huge Log files
by holli (Abbot) on Mar 18, 2005 at 15:23 UTC
    I just noticed the address is also at the very end of every string, so:
    m-"([^\"]+)"$-
    will do.


    holli, /regexed monk/
Re^3: Reduce the time taken for Huge Log files
by Random_Walk (Prior) on Mar 18, 2005 at 15:24 UTC

    If you do not need to know if it was https you can reduce them all to http:// when you read each line in with something like s!https://!http://!; just after the while(<DATA>) {. Note the use of ! as a regex delimiter stops you having a quoting nightmare with the //

    Cheers,
    R.

    Pereant, qui ante nos nostra dixerunt!