Robert Fashion design splendor

Fashion design is a relatively new category, marking the shift from the dominance of French haute couture in the 1950s to new fashion centers in the United States, Europe, and Japan. Youth, street styles, and pop culture have become increasingly central to fashion design.

Popularity: unranked [?]


A little something on Perl language
comment No Comments Written by Robert on April 17, 2008 – 9:19 am

Most of the basic control constructs – sequence, selection, iteration, function call, method calls on objects – are similar to their equivalents in C/C++. Inevitably, there are syntactic differences. For example, in Perl a conditional has the form if(condition) block instead of if(condition) statement; naturally, this leads to lots of errors where experienced C programmers forget to put in the { } braces required for Perl’s block construct. Perl does have some novel control structures (for instance, there is a ‘back to front’ conditional construct – statement if(condition)); and there are some odd features like Perl’s ability to omit parentheses from a function call statement (well, that feature is in Visual Basic too, but this is not necessarily a commendation).

Perl has its literal constants (numeric values like 12, 1.2e3, 077 – an octal value if it starts with 0; and literal strings like “hello world”). Values are combined using operators; these combinations form expressions. As always, there are precedence rules that define how operators apply. Values from expressions can be tested or assigned to variables. The distinctive features of Perl are first noticeable in its handling of variables, data types and strings.

Scalar variables hold single values, much like variables of built-in types like int or float in C/C++. One difference is that in Perl, a string is a scalar value. Another difference is that Perl variables do not hold data of a fixed type (this ‘typeless-ness’ is common to many interpretive languages). A Perl variable can be used to hold a string and then, later, hold a numeric value. (Mostly data values are strings because Perl programs tend to be for text manipulations; numeric data are of course possible. Another type of data, reference values, is not covered in this brief guide). In many situations, automatic type coercions are used; if a variable is used in a context where a numeric value is required, its value will be converted to numeric form; when a string is required then that is how the data are interpreted. Another feature of Perl, and many other interpreted languages, is that variables do not need to be explicitly declared; a declaration is implicit in the first use of a variable. The fact that variables do not need to be declared increases the ‘whipitupitude’ of Perl code, but it does also increase the risk of errors. There are controls that can be set to make the interpreter require explicit variable declarations.

Variables have names that for the most part follow typical programming conventions – a name starts with a letter, which can be followed by letters, digits and underscore characters (special rules allow other characters in the names of system variables). Perl uses ‘type identifiers’ to indicate how a variable name is to be interpreted. Scalar type variables must begin with a dollar symbol; later, other Perl data types like lists and hashes will be introduced, and these use other distinguishing symbols to designate the different roles of such variables. The following are valid scalar variable names:

$Temp
   $inputline
   $count
   $first_name
   $x2

Variables can hold numeric values – derived from literal numeric constants, input data or resulting from expressions. The standard binary operators (+, -, *, / and %) are supplemented with an exponentiation operator (**), and Perl has inherited C’s ++ and — increment and decrement operators. Details of all Perl’s operators and the precedence relations that exist among them can be obtained using perldoc perlop or following the perlop link in the HTML version of the Perl documentation.

Popularity: 53% [?]

If you enjoyed the article, why not subscribe?

Browse Timeline

Related Post

Post a Comment

About The Author: Robert



Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :