On 07/14/2006 06:04 PM, Ryan Moszynski wrote:
Mumia,

thanks for your work on answering my help request.  [...]

You're welcome.


how do i get all of this inside my if statement?  [...]

Here's another example:

my @data = ('1-10;25;33;100-250', '1-10;25;33;x100-250',
    '1-10;25;33;100-250-90', '1-10;25;33-9-18;100-250',
    '1-10;25;33-18;100-250', '1-10;25;33-33;100-250');

foreach my $temp2 (@data) {
    my $list1 = $temp2;
    $list1 =~ s/(?:(\d+)-(\d+)|(\d+));?/
        $3 ? '' : ($2 >= $1 ? '' : 'y')
        /eg;
    if ('' eq $list1) {
        print "Yay: $temp2\n";
    } else {
        print "Boo: $temp2\n";
    }
}

__END__

Eat away at all of the valid ranges. If the eating is done,
but there's still something left in the string, the string fails.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to