I have managed to get this working on my Mac. My perl scripts needed to be stored in my home directory. Also when running the code using Komodo (as your stated in your reply) you need to write: perl filename.pl. I was not stating the perl pre-fix.The following code now works. Thanks for your help
#!\usr\bin perl use warnings; use strict; use diagnostics; open(FILE, "Text1.txt"); while(<FILE>){ print "I saw the following in Text.txt file:\n$_\n"; } close FILE;
In reply to Re^2: open and read text file
by hchana
in thread open and read text file
by hchana
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |