| | Re: awk vs. perl for simple tasks Jeremy H. Sproat
|
| | (...) Hmmm... I *think* a2p handles this by giving the perl script the "while(<>)" loop. I don't think perl will do that by itself. (...) Check perlvar, in the section on $/ (input record separator) -- in Perl, it can only be a regular string, but (...) (26 years ago, 5-May-99, to lugnet.off-topic.geek)
|
| | |
| | | | Re: awk vs. perl for simple tasks Todd Lehman
|
| | | | (...) Aha, here it is: perl -ane (...) FS is awk is the field separator, not the record separator. The record separator in awk is RS. Hmm, doesn't look like Perl has an input field separator -- only an output field separator $, and input/output (...) (26 years ago, 6-May-99, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: awk vs. perl for simple tasks Jeremy H. Sproat
|
| | | | | (...) Hmmm, I don't think I'm old enough for that yet. :-D I've just picked up Perl relatively recently. I'd hesitate to do a 100 Mb STDIO pipe on any MS platform. In DOS and Win16/95/98 (which are single-tasking OS's no matter what MS tells you), (...) (26 years ago, 6-May-99, to lugnet.off-topic.geek)
|
| | | | | |
| | | | | | Re: awk vs. perl for simple tasks Jeremy H. Sproat
|
| | | | (...) It just occurred to me how useful a live tail util would be. How would you implement one in Perl? Would the one at PPT (1) be the one to check out? Cheers, - jsproat 1. (URL) Jeremy H. Sproat <jsproat@geocities.com> (URL) the Force be with (...) (26 years ago, 18-May-99, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: awk vs. perl for simple tasks Todd Lehman
|
| | | | (...) check whether the file size has changed, which, although gross in theory, is perfectly fine in practice if there aren't a zillion copies of it running. Dunno how many Unix implementations have file-change events/signals like NT does, but I'd (...) (26 years ago, 19-May-99, to lugnet.off-topic.geek)
|
| | | | |