Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!rutgers!cunixf.cc.columbia.edu!ben From: ben@cunixf.cc.columbia.edu (Ben Fried) Newsgroups: comp.lang.perl Subject: Searching fixed-record-length files Message-ID: <1990Nov7.233040.8119@cunixf.cc.columbia.edu> Date: 7 Nov 90 23:30:40 GMT Organization: Columbia University Center for Computing Activities Lines: 21 This sounds like something really trivial, but I can't seem to find it in the manual - I may just not be looking hard enough. I've got a file containing a database with a fixed record size of 184 characters; there is no record separator. Same for fields within the record - they are each a (different) constant size, and are padded with blanks out to that size. I was trying to think of a way to slurp in the entire file all at once (even though it's big - ~8meg), compile the expression to search for, and then use format to print out the matching records prettily; however, I'm stuck. The solutions I come up with are all based around records and fields all being delimited by some expression, when they're actually not. Any suggestions? Ben -- Benjamin Fried ben@cunixf.cc.columbia.edu rutgers!columbia!ben