Hi eventual,

On Mon, 20 Jun 2011 23:38:04 -0700 (PDT)
eventual <eventualde...@yahoo.com> wrote:

> Hi,
> Looking at the script below, how do I write a range of 10 to 80 as a regular
> expression. I tried [10 - 80] but it wont work.
> Thanks
> ##### script ##############
>  
> #!/usr/bin/perl
> 
> my $player_total_points = 70;
> if ( $player_total_points =~/^(10..80)$/ ){

Use:

if ($player_total_points =~ /\A(?:[1-7][0-9])|80\z/)

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/ways_to_do_it.html

The X in XSLT stands for eXtermination.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to