re-opening a closed stdin?

Michael Weber michaelw@foldr.org
Mon, 25 Nov 2002 17:33:02 +0100


On Mon, Nov 25, 2002 at 11:22:56AM -0500, Dean Herington wrote:
> Is even the following example from the library report (section 11.8.2)
> problematic?
> 
> import System
> import Char( toUpper )
> 
> main = do
>          [f1,f2] <- getArgs
>          s <- readFile f1
>          writeFile f2 (map toUpper s)

yes, if f1 == f2.  Lots of puzzled students resulting... :)


Cheers,
M/