Welcome to Perl! You should be aware that the korn shell you invoked with
#!/usr/bin/env ksh is a different language to Perl, use one or the other. The second
#! line does not invoke perl, it is merely seen as a comment. The error is probably because korn shell does not allow spaces around the '=' in an assignment, but more flexible languages, like Perl, do.
I noticed that you are invoking ksh using env(1), and wonder if you should be doing the same for perl. You are not using
strict and
warnings. I known this is only a simple basic script, but scripts never get any smaller! It is worth always using them, no matter how trivial the program.
Here is my version:
#!/usr/bin/perl
use warnings;
use strict;
my $inputline = 34;
print "$inputline\n";
Have fun!
Update: corrected typo (thanks
Anomalous Monk)