in reply to Re^2: improve script
in thread improve script

So, what's your solution?
($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^4: improve script
by afoken (Chancellor) on Nov 28, 2015 at 16:53 UTC
    if ( somecondition ) { print "..."; exit; }

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Or just:

      print( "$1\n" ), exit if /.../;

      Or even:

      die "$!\n" if /.../;

      Which seems to capture the semantics perfectly.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.
        > Which seems to capture the semantics perfectly.

        Yes, except it's printing to STDERR not STDOUT.

        That's complicating things if sh has to capture the output.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

      It wouldn't print anything if STDOUT was closed, though.
      ($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,