It could be better writen with here documents:print "\nHere is a list to select from:\n"; print "A. Set input filename\n"; ...
There were so many places where you made an error, I thought I'd like to point this out: good job on using <STDIN> instead of <>.print END; This is text that only needs one print END
Where you use this:chomp ( $selec = <STDIN> );
The substitution could be better written:$selec =~ s/[a-z]/[A-Z]/;
and that could be better written without a regex:$selec =~ tr/a-z/A-Z/;
Where you have the switch like statement:$selec = uc($selec);
You might want to look into something like this:if ( $selec eq 'A' ) { namefile(); Menu (); } ...
Here, you could do better to add a 'my'%func = (A => \&namefile, B=> \&openfile, ...) ... $func{$selec}->(); Menu();
Also, you might want to look into having a data structure somewhat like this:my ( $last, $first, $age, $sex, $height, $weight, $comment ) = split ( +/,/);
And you would use it like this:$age[$i++] ={last=>$last,first=>$first,age=>$age,sex=>$sex,height=>$he +ight,weight=>$weight,comment=>$comment}
Also, if you change the datastructure, you might want to look into a Shwartzian Transfer.print "First last=$age[0]{last}\n";
Sorry for the briefness on some topics, but there were a lot : ) If you still have questions, just ask.
The 15 year old, freshman programmer,
Stephen Rawls
In reply to Re: Please help...not certain why my code does not work.
by srawls
in thread Please help...not certain why my code does not work.
by Satanya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |