[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: Awk vs Perl for this assignment
- Subject: Re: Awk vs Perl for this assignment
amerar@xxxxxxx wrote...
>I'm trying to decide which is better. I have to take huge record,
>5000 bytes long, parse out the fields into variables, and then prompt
>the user for each field, allowing them to change the value.
...
The only questions would be whether you want a GUI interface (in which
case Perl/Tk could provide one, but no awk has anything similar) or
whether your particular awk variant could handle records of 5000-odd
characters. If you don't want GUI and your awk handles the record
length, there's not going to be much difference between the two. A case
could be made for laziness: awk won't require as many semicolons as
Perl.
>Also, I'd like to know how in both AWK & Perl to accept from Standard
>Input while going through a loop.........ie, I'd be looping through
>each field of each record. And, at the end of the record, I'd print it
>to a file, FTP it someplace and continue with the next record.
Looping and I/O are independent of each other. You're not expressing
the problem correctly. Try doing so, and a solution may become clear.
Since this looks like a course assignment, I won't give a straight
answer: you need to focus on I/O.
Home |
Main Index |
Thread Index
3710
5199
5234
7077
8070
11455
11613
11953
14898
14994
9/8/2010 9:55:35 GMT