A friend of mine sent me a file to write
  to help get me started on programming Perl.
So I did (in notepad):

#!/usr/bin/perl -w
use strict;
while (<>) {
if ( /book/i or /bk/i) {
print;
}

He told me to name it findit.pl
I did.

Then he instructed me to write a text file named txtlist.txt.
and give it specific content (which I did).

Then I put them both in the same directory,
  navigate to the directory,
  and then I enter the command:

  perl  findit.pl   txtlist.txt

I am afraid I have messed it up somehow though.

When I run it in my ActivePerl.exe window --
  nothing happens.


When I run it in my dos window --
  I get an error message that says:

Missing right curly or square bracket at findit.pl line 6, at end of line
syntax error at findit.pl line 6, at EOF
Execution of findit.pl aborted due to compilation errors.



Do I need to compile this file before I use it?
I thought perl was a "self-compiling language".

What is it looking for?
Why didn't ActivePerl.exe run it?

Any help would be appreciated.


Thanks,
RL

Reply via email to