in reply to Nonsense error from Perl

You're missing a lot of semicolons. I get

$ perl junk Scalar found where operator expected at junk line 5, near ") $x" (Missing semicolon on previous line?) syntax error at junk line 4, near ", ..." Execution of junk aborted due to compilation errors.

But I'm using a very modern perl, 5.14.1