Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    7

    Unanswered: Flat files comparison using PERL.

    Dear Gurus,,

    Is there any way for doing the flat file comparison having the data in Dutch language (can be blind compariosn like position 15 to 20 in file 1 and file 2 are same). I have file 1 which is having the sample records say around 1000 and the another set of data I am extracting from the oracle table into a flat file 2.
    A data validation needs to be done in file 1 and file 2. Using perl script how can I achieve this. I am very new to PERL..

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Is there any way for doing the flat file comparison having the data in Dutch language

    By "the data in the Dutch language" I take it you mean that the data uses Dutch accents. Since Dutch is represented by the standard ISO 8859-1 encoding, there shouldn't be an issue.

    If you need to compare text without regard to accents, for example, and e being treated as the same, this is how:

    Code:
    $text1 =~ tr//aaaaaaeeeeiiiioooooouuuu/;
    $text2 =~ tr//aaaaaaeeeeiiiioooooouuuu/;
    if($text1 eq $text2) { dostuff(); }
    That's just an example. You can do more sophisticated stuff with regular expressions, too.

    (can be blind compariosn like position 15 to 20 in file 1 and file 2 are same). I have file 1 which is having the sample records say around 1000 and the another set of data I am extracting from the oracle table into a flat file 2.
    A data validation needs to be done in file 1 and file 2. Using perl script how can I achieve this. I am very new to PERL..


    You say it "can" be a blind comparison, and that you have some records, "say around 1000" and some kind of validation "needs to be done."

    This is all very vague. You need to spell out precisely what you want to do.

    You don't know Perl, fine. Do this print out some sample data. Write a set of instructions in English or Dutch or whatever language you prefer. Give the instructions and the data to someone who is unfamiliar with this project. Now see if that person can follow those instructions without you being in the same room.

    If they can't, fix the instructions. Once that person can follow the instructions without any help from you, post them here and we can turn them into Perl.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •