I am opening a file and just want to check to make sure that the file is
being read correctly therefore I am using the following piece of code but
getting an error message but according to what I have read it is formatted
correctly.
1. #/usr/bin/perl
2. #open a file with the filehandle
3.
4.
5. open WORKFLOW, "..\\..\\workflow.txt" or die "Cannot open Workflow
$!\n";
6. While (<WORKFLOW>){
7. #chomp; #a)
8. my $line=$_;
9. Print STDRR "\nline: $line";
10. }
ERROR MESSAGE:
syntax error at test line 6, near "){"
Can't use global $_ in "my" at test line 8, near "=$
syntax error at test line 10, near "}"
Execution of test aborted due to compilation errors.
Does anyone know what I am doing wrong?
Thank you
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]