Parameters is an array split by spaces, not a single string, use chomp instead of multiple gsub