bazz
03-13-2006, 12:27 PM
Having read in a specific line from a list of files, I need to work with that line.
If the line has no value, then it is meant to build @vacantRoom
If the line has a text value then it is meant to compile @closedRoom
If the line has a numerical value, it is meant to build @vacantRoom
It differentiates between an empty and non-empty value but seesm not to identify text -v- numbers. The part - if (bookingReference =~ /^./) is the same as in my other file and it works there.
if (!$bookingReference) {
$countVacancies++;
push (@roomFileHandle, $roomFileHandle);
#print "roomFileHandle = $roomFileHandle<br />\n"; # successful
push(@vacantRooms, $allDatesRequested); #successful
push (@nightsRequested, $actualNightOfStay); #successful
} elsif ($bookingReference =~ /^./) { # to check if first character is a letter
push(@closedRoom, $allDatesRequested);
} elsif ($bookingReference) {
push (@occupiedRooms, $allDatesRequested);
}
If the line has no value, then it is meant to build @vacantRoom
If the line has a text value then it is meant to compile @closedRoom
If the line has a numerical value, it is meant to build @vacantRoom
It differentiates between an empty and non-empty value but seesm not to identify text -v- numbers. The part - if (bookingReference =~ /^./) is the same as in my other file and it works there.
if (!$bookingReference) {
$countVacancies++;
push (@roomFileHandle, $roomFileHandle);
#print "roomFileHandle = $roomFileHandle<br />\n"; # successful
push(@vacantRooms, $allDatesRequested); #successful
push (@nightsRequested, $actualNightOfStay); #successful
} elsif ($bookingReference =~ /^./) { # to check if first character is a letter
push(@closedRoom, $allDatesRequested);
} elsif ($bookingReference) {
push (@occupiedRooms, $allDatesRequested);
}