PERL Tutorial Example: use of literal constants in perl
create a file named "perl-tutorial-example-literal-constants-in-perl.pl" then copy and paste the below code:
print "\n\n"; print "This is \'", __PACKAGE__, "\' Package\n\n"; print "This is \'", __FILE__, "\' File\n\n"; print "This is \'", __LINE__, "\' Line\n\n"; print "This is END\'", __END__, "\', the END\n\n"; print "I AM QUITE BY __END__";
PERL Example Base Tutorial: use of literal constants in perl
Now run the program (perl-tutorial-example-literal-constants-in-perl.pl) from command prompt & get some interesting results as follows:
Be careful while using Literal Constants in PERL.
No comments:
Post a Comment
leave your comments here..