in reply to Re^2: matching a defined lenght
in thread matching a defined lenght

Didn't you accidentally omit the capturing parentheses? Shouldn't it be written as /(.{30})/ instead? You don't need m// here, since you didn't change the standard delimiters (//).

But we're still unkowingly what you like to achieve, since your description was a bit ambiguous and you didn't show us some excerpts from your code in question.