Horje
perl $ @ % Code Example
perl $ @ %
# Basic syntax:
# In Perl, variables generally start with one of $, @, or % (called sigils)

# Scalars (strings, floats, ints) start with $, e.g.:
my $scalar_variable = "This string";

# Arrays (lists) start with @
my @array_variable = (2.3, 42, "Word");

# Hashes (dictionaries) start with % and use "key => value" to assign mappings
my %hash_variable = (
  42 => "The answer",
  mice => "vast, hyper-intelligent pan-dimensional beings",
);
perl @$
my @array = ( 1, 2, 3 );
my $array_ref = \@array; 
print "REF: ", $array_ref,"\n";
print "VALUES: ", join " ", @$array_ref;




14

Related
perl comparison operators Code Example perl comparison operators Code Example
perl exit loop Code Example perl exit loop Code Example
perl post condition Code Example perl post condition Code Example
perl input output Code Example perl input output Code Example
perl foreach loop Code Example perl foreach loop Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11