in reply to Re^3: Whats wrong in this code?
in thread Whats wrong in this code?

But you can apply tr/// only to a string, but grep applies to a list.

($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^5: Whats wrong in this code?
by Laurent_R (Canon) on Nov 18, 2016 at 18:14 UTC
    Yes, you're right, I spoke too quickly. tr/// can possibly replace the regex within the grep block, but can't replace grep itself.