in reply to Re: Search, Match, Compare, and Report
in thread Search, Match, Compare, and Report

Looks interesting, what local *_; actually does in this code?

BTW, There are few missing brackets & $keys{$id}++ meant to be $ids{$id}++ in your code right below the for loop.

  • Comment on Re^2: Search, Match, Compare, and Report

Replies are listed 'Best First'.
Re^3: Search, Match, Compare, and Report
by ikegami (Patriarch) on Feb 01, 2010 at 03:11 UTC
    while (<...>)
    is short for
    while (defined($_ = <...>))

    local *_; prevents the clobbering of the parent's $_. my $_; would also do the trick in Perl 5.10+

      Thanks for clarifying