in reply to Re: Re^6.1: how to avoid full scan in file.
in thread how to avoid full scan in file.

It was great. The result of the script has showed is the same. Thank you. But I am little confusing about your code because there is some part I never have seen and I barely understand it. I do not know for where I have to start to see. Can you indicate any book or we can change some ideas about it? Send me a inbox message.
  • Comment on Re^2: Re^6.1: how to avoid full scan in file.

Replies are listed 'Best First'.
Re^3: Re^6.1: how to avoid full scan in file.
by poj (Abbot) on May 26, 2019 at 07:53 UTC

    If it's the use of hashes that is new to you then Perl Intro and References are good places to start.

    Use of the default loop variable $_ in the last code block is explained in Perl Variables

    For example, in your code

    foreach my $line ( @B ) { $k++; my $idx1= @$line[0].@$line[1].@$line[2];

    could be written using the default variable $_ as

    foreach ( @B ) { $k++; my $idx1 = $_->[0].$_->[1].$_->[2];
    poj