I am trying to open and print the contents of a text file I've named 'Text1.txt' which is in my perl folder. I'm running the code below using Komodo on my Mac Book Pro but it is not working, I keep getting the message "/bin/sh: open.pl: command not found". I'm new to Perl as they come, so could my error be explained in a simple manner. Thanks in advance.?
#!/user/bin/perl open(FILE, "Text1.txt"); while(<FILE>){ print "I saw $_ in Text1.txt\n"; } close FILE;
In reply to open and read text file by hchana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |