Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@ranges = ([172,178],[183,189],[201,208]);
$input =~ s/(\d+)/(grep {$1 >= $_->[0] && $1 <= $_->[1]} @ranges) ? $s +ymbol : $1/eg;
@ranges = (); push @ranges, "[172,178]"; push @ranges, "[183,189]"; push @ranges, "[201,208]";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Super newbie array question
by 1nickt (Canon) on May 22, 2023 at 22:02 UTC | |
by Anonymous Monk on May 22, 2023 at 22:08 UTC | |
by Anonymous Monk on May 22, 2023 at 22:10 UTC | |
|
Re: Super newbie array question
by kcott (Archbishop) on May 23, 2023 at 00:12 UTC |