I am trying to open.xml file for reading which does not have uniform data (which can be extracted in Hash) and then want to search for specific string. My code works fine for .txt file. however same is not working for .xml file. Please help
Here is a code snippet -
my $JobDirectory = 'here is my xml file path';
open FILE, "<$JobDirectory" || die "Can't open log file $!\n";
while (<FILE>)
{
print "$_\n";
}
Here i am providing path of my xml file in $JobDirectory. Want to open the xml file for reading.
Above code does not print anything. However, instead of xml file, if i put the path of .txt file, it prints content of that file.