Hi,
I am new to Perl and got this small thing I have to do at work so here it goes:
I got a hash called education with the following structure:
%education = ();
$education{high} = "200";
$education{college} = "201";
$education{master} = "202";
$education{post} = "203";
$education{phd} = "204";
the numbers 200 and so is from the id in my database.
I want to list out the list (text based) like this:
1. high
2. college
3. master
4. post
5. phd
Select a number (1-5):
And the user should enter one (or several numbers separated by a comma) like this 1,3,5 and the system should then know that 1 = 200 and 3 - 202 and 5 = 204
I do now have it so the system separates the numbers but it can't connect the 1 with 200. Is there an easy way to do this?
Any ideas?
J0sh
I am new to Perl and got this small thing I have to do at work so here it goes:
I got a hash called education with the following structure:
%education = ();
$education{high} = "200";
$education{college} = "201";
$education{master} = "202";
$education{post} = "203";
$education{phd} = "204";
the numbers 200 and so is from the id in my database.
I want to list out the list (text based) like this:
1. high
2. college
3. master
4. post
5. phd
Select a number (1-5):
And the user should enter one (or several numbers separated by a comma) like this 1,3,5 and the system should then know that 1 = 200 and 3 - 202 and 5 = 204
I do now have it so the system separates the numbers but it can't connect the 1 with 200. Is there an easy way to do this?
Any ideas?
J0sh