标签归档:Perl

Hashes

Hash Element Access

To access an element of a hash, use syntax that looks like this:
$hash{$some_key}
This is similar to what we used for array access, but here we use curly braces instead of square brackets around the subscript(key). … Read the rest

subroutines

As other languages do, Perl has the ability to make subroutines, which are user-defined functions. The subroutine name comes from a separate namespace, so Perl won’t be confused if you have a subroutine called &fred and a scalar called $fredRead the rest

Scalar Data

Numbers

All Numbers Have the Same Format Internally

Internally, Perl computes with double-precision floating- point values. This means that there are no integer values internal to Perl—an integer constant in the program is treated as the equivalent floating-point value. Examples:… Read the rest