This is what I have so far ..I am still working on it
#!/usr/bin/perl
my $dir = "/tmp/asheesh";
my gdir = "$dir/temp";
opendir (DIR, $dir) or die "can't open dir";
@files = readdir(DIR);
closedir DIR;
foreach $files(@files)
{
unless ( $files eq "." || $files eq "..")
{
open (FILE, "$files") or die "can't open file";
@Lines=<FILE>;
close FILE;
foreach $Lines(@Lines)
{
chomp $Lines;
if ( $Lines eq "<NumberofDays>\d+</NumberofDays>" )
to compare against a regular expression you use =~
the regular expression is in 'm|' and '|' characters
This is to make clear you are using a regular expression
the \d+ is in '(' and ')' characters
This is used to 'capture' the value of the expression inbetween them. In this case it would capture the value in $1. The rule is the first ()-match is captured in $1, the second in $2 etc. So in your code you could continue with something like
Hope this helps getting you started. For documentation on regular expressions there are 2 good tutorials that come with perl that were not mentioned here:
perlrequickperlretut
at a command prompt. The 1st response to your question gave you a regular expression to try. Read the perldocs, try a regular expression, and post back if you still have problems.
Besides accessing the perldocs on your own machine, which you seem to be having trouble with, you can also access the perdocs online at www.perldoc.com. Here is the link for 'perlre':