Help for this page

Select Code to Download


  1. or download this
    if ($toaddress =~ /(\S+)[@]yourdomain|yourotherdomain/) {
       $user = $1;
    ...
       warn "Unknown user:  $toaddress\n";
       $user = 'postmaster'; # Or whoever should get slop.
    }
    
  2. or download this
    # This is untested.
    @users = map {
    ...
      warn "No users.\n";
      @users = ('postmaster');
    }
    
  3. or download this
      my $filename = "attachment"; {
        my ($y, $m, $d) = (localtime)[5,4,3];
    ...
      binmode FILEHANDLE; # Probably not necessary on *nix.
      print FILEHANDLE $content;
      close FILEHANDLE;
    
  4. or download this
    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
    split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/