in reply to Command line perl 'compile'

Remove the shebang line! And check the perlrun docs. You want something like: perl -e "print qq{Hello world.\n}" Notice that Windows requires double-quotes.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: Command line perl 'compile'
by CodeHound (Beadle) on Jul 08, 2002 at 16:23 UTC
    This works perfectly.
    The shebang is there because my purpose is to feed the perl interpreter a program contained in a file and parsed by another program!
    There is no real use for what I need, but I thought it could be good practice.
    I now understant that the comment from the shebang invalidates all the codeline and hence must be eliminated from the programs read.
    Many thanks, especially for the quick answer.