in reply to Re^4: Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)
in thread Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)
This may be of interest:
my @ranges = ('2..5,10..15', '2..5', 'die', '-2..5,10..15'); my $match = qr /^\d+\.{2}\d+(,\d+\.{2}\d+)*/; print ((m|$match| ? "ok: " : "Rejected: ") . "$_\n") for (@range +s);
No need to throw out the eval through pathalogical fear when validating the data in a simple fashion removes the danger of an exploit.
|
|---|