in reply to split and @
print "$input[$len-1]"; # splits properly into 4
You can just change it to simply:
print "@input";
---output---