in reply to Re: Sliding window revisited: Is it OK to make it so?
in thread Sliding window revisited: Is it OK to make it so?

Thanks LanX. I knew the links that you and choroba provided. But the advice given ibidem seemed to me like an endless loop. Probably yet another algorithm that I didn’t understand for a long time - or may be i got this notorious mental block again. But I begin to see the things more clearly now. And i guess that i need to read again some basic manpages to understand my stolen solution 🤪. Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Replies are listed 'Best First'.
Re^3: Sliding window revisited: Is it OK to make it so?
by LanX (Saint) on Jul 20, 2019 at 09:45 UTC
    Sorry I have trouble understanding all of this, that's why I gave a generic hint

    The example code you showed seems to slide over a fixed array, but when dealing with huge files you need a dynamic approach.

    Otherwise you wouldn't get the file into memory.

    Unless there is "lazy" magic connected to the array via tie*, but this must be in other parts of the module, which I never used

    In short, I'm confused what the question is and how to help.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    *) Yep seems so https://metacpan.org/pod/List::Gen#generators