Hello,
I want to extract the words from a file which starts with SRD-R or SRD-DR.
I have written a script which is able to trace the word but it is printing the whole line.
sub extract_SRD_tag{
my ($tag, $app, $path, @data, $word );
$path = shift;
$app = shift;
open (FILE, $path) or die ("unable to open the file\n");
@data = <FILE>;
foreach $word (@data){
if ($word =~ m/SRD-/){
print $word,"\n";
if ($word )
}
}
print "The path is ", $app;
close (FILE);
}
But i want to keep all the found data in one array and and print that array.......
Thanks for u r response in advance.