I have tried with =~ m/.{30}/
but it does not seem to work under windows
activestate Perl
is this possible
If that is a question (I can't see the question mark) then the answer is no. Since others already gave examples to the effect that it does work, perhaps you should show possibly with an actual example what it is that makes you think if fails to. Without explicit code one can only make guesses and since you used the word "defined", a possible one may be that you're expecting the above to match only on a string of exactly 30 charachters. But it will match also on a longer one, because it will match a string of exactly 30 charachters on a string of 30 or more.
Another possibility could be that the string you want to match on has newlines in it, and then you will need the s modifier.
Last, without further specifications, we may suspect an XY problem here, which may not be the case, but if you say explicitly what you're after, then we could be sure.
|