Thread query nach txt file schreiben (2 answers)
Opened by fraggs at 2006-12-04 16:30

fraggs
 2006-12-04 17:29
#72229 #72229
User since
2006-09-11
179 Artikel
BenutzerIn
[Homepage] [default_avatar]
ja das ganze script nun mal fast 400 zeilen ... reduzieren kann man das denke ich nicht sehr viel aber hier ist die ganze subroutine.

Code: (dl )
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
sub getcrprrumba
{

my $sday = $startdt->get();
my $syear = $startyr->get();
my $eday = $enddt->get();
my $eyear = $endyr->get();

    my @Pos;
    my @Pos2;
    my @Pos3;
    my $smonthsel;
    my $emonthsel;
    
@Pos= $rumbalistbox1->curselection();
    $selection2 = $rumbalistbox1->get($Pos[0]);
@Pos2= $startmonth->curselection();
    $smonthsel = $startmonth->get($Pos2[0]);
@Pos3= $endmonth->curselection();
    $emonthsel = $endmonth->get($Pos3[0]);

my @QUERY_RESULT=`ccm query -u -f  "%displayname;%crstatus"  -t problem "platform_component_name='RUMBA' and platform_module_name='Entertainment' and module_comp_version='$selection2' and (crstatus='test' or crstatus='solved' or crstatus='concluded') and test_date>time('$smonthsel $sday $syear')  and test_date<time('$emonthsel $eday $eyear')"`;

chomp(@QUERY_RESULT);

open(my $listfile,'>',$datatxt) or die $!;
print $listfile "rumba cr + pr";
print $listfile @QUERY_RESULT;
close ($listfile);

}


der path zum txt file wird als globale variable definiert.
kann der vielleicht ein Array(@QUERY_RESULTS) nicht in ein txt file schreiben ?

EDITEDITEDIT:
habs hingekriegt war wohl irgendwo was nicht richtig mit nem ; jetzt klappts !\n\n

<!--EDIT|fraggs|1165248456-->
mmm twix

View full thread query nach txt file schreiben