Loading ...
Sorry, an error occurred while loading the content.

Re: Perl command line problem

Expand Messages
  • timothy adigun
    Hi, ... help! C: perl -e print Hello World n will work fine, but On Windows OS, cmd shell does not treat single quote ( ) as a quote, so double quote ( )
    Message 1 of 4 , Sep 18, 2011
    • 0 Attachment
      Hi,

      --- In perl-beginner@yahoogroups.com, "diyingyun2016@..." <874827643@...>
      wrote:
      > Hi , I'm starting Perl , just a fully fresh beginner ;
      > And I use Perl command line in windows ;
      > when I typed the command :¬°¬°perl -e 'print "Hello,world\n"'
      > However, a problem occurs that
      > Can't find string terminator "'" anywhere before EOF at -e line 1.
      > How should it happen , and I've checked for a long time , I need your
      help!


      C:\>perl -e 'print "Hello World\n"'
      will work fine, but On Windows OS, cmd shell does not treat single quote (')
      as a quote,
      so double quote (") should be used after '-e' on the command Line Interface
      like this:
      C:\>perl -e "print 'Hello World'"
      However, one can use 'qq' operator in perl to do a good job like this:
      C:\>perl -e "print qq{Hello World\n}"

      Regards.
      --
      Tim


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.