in reply to Where automatic variable $_ doesn't work?

You can use select if sugar is so important:
select $fh; print while <>;

($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: Where automatic variable $_ doesn't work?
by GrandFather (Saint) on Jul 04, 2016 at 20:55 UTC

    However:

    print $fh while <>;

    is both shorter and clearer.

    Update: Argh! that falls foul of the OP's complaint. It needs to be:

    print $fh $_ while <>;

    to work as intended.

    Premature optimization is the root of all job security
      Although its output is quite different.

      ($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,
Re^2: Where automatic variable $_ doesn't work?
by guiwp (Sexton) on Jul 04, 2016 at 20:27 UTC

    I didn't known about select, Thank you!

    "if sugar is so important"

    When it's possible, I do like =)