Andrew Curry wrote:
> open(CSV,"Kalkulation_Tauchsportportal.csv") || die "CSV-Datei nicht
> gefunden\"; you have \ your "  

Ok I corrected it, now I only have an syntax-error in line 25
(split-command). In addition i am told that the part is not terminated.

The actual 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(CSV);
$Anzahl = $i - 1;
chop($Felder);
@Datenfelder = split(/,,,$Felder);
for(@Auftraege)
{
        @Datensatz = split(/,:,/,$_);
        $i = 0;
        for(@Datensatz)
        {
                print Auftrag "$Datenfelder[$i]: $Datensatz[$i]\n";
                $i++;
        }
}
close (Auftrag);
print $Anzahl," Datensaetze geschrieben\n";

--------------------
By leaving the  /  I get more errors.
What's wrong?

Regards,
Ruprecht

Web: http://www.rheyn.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to