I have written a small script in Perl which I am executing on Windows with ActivePerl as below:
C:\Documents and Settings\Administrator> perl io.pl io.pl
#!/usr/bin/perl
use warnings;
sub test6 {
while (defined($_ = <>)) {
#chomp($_);
print $_;
}
}
test6;
As you can see, the code is similar to the Unix cat
command:
C:\Documents and Settings\Administrator> perl io.pl io.pl
If I want to execute this script without the perl
keyword on the command line, what needs to be done? I want the script to be executed as:
C:\Documents and Settings\Administrator> ./io.pl io.pl