Purpose: Display all ASCII characters in a column.
Result: It seems to have worked, but it is not displayed in a column and errors are still displayed below.
To display in a column, you need to add a line feed print("\n")after print(chr($x))
Why do you bite off the line feed character in the cycle from $ _ is not clear.
Perl could be much more concise: foreach(1..256){print (chr."\n")}