English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

if you do could you help me, how would i go about answering this question.:

i have already written my script to prompt the user for their name, car make and year... now how do i do this???

Allow the script to accept data from any number of cars, asking after each if there is another car to prcess, and only when the user enters "no" doest the script end!! help?????

2006-08-11 22:59:56 · 3 answers · asked by prettybee 2 in Computers & Internet Programming & Design

3 answers

The loop idea suggested by someone else looks good.
You may want to store the data in the loop in an array like this:
push @carlist, "$name $car $year\n";

That way you can print out the array later in the program.
You could also use a hash.

2006-08-12 17:34:30 · answer #1 · answered by timespiral 4 · 0 0

visit http://www.w3schools.com for tutorials in perl

2006-08-12 06:14:59 · answer #2 · answered by kem 2 · 0 0

That will be a loop.
Something like
do {
...
"More Cars? ";
$a = ;
chop $a;
}
while ($a ne "No" && $a ne "no");

2006-08-12 06:40:07 · answer #3 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers