Request for new variables

From: Denis Beauchemin (
Date: Wed 23 Jan 2002 - 15:10:50 UTC

  • Next message: Brett Simpson: "Re: Recommended virus scanner programs."


    I modified my version of Anomy to accept "$j" and "$w" in the file name
    templates. They are the same as "date +%j" and "date +%w".

    This is easily done with the following code:
    sub CreateAttFile
            my $T = time();
            my ($S, $M, $H, $d, $m, $y, $wd, $yd) = localtime($T);
            $$fn = $conf->{"file_name_tpl"} || return undef;
            # Date stuff
            $$fn =~ s/\$w/ sprintf("%d", $wd) /eg;
            $$fn =~ s/\$j/ sprintf("%03d", $yd + 1) /eg;

    Could this become part of future Anomy releases?


    Denis Beauchemin, analyste
    Université de Sherbrooke, S.T.I.
    T: 819.821.8000x2252 F: 819.821.8045

    hosted by