Thread $* deprecated ?: perl gb probleme (4 answers)
Opened by Gast at 2006-01-18 16:32

Gast Gast
 2006-01-18 16:32
#6718 #6718
Hallo!

Vielleicht kann mir ja jemand bei meinem Problem helfen...
Seit ein paar Tagen versuche ich folgendes Script zum Laufen zu bekommen, leider ohne Erfolg. Im Moment bekomme ich mit perl -w show_gb.cgi folgende Zeilen...
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Use of $* is deprecated at ../cgi-bin/cg
i-lib.pl line 99.
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Use of uninitialized value at ../cgi-bin
/cgi-lib.pl line 57.
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Use of uninitialized value at ../cgi-bin
/cgi-lib.pl line 59.
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Use of uninitialized value at ../cgi-bin
/cgi-lib.pl line 63.
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Use of uninitialized value at show_gb.cg
i line 19.
Content-type: text/html

<H1>Software error:</H1>
<CODE>Can't Open File: No such file or directory
</CODE>
<P>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.;
[Wed Jan 18 15:25:07 2006] show_gb.cgi: Can't Open File: No such file or directory


Das Script selbst sieht folgendermaßen aus...

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
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);
use vars '@form_data', '$gb_jahr', '@zeilen', '@zeile';
use strict;

require "../cgi-bin/cgi-lib.pl";
require "../cgi-bin/mun-lib.pl";
&ReadParse(@form_data);

if ($form_data[0] eq "")
{
    $form_data[0] = "$gb_jahr";
}

$gb_jahr = "gstbk_$form_data[0].csv";

open (FILE,$gb_jahr) || die "Can't Open File: $!\n";
while(<FILE>)
{
chop ($_);
push (@zeilen, $_);
}
close(FILE);

&html_header;


print "\t<TABLE WIDTH=\"100%\" CELLPADDING=\"10\" CELLSPACING=\"2\"> \n"
."\t\t<TR>\n"
."\t\t\t<TD WIDTH=\"100\" ALIGN=\"LEFT\" VALIGN=\"MIDDLE\">"
."<A HREF=\"eguestbk.htm\"><IMG SRC=\"signbook.gif\" alt='Im Gastebuh eintragen...\'
. WIDTH=\"40\" HEIGHT=\"40\" BORDER=\"0\" ALIGN=\"LEFT\"></A></TD>\n"
."\t\t\t<TD ALIGN=\"CENTER\">"
."<IMG SRC=\"gaestebuch.gif\"BORDER=\"0\" WIDTH=\"166\" HEIGHT=\"33\"></TD>\n"
."\t\t\t<TD>&nbsp;</TD>\n"
."\t\t</TR>\n"
."\t</TABLE>\n"
."\t<TABLE WIDTH=\"100%\" CELLPADDING=\"10\" CELLSPACING=\"2\" ALIGN=\"CENTER\">\n"
."\t\t<TR>\n"
."\t\t\t<TD><A HREF=\"bguestbk_98.htm\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>1998</B></FONT></A></TD>\n"
."\t\t\t<TD><A HREF=\"bguestbk_99.htm\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>1999</B></FONT></A></TD>\n";
if ($form_data[0] eq "00")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2000</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?00\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2000</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "01")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2001</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?01\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2001</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "02")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2002</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?02\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2002</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "03")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2003</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?03\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2003</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "04")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2004</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?04\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2004</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "05")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2005</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?05\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2005</B></FONT></A></TD>\n";
}
if ($form_data[0] eq "06")
{
print "\t\t\t<TD><FONT SIZE=\"+1\"><B>2006</B></FONT></TD>\n";
}
else
{
print "\t\t\t<TD><A HREF=\"show_gb.cgi?06\" TARGET=\"text\">"
."<FONT SIZE=\"+1\"><B>2006</B></FONT></A></TD>\n";
}
print "\t\t</TR>\n"
."\t</TABLE>\n"
."\t<TABLE>\n"
."\t\t<TR>\n"
."\t\t\t<TD WIDTH=\"15%\"> </TD>\n"
."\t\t\t<TD>\n";
for (@zeilen)
{
@zeile = split(/#/,$_);
print "\t\t\t\t<B>$zeile[1]</B><BR>\n"
."\t\t\t\t$zeile[2] < <A HREF=\"mailto:$zeile[3]\">$zeile[3]</A> ><BR>\n"
."\t\t\t\t$zeile[4] - $zeile[5] -<BR>&nbsp;<BR>\n"
."\t\t\t</TD>\n"
."\t\t\t<TD WIDTH=\"15%\"> </TD>\n"
."\t\t</TR>\n"
."\t\t<TR>\n"
."\t\t\t<TD WIDTH=\"15%\"> </TD>\n"
."\t\t\t<TD>\n";
}
print "\t\t\t</TD>\n"
."\t\t\t<TD WIDTH=\"15%\"> </TD>\n"
."\t\t</TR>\n"
."\t</TABLE>\n"
."\t</BODY>\n"
."</HTML>";


Bin noch totaler Anfänger in Sachen Perl und würde mich freuen, wenn mir jemand helfen kann. :)

Gruß,
Levi

View full thread $* deprecated ?: perl gb probleme