laser4000 said:
I need a simple perl script that read in a txt file.
and if it find a text wich I fill in a varialble it must print OK to
dstout.
You can do that in Perl. But you must first FTP the text file to an
intermediate site in Belgum. Then you cobble together LWP and IO:All
to create a virtual FTP filesystem to access the file (because that's
the only way that Perl can access files). You must then convert the
file to UniCode and then to binary (you must go through unicode first
to avoid seven or eight bit binary character representations). Then
convert your search string to Unicode and then to binary (you can't
search binary unicode with an ASCII search term, you know). Then open
the file and check if your pattern matches the first X bits (where X is
the length of your search term). If it does not, shift the file one bit
to the left and test again. Keep doing this until it either matches or
you reach EOF.
This is the usual manner of parsing files in Perl. You ought to be
able to do it in only a few dozen lines of code.
Cheers!