Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Perl and CGI Introduction to Perl and CGI Perl Syntax Tutorial

This tutorial is an introductory look at the Perl language and its syntax.

Tutorial Details:

Perl Syntax
This tutorial is an introductory look at the Perl language and its syntax.

Semicolons
All Perl lines must end in semicolons. Perl does not use the carriage return to indicate the end of a line, it uses the semicolon.

Comments
It is always a good idea to put “comments” in your programs. These remind you what you were doing later on. Perl completely ignores your comments. For these, preface the line with the pound sign (‘#’). Perl will ignore any line that begins with a pound sign. You do not need to end your comments with semicolons.
Put the following line in front of the line that contains your name:

#tell Perl my name
Put the following line in front of the line that contains “print”:

#say hello to me!
You can also use comments to tell Perl to ignore parts of your program. You might want to do this to track down a bug, or to bypass a part of the program that isn't working correctly. Scalar Variables
Variables store information. You set a variable with the “=” modifier:

$myName = "Jerry";
A “scalar” variable is a variable that only holds one value. Later, we’ll get into “array” variables, which can hold more than one value, for example, all the first names in Academic Computing. Scalar variables always begin with a dollar sign. Text vs. Numeric
Text variables are surrounded by quotes. Numeric variables can only contain numbers and maybe a decimal point. Perl doesn't care whether a variable is numeric or text until it uses it. If you try to use a variable as numeric when it can’t be converted to a number, Perl assumes it is zero.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Perl and CGI Introduction to Perl and CGI Perl Syntax Tutorial

View Tutorial:
Perl and CGI Introduction to Perl and CGI Perl Syntax Tutorial

Related Tutorials:

Commercial applications with Java
Commercial applications with Java
 
Java Q&A - Java Still Open
Java Q&A - Java Still Open
 
Java Q&A, Open Java?
Java Q&A, Open Java?
 
Build servlet-based enterprise Web applications - JavaWorld - December 1998
Build servlet-based enterprise Web applications - JavaWorld - December 1998
 
One, two, three, or n tiers? - JavaWorld January 2000
One, two, three, or n tiers? - JavaWorld January 2000
 
Script JavaBeans with the Bean Scripting Framework - JavaWorld March 2000
Script JavaBeans with the Bean Scripting Framework - JavaWorld March 2000
 
Solve your servlet-based presentation problems - JavaWorld November 2000
Solve your servlet-based presentation problems - JavaWorld November 2000
 
Matchmaking with regular expressions - JavaWorld July 2001
Matchmaking with regular expressions - JavaWorld July 2001
 
Java scripting languages: Which is right for you?
Java scripting languages: Which is right for you?
 
JSP Standard Tag Library eases Webpage development
JSP Standard Tag Library eases Webpage development
 
alt.lang.jre: Take a shine to JRuby
JRuby combines the object-oriented strength of Smalltalk, the expressiveness of Perl, and the flexibility of the Java class libraries into a single, efficient rapid development framework for the Java platform. In this third installment in the alt.lang.jre
 
Overview of Servlets and JSP
Servlets are Java technology's answer to CGI programming. They are programs that run on a Web server and build Web pages. Building Web pages on the fly is useful (and commonly done) for a number of reasons.
 
Advanced form processing using JSP
Processing HTML forms using servlets, or more often, CGI scripts, is one of the most common operations performed on the Web today. However, that JavaServer Pages (JSPs) can play a significant role in sophisticated form processing is a little-known secret.
 
Servlets and JavaServer Pages (JSP) : A Tutorial
An excellent tutorial on JSP and Servlets.
 
Java Servlets: Design Issues
This article covers the principal concepts associated with servlets. This article examines some of the design issues, and offers some guidelines on the applicability of Java servlets for web based application development.
 
Introduction to Servlets, JSP, and Servlet Engines
Servlets are the Java Technologies' answer to CGI programming. They are programs which run on the server side and generate dynamic content. Why would one prefer to use Servlets over traditional CGI programming?
 
Bioinformatics
Bioinformatics Bioinformatics Introduction Bioinformatics is new hot topic after the Software. In the coming days there will be huge demand of Bioinformatics professionals in all sectors of biotechnology, pharmaceutical, and biomedical sciences.
 
Introduction to the JSP Java Server Pages
Introduction to the JSP Java Server Pages Welcome to JSP Section Introduction To JSP Java Server Pages or JSP for short is Sun's solution for developing dynamic web sites. JSP provide excellent server side scripting support for creating database
 
What is Web Hosting
What is Web Hosting What is Web Hosting? What is Web Hosting? If you have a company and want web presence than you need a website. With the website any one from the world must be able to view your pages, images etc. Website is actually a
 
Urchin RSS Aggregator
Urchin is a Web based, customisable, RSS aggregator and filter. It\'s primary purpose is to allow the generation of new RSS feeds by running queries against the collection of items in the Urchin database.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.