I'm trying to get the dump of each file into an array from a unix command in a Perl script. below is the error I'm getting. Could anyone please help me fix this issue?
Can't locate object method "cat" via package "C:/prac/cmm_ping.txt" (perhaps you forgot to load "C:/test/cmm_ping.txt"?) at fandd.pl line 25.
below is my program
#!/usr/bin/perl
use warnings;
@files=glob("C:/prac/*");
foreach $file (@files){
@data=system(cat $file);
foreach $line (@data){`
print $line;
}
}