Let's just say I used a simple hash.
#/usr/bin/perl
use strict;
use warnings;
srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`); # from perldoc.perl.org
my %person_data; #declare hash
my $number_people=10; # or =ARGV[0], STDIN, whatever
my @traits =...
I want to create arrays to hold data for a series of people, say @person1, @person2, etc. but the total number of people varies each time I run the program. How do I create arrays (or strings, for that matter) for person1 through personN? I've tried variations on concatenating as seen below...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.