Thanks for your assistance. I have made the modifications; however, still receive the following errors:
"my" variable @values masks earlier declaration in same scope at ./perlnbe.pl line 25.
syntax error at ./perlnbe.pl line 25, near "$values["
Execution of ./perlnbe.pl aborted due to compilation errors.
#!/usr/bin/perl -w
use strict;
use warnings;
# Open the current directory
my $directory = '.';
# Read from the current directory
opendir (DIR, $directory) or die "Folder not found: $!";
while (my $File = readdir(DIR)) {
if ($File =~/\.nbe$/){
open (File, my $File) or die "Could not open NBE file:";
while (my $line = <FILE> )
{
if ($line =~/results/)
{
our @values = split (/\|/, $line);
print my $values[3];
}
}
}
I would appreciate any recommendations.