in reply to Process multiple input files using a one-liner

The problem is that $. is not reset to 1 when the diamond operator opens a new file. See eof on how to detect each file's end.
$. = 1 if eof;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Process multiple input files using a one-liner
by Discipulus (Canon) on Jan 28, 2016 at 12:39 UTC
    i think
    close ARGV if eof;
    is more adequate, me too i've resetted $. but is deprecable imho.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      Works perfectly now, thanks!