DevShed: Perl 101 (Part 2)–Of Variables And Operators

Published: May 16, 2002
Updated: Nov 10, 2020
1 minute read
ServerWatch のコンテンツおよび製品のおすすめは、編集上の独立性を保っています。パートナーへのリンクをクリックすると、当社が報酬を得る場合があります。 詳細を見る



“To begin with, let’s answer a very basic question for all those of you unfamiliar with programming jargon: what’s a variable when it’s at home?”

“A variable is the fundamental building block of any programming languages. Think of a variable as a container which can be used to store data; this data is used in different places in your Perl program. A variable can store both numeric and non-numeric data, and the contents of a variable can be altered during program execution. Finally, variables can be compared with each other, and you–the programmer–can write program code that performs specific actions on the basis of this comparison.”

Now that you’ve got the basics of the language down, this second article in the series teaches you about Perl’s variables and operators, and also introduces you to conditional expressions.

“Every language has different types of variables–however, for the moment, we’re going to concentrate on the simplest type, referred to in Perl as “scalar variables”. A scalar variable can hold any type of value–integer, text string, floating-point number–and is usually preceded by a dollar sign.”

ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

TechnologyAdvice が所有・運営しています。 © 2026 TechnologyAdvice. 無断転載を禁じます

広告主に関する開示:このサイトに掲載されている製品の一部は、TechnologyAdvice が報酬を受け取っている企業のものです。この報酬は、製品がこのサイトのどこにどのように表示されるか(表示される順序など)に影響する場合があります。TechnologyAdvice は、市場で入手可能なすべての企業やすべての種類の製品を掲載しているわけではありません。