Hi,
On running the script I get the following errors:
Scalar found where operator expected at ./csv_auslesen.pl line 29, near
"pint Auftrag "$Datenfelder"
(Might be a runaway multi-line "" string starting on line 3)
(Do you need to predeclare pint?)
Backslash found where operator expected at ./csv_auslesen.pl line 29,
near "]\"
(Missing operator before \?)
String found where operator expected at ./csv_auslesen.pl line 34, near
"print $Anzahl,""
(Might be a runaway multi-line "" string starting on line 29)
(Missing semicolon on previous line?)
Bareword found where operator expected at ./csv_auslesen.pl line 34,
near "print $Anzahl," Datensaetze"
(Do you need to predeclare print?)
String found where operator expected at ./csv_auslesen.pl line 34, at
end of line
(Missing semicolon on previous line?)
syntax error at ./csv_auslesen.pl line 29, near "pint Auftrag "$Datenfelder"
Can't find string terminator '"' anywhere before EOF at
./csv_auslesen.pl line 34.
---------------
The code is:
#!/usr/bin/perl
open(CSV,"Kalkulation_Tauchsportportal.csv") || die "CSV-Datei nicht
gefunden\";
$i=0;
while (<CSV>)
{
if($i==0)
{
$Felder = $_;
}
else
{
@Auftraege[$i] = $_;
}
$i++;
}
close(<CS>);
$Anzahl = $i - 1;
chop($Felder);
@Datenfelder = split(/,|,$Felder);
for(@Auftraege)
{
@Datensatz = split(/,|,/,$_);
$i = 0;
for(@Datensatz)
{
pint Auftrag "$Datenfelder[$i]: $Datensatz[$i]\n";
$i++
}
}
close (Auftrag);
print $Anzahl," Datensaetze geschrieben\n";
--------------------
Whats getting wrong?
Regards,
Ruprecht Helms
Web: http://www.rheyn.de
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/