http://qs1969.pair.com?node_id=54017


in reply to Re: Testing a string for a range of characters
in thread Testing a string for a range of characters

The test will be repeated possibly thousands of times, as records are read in from an array, but I agree, if it was only going to be a one off, then I'd probably have left it as a regex.

Pete

Replies are listed 'Best First'.
Re: Re: Re: Testing a string for a range of characters
by Fastolfe (Vicar) on Jan 24, 2001 at 20:31 UTC
    If you're reading these in from an array, I wonder if a test like this might be faster:
    my @array = get_block_of_data; data_is_bad if join("", @array) =~ /[^A-Z]/;