On Thursday 31 January 2002 21:03, Dave Storrs wrote: > > Just a thought...the following would be *really* cool: > > my $pi = Pi::Generate; > > # Check the first 200 characters only; halt w/success if NO match > print "There's a letter in here!\n" if ($pi =~ /[a-z]/h200t);
print "There's a letter in here!\n" if ($pi !~ /^.{0,199}?[a-z]/); > > # Check the first 200 characters only; halt w/failure if NO match > print "There's a letter in here!\n" if ($pi =~ /[a-z]/h200f); print "There's a letter in here!\n" if ($pi =~ /^.{0,199}?[a-z]/); > > > This would be useful for cases where you might be dealing with > infinite data, or when you are only going to need to use the first section > of a string. substr, maybe? -- Bryan C. Warnock [EMAIL PROTECTED]