Tuesday, May 09, 2006

Reading files

module Main where

import IO

main = do h <- openFile "p3.hs" ReadMode
contents <- hGetContents h
putStr contents
hClose h

No comments:

Post a Comment