[Haskell-beginners] hide Perl code inside Haskell program

Hong Yang hyangfji at gmail.com
Thu Sep 10 13:24:26 EDT 2009


I was trying to hide Perl code inside Haskell program like the following:

> module Main where

> import System.Environment (getArgs)
> import System.Cmd

> main = do
>               args <- getArgs
>               rawSystem pl args
>            where pl = "#!/usr/bin/perl\n" ++
>                           "print \"testing ...\n\";"

The program can run, but generates no output at all. Can someone tell me any
other tricks which might be missing? (Do we need to use pipe here?)

Thanks,

Hong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090910/0259444b/attachment.html


More information about the Beginners mailing list