Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PERL

perl variables

# 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",
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #perl #variables
ADD COMMENT
Topic
Name
8+3 =