in reply to Regex question

Certainly even 1 million chars would not be a limit in a Perl regex. There is really no absolute limit, only performance issues.

Update: ok, in some systems the max limit will be limited by 16 bit positive integer.

Let's not get de-focused here, what is it that you are trying to do? .{250,1000} looks like a strange thing to do.

Your regex says at least 250 chars AND something less than or equal to 1,000 chars on that line. Meaning that 249 chars won't match. 1001 chars on the line won't match. 651 characters will match. What is the point and the application?

#!/usr/bin.perl -w use strict; my $test = "1234"; my @digits = ($test =~ m/^(.{4,5})$/); print "digits = @digits\n"; #prints digits = 1234 $test = "12345"; @digits = ($test =~ m/^(.{4,5})$/); print "digits = @digits\n"; #prints digits = 12345 $test = "123456"; @digits = ($test =~ m/^(.{4,5})$/); print "digits = @digits\n"; #prints digits =
There is another thread running about the difference been "nothing" and "undef" for an @var. There is a difference and the above shows it. The issue in that thread is Why? Not that this it is true. In this last example, @digits is "nothing", not undefined, same as @digits=();

The above will print..

digits = 1234 digits = 12345 digits =