Read Trailer record of file

Discussion in 'Perl Misc' started by sanika, Nov 6, 2011.

  1. sanika

    sanika Guest

    I have an req where i need to parse the trailer record of file
    Which is in format like

    TRL|No. of Records in file|Date

    What i need to do is read TRL line of file and if "No. of records" &
    "Date" fields on trailer line,i have to compare with the trailer
    record of previous day file.

    Please suggest on this
     
    sanika, Nov 6, 2011
    #1
    1. Advertisements

  2. sanika <> wrote:
    >I have an req where i need to parse the trailer record of file
    >Which is in format like
    >
    >TRL|No. of Records in file|Date
    >
    >What i need to do is read TRL line of file and if "No. of records" &
    >"Date" fields on trailer line,i have to compare with the trailer
    >record of previous day file.
    >
    >Please suggest on this


    What have you done so far? Where are you stuck? Which error messages
    does your code generate? Or in how far does the output not meet your
    expectations?

    If you don't even know where to start here are some pointers for
    starters:
    - perldoc -f open
    - perldoc -f grep
    - perldoc -f split
    - perldoc perlop (and pay special attention to the comparison operators)

    But honestly, this task is so simple that using Perl almost seems to be
    overkill.

    jue
     
    Jürgen Exner, Nov 6, 2011
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SnVzdGlu?=

    Retrieving Record Key while creating the record.

    =?Utf-8?B?SnVzdGlu?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    834
    =?Utf-8?B?SnVzdGlu?=
    Oct 5, 2004
  2. André
    Replies:
    0
    Views:
    3,927
    André
    Jun 25, 2006
  3. Eduardo Biano

    problem writing to a file each record read

    Eduardo Biano, Mar 15, 2006, in forum: Python
    Replies:
    2
    Views:
    343
    bruno at modulix
    Mar 15, 2006
  4. MRW
    Replies:
    0
    Views:
    514
  5. Sreejith K
    Replies:
    24
    Views:
    1,480
    Sreejith K
    Mar 24, 2009
  6. THurkmans
    Replies:
    2
    Views:
    753
  7. Frits van Soldt

    How to insert a new record in detailsview when there are no record

    Frits van Soldt, Nov 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    1,213
    Frits van Soldt
    Nov 17, 2005
  8. Alex Dowad
    Replies:
    4
    Views:
    675
    Michel Demazure
    May 1, 2010
Loading...