in reply to do 45-47 to array 45,46,47

If you mean "how do I initialize an array containing the values 45,46,47, and 48", the answer is simply this:

my @array = 45..48; print join(',', @array), "\n";

Output:

45,46,47,48

You can even combine ranges if you desire:

    my @array = (45..48, 88..99, 102..124);

If that's not what you actually were asking, please clarify. See How do I compose an effective node title?, How do I post a question effectively?