Read Trailer record of file

S

sanika

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
 
J

Jürgen Exner

sanika said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top