I need to write a perl script for school and i am given an input file to work with class.txt
The first line contains
Student Number:Name:Lab1:Lab2:Lab3:Lab4:Lab5:Lab6:Exam1:Exam2:Final:Grade
followed by a space then
18273640:Annette Adams:8:24:19:24:10:12:43:35:98
so i used created an array and stored every line in the file to an array
my @lines = <FILE>;
So i decided to create a blank line checker since that is the divider between different information types. At the moment i have
sub nextSpace {
while($lines[$count] != "") {
$count = $count +1;
}
}
This does not work at all and i have no idea where to go from here as i need a way to check for blank lines in my array that contains the text.
any help would be appreciated as i am stuck on this.
The first line contains
Student Number:Name:Lab1:Lab2:Lab3:Lab4:Lab5:Lab6:Exam1:Exam2:Final:Grade
followed by a space then
18273640:Annette Adams:8:24:19:24:10:12:43:35:98
so i used created an array and stored every line in the file to an array
my @lines = <FILE>;
So i decided to create a blank line checker since that is the divider between different information types. At the moment i have
sub nextSpace {
while($lines[$count] != "") {
$count = $count +1;
}
}
This does not work at all and i have no idea where to go from here as i need a way to check for blank lines in my array that contains the text.
any help would be appreciated as i am stuck on this.