Problem: You are given the input string "88-99", and you need to output each number from 88 to 99, inclusive.
$ perl -E'my ($lower, $upper) = split(/-/, pop); say for $lower .. $up +per' 88-99 88 89 90 91 92 93 94 95 96 97 98 99
The key here is the range (..) operator. From perldoc, the range operator returns a list of values counting (up by ones) from the left value to the right value.
In reply to Re: do 45-47 to array 45,46,47
by Lawliet
in thread do 45-47 to array 45,46,47
by Hossein
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |