How to mail attachment with data in a executed variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pritee
    New Member
    • Sep 2014
    • 1

    How to mail attachment with data in a executed variable

    Code:
    #!/usr/bin/perl -w
    use strict;
    use warnings;
    use MIME::Lite;
    
    my $DirPath='filepath';
    
    opendir (DIR, "$DirPath") or die "Cannot open $DirPath $!\n";
    my $recent='find filepath -mtime -51 -type f';
    system($recent) ;

    Now i am getting required filename but i want to mail contents of that file in a mail as a attachment.
    Last edited by Rabbit; Sep 2 '14, 03:36 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...