CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
<DATA>

 



georgepag
New User

Oct 24, 2010, 11:58 AM

Post #1 of 2 (393 views)
<DATA> Can't Post

Hi,

I am self-learning Perl and have a question. The book gives this example:

#! /usr/bin/perl;
print <DATA>;
__DATA__
This line will be printed
and so will this one

which I understand, but then the book says that __END__ could be substituted for __DATA__ and the results would be the same ( I verified it), which I do not understand. I thought __END__ caused all following text to be ignored?

George


FishMonger
Veteran / Moderator

Oct 24, 2010, 1:18 PM

Post #2 of 2 (390 views)
Re: [georgepag] <DATA> [In reply to] Can't Post

See the "Special Literals" section of 'perldoc perldata'
http://perldoc.perl.org/perldata.html

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives