Associative Arrays (Perl)

From ben.goodacre.name/tech

Jump to: navigation, search
my %splitfilenames (1, "allpics.aa",
			2, "allpics.ab",
			3, "allpics.ac",
			4, "allpics.ad",
			5, "allpics.ae");

To add a single value at a time (useful in loops):

my %splitfilenames;
$splitfilenames(1) = "allpics.aa";

$splitfilenames{2} would then return "allpics.ab"

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox