ok so trying to accomplish this task differently and on my own I am stuck once again. here is what I have..
$_ = "this is my program to reverse";
s/(\w+) (\w+)/$2 $1/;
print;
obviously this only swaps the first two words. I cannot figure out how to swap the first and last word this way. Is it even possible? I literally spent most of the day working on a program and this is the only thing I am stuck on. Please help.