CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Easternman] Creating sequential variables: Edit Log



Zhris
Enthusiast

Jun 13, 2018, 1:50 AM


Views: 5875
Re: [Easternman] Creating sequential variables


Code
use strict; 
use warnings;
use Data::Dumper;
local $\ = "\n";

my @player; # = map [ ], 0 .. 49;

push @{$player[4]}, 'foo';
push @{$player[1]}, 'bar', 'baz';
$player[8] = { name => 'Chris', loc => 'UK' };

print Dumper \@player;
print $player[1]->[1];
print $player[8]->{name};



(This post was edited by Zhris on Jun 13, 2018, 1:54 AM)


Edit Log:
Post edited by Zhris (Enthusiast) on Jun 13, 2018, 1:52 AM
Post edited by Zhris (Enthusiast) on Jun 13, 2018, 1:54 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives