!/usr/bin/perl
use strict;
use warnings;
use MIME::Lite;
use POSIX qw(strftime);
my $tdate = strftime("%Y%m%d", localtime);
my $file;
#print $tdate,"\n";
my $mydir = ".";
opendir(DIR, "$mydir");
my @drmfile = grep(/PLAN.$tdate.*$/,readdir(DIR));
#my @drmfile = grep(/\.pl$/,readdir(DIR));
closedir(DIR);
#foreach $file (@drmfile) {
#print $file,"\n";
#}
#my $msg = MIME::Lite->new(
# From => 'tsm@abc.com',
# To => 'p@abc.com',
# Cc => 'some@other.com, some@more.com',
# Subject => 'TSM DR Plan',
# Type => 'multipart/mixed',
#);
#$msg->attach(
#Type => 'TEXT',
#Path => 'C:\\Scripts\\$file\',
#Filename => '$file',
#Disposition => 'attachment',
#Data => "$file",
#);
#$msg->send('smtp', '10.97.24.104', Timeout => 60 );
#}