in reply to Arrays and Loops
Obviously, @stuff and $thing are bad variable names. I have no idea what better names would be in your context. In addition, these sound like they should be objects of some class. That way, you can deal with each as a give thing. For example, you could have a Jobs class. The attributes would be Who, What-to-do, When, as well as anything else you need to track. Maybe something like Who-manages or What-department or Salary.my @stuff = ( { name => 'tim', time => '5:00', duty => 'floors', }, # Fill in the others just as above ); for my $thing (@stuff) { print "$thing->{name} is on $thing->{duty} duty at $thing->{time}\ +n"; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|