Am very new to Perl,
My requirement is read one directory and search or match for particular file and handle read that file
I know its very easy to you people but i cannot do that so please give some guidance to complete this
i have listed by code below.
{
#!/usr/bin/perl
use strict;
use warnings;
use File::stat;
use File::Copy;
use Sys::Hostname;
$source_raw_directory = "/dfactory/data/raw/in/";
opendir (DIR,$source_raw_directory)
#foreach @array (grep(/hiea_._DeletedPatient\.txt$/,readdir(DIR)));
@array = grep (/\hiea_._DeletedPatient\.txt$/,readdir(DIR))
#print "@array";
closedir(DIR);
} am getting error like below
"Array found where operator expected at Deleted_Patient.pl line 45, at end of line (Missing operator before ?) syntax error at Deleted_Patient.pl line 45, near ")
#foreach @array (grep(/hiea_._DeletedPatient\.txt$/,readdir(DIR)));
@array "
Deleted_Patient.pl had compilation errors"
Thanks pandia