/[informatika.old]/print/izvjestaj.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /print/izvjestaj.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Wed Apr 12 08:10:24 2000 UTC revision 1.2 by dpavlin, Thu Apr 27 10:57:11 2000 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5    my $debug=1;
6    
7  use DBI;  use DBI;
8  use POSIX qw(strftime);  use POSIX qw(strftime);
9    
10    print STDERR "Debug mod: output je u /tmp/debug*\n" if ($debug);
11    
12  my $currdate = strftime "%d.%m.%Y %H:%M:%S", localtime;  my $currdate = strftime "%d.%m.%Y %H:%M:%S", localtime;
13    
14  my $html_file=$currdate;  my $html_file=$currdate;
15  $html_file=~s/ /_/g;  $html_file=~s/ /_/g;
16  $html_file="izvjestaji/$html_file.html";  $html_file="izvjestaji/$html_file.html";
17    
18    if (! $debug) {
19  open(HTML,"> $html_file") || die "html: $!";  open(HTML,"> $html_file") || die "html: $!";
20  open(MAIL,"|/usr/lib/sendmail biljana.gombar\@pliva.hr,izvjestaji\@support.pliva.hr") || die "sendmail: $!";  open(MAIL,"|/usr/lib/sendmail biljana.gombar\@pliva.hr,izvjestaji\@support.pliva.hr") || die "sendmail: $!";
21    } else {
22    open(HTML,"> /tmp/debug$$.html") || die "html: $!";
23    open(MAIL,"> /tmp/debug$$.mail") || die "sendmail: $!";
24    }
25    
26  print HTML '  print HTML '
27  <html>  <html>
# Line 92  print HTML ' Line 101  print HTML '
101    
102  close(HTML);  close(HTML);
103  close(MAIL);  close(MAIL);
104    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26