Thread if bed. funktioniert nicht (4 answers)
Opened by Argon at 2006-05-11 11:19

Argon
 2006-05-11 11:19
#65944 #65944
User since
2005-10-13
4 Artikel
BenutzerIn
[default_avatar]
hallo alle zusammen
habe folgendes problem
1)lese zeilenweise aus einer Datei
2)vergleichen


file1
a \(

file2
b \(

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open (STREAM_EINS,"<$file1")
@lines1=<STREAM_EINS>;
close(STREAM_EINS);

open (STREAM_ZWEI,"<$file2")
@lines1=<STREAM_ZWEI>;
close(STREAM_ZWEI);

foreach $var1 (@lines1)
{
     foreach $var2 (@lines2)
        {
            if ($var1 =~ /$var2/)
                 {
                     print "ok";
                 }
        }
}


eigentlich soll es funktionieren aber tut es nicht. woran kann es liegen??
wenn man in file1 und file2 nur a und a speichert ohne \( dann funktioniert das ganze... HILFE

edit pq: code-tags hinzugefĆ¼gt\n\n

<!--EDIT|pq|1147337154-->

View full thread if bed. funktioniert nicht