in reply to regex with /s modifier does not provide the expected result

It works for me. Are you sure you send both the lines to the subroutine? If so, consider renaming the $line variable, as it can contain multiple lines.

Also, are you sure the class name should contain any whitespace following it? I'd move the \s+? outside the capture group.

($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: regex with /s modifier does not provide the expected result
by hunagyp (Initiate) on Aug 31, 2016 at 14:43 UTC
    Thank you, you are totally right - it's a shame for me, that I overlooked this. The $line variable did not contain the rest of the text... And on your second sentence: yes, I saw it but I wanted to take care of it later. Anyway, thanks for the heads up! :)