Hello! On Tue, Jun 01, 1999 at 06:58:32AM +0200, Friedrich Dominicus wrote: > [...] > I want to do the following, read a file line by line and finding out > which line is longer than x-chars. I want to print out which lines are > so long. I think that can just be done line-wise. > Thanks for you answer I hope I got it right with that information. longerThan :: String {- filename -} -> Int {- length limit -} -> IO () longerThan fn lenlim = do content <- readFile fn let li = lines content fl = filter (\l -> length l > lenlim) li putStr (unlines fl) So, still no need to fuzz with file handles :-) > Regards > Friedrich Regards, Hannah.
- how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Hannah Schroeter
- Re: how to write a simple cat David Overton
- Re: how to write a simple cat Keith Wansbrough
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Hannah Schroeter
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Hannah Schroeter
- Re: how to write a simple cat Sven Panne
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat S. Alexander Jacobson
- Re: how to write a simple cat Sven Panne
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Jan Skibinski
- Re: how to write a simple cat Lars Henrik Mathiesen
- Re: how to write a simple cat Keith Wansbrough
- Re: how to write a simple cat Lennart Augustsson
- Re: how to write a simple cat Kevin Atkinson