From: Michael Norris <[EMAIL PROTECTED]>
> In my early (very early) stages of learning perl I've run into a
> conflict. I have access to two linux machines that I practice on (I
> do not have admin rights). The following is a simple script from
> "Learning Perl." Problem is, it runs on one linux box , but not the
> other.
>
> Here is the code:
>
> #!/usr/bin/perl -w
> use strict;
>
> print "Enter password files: \n";
> chomp(my @file = <STDIN>);
> my @reverselist = reverse @file;
> print "@reverselist\n";
>
>
> On the box that it doesn't run on, I get this error:
>
> syntax error at /home/mnorris/perlscripts/lp7.3 line 8, at EOF
> Execution of /home/mnorris/perlscripts/lp7.3 aborted due to
> compilation errors.
Most probably this perl is a little dated.
Try to run
perl -v
on both and compare the results.
The most likely culprit is the
chomp(my @file = <STDIN>);
try
my @file;
chomp(@file = <STDIN>);
instead.
Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]