1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#!/usr/bin/perl
#use strict;
use Tk;
use Tk::FileSelect;
use Tk::EntryCheck;
use Date::Calc qw(:all);
use Win32::Console;
Win32::Console::Free();
my $a = 0;
my $tdata = 0;
my @list="";
my $dateac="";
# date du jour
(my $sec,my $min,my $hour,my $mday,my $mon,my $year,my $wday,my $yday,my $isdst) = localtime(time);
$mon=$mon+1;
my $date=($year+1900)*10000+$mon*100+$mday;
# Partie graphique
my $w_top = new MainWindow;
$w_top->configure(-title => "Validation action(s) faite(s)");
my $w_frame = $w_top->Text(
-height => 10,
-wrap => "none",
-relief => "solid",
-background => "white",
)->pack(-fill => "both", -expand => 1);
tie *STDOUT, ref $w_frame, $w_frame;
$w_top->Button(-text => 'Quittez',-command => sub {exit} )->pack( -side=>'right' );
# ouverture fichier
my $lstfic='D:\\scripts\\perl\\pense-bete\\test.txt';
# lecture du fichier
open( FIC, $lstfic )or die "fichier introuvable";
chomp (@data=<FIC>);
close(FIC);
$tdata=@data; #Nb de ligne dans le fichier
for ($a = 0; $a < $tdata; $a++)
{
@list=split("," , $data[$a] );
# Recuperation des action ayant un N en champ 7
if ($list[7] eq 'N')
{
CODE MANQUANT
}
}
MainLoop; |
Partager