It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/perl -w
use strict;
my @hash;
my %hash = (
\"Xinapse\", \"Admin\",
\"Chroniccomand\", \"Mod\",
\"GameOver\", \"Gamer and Mod\", # This is how we declare hash array
\"rx-\", \"The author\",
\"LEET\", 1337
);
my $hash1 = $hash[1]; # Value is _Admin_
my @hash2 = %hash; # Regular array with 10 items (ie. all info)
my %hash3 = @hash2; # Now we made a hash array from list(regular) array, its same as %hash
foreach my $hash4 (keys %hash) {
print $hash4.\"\n\"; # Will print keys(Xinapse,Chroniccomand,GameOver) etc.
}
foreach my $hash5 (values %hash) {
print $hash5.\"\n\"; # Will print values (Admin,Mod, Gamer and Mod) etc.
}
my ($name,$position); # You define more variables REMEMBER IT!
while(($name, $position) = each(%hash)) {
print $name.\" - \".$position.\"\n\"; # Will print key and value (fe. \"Xinapse - Admin\")
}