Majian wrote:
Dear list:

Hello,

  Sorry to distrub all .

            When I learned  Perl on the book called "Perl by example 4th
Chinese Edition ", I found there was an  error on this book .

           There had  a perl script  writted by this :
              #!/usr/bin/perl
                  print << 'END';
                     echo Today is
                      date
                   END

               The book said the  script would display this :
                                Today is
                                  Fir Oct 27 12:48:36 PDT 2007

                 But when I put it on my OS called CentOS 5.3  and run it
,the output  like this :
                              echo Today is
                               date

Instead of:

                   print << 'END';

That should be:

                   print << `END`;

For example:

$ perl -le'
print << `END`;
   echo Today is
    date
END
'
Today is
Wed Oct 21 04:46:53 PDT 2009




John
--
The programmer is fighting against the two most
destructive forces in the universe: entropy and
human stupidity.               -- Damian Conway

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to