Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Arrays and Loops

by screamingeagle (Curate)
on Feb 15, 2002 at 17:33 UTC ( #145731=note: print w/ replies, xml ) Need Help??


in reply to Arrays and Loops

how about :

use strict; my @name = ("tim", "tom", "jon"); my @time = ("5:00", "6:00", "7:00") ; my @duty = ("floors", "urinals", "windows"); for my $i (0..$#name) { print "$name[$i] is on $duty[$i] duty at $time[$i]\n" }


Comment on Re: Arrays and Loops
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://145731]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2015-07-06 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (81 votes), past polls