1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Make Perl script send email when condition occurs

Discussion in 'Programming' started by steve1040, Feb 5, 2015.

  1. #1
    Can some help me with the following issue

    I'd like to add a email notification when modified date is old.
    My system admin told me to use Mailx (mailx -s "Subject" )

    Here are the two lines that check the 2 variables in question. Can someone show me how to write Perl code so that each check sends a email

    ##My Code Start######

    # If lacecurrent is not equal to today then do not run
    die if ( -M $currentlist_file > 1);
    die if ( -M $pre_historical_file > 2);

    ###My Code Stop#######

    Thanks
    Steve
     
    steve1040, Feb 5, 2015 IP