in reply to formatting substitute and arrays
2) should work something like :
print PLOT (map {sprintf "%.5f", $_} @a), "\n" or print PLOT (sprintf "%.5f"x@a, @a), "\n"