Okay, this is the situation:
### Gets the text fil ###
$list = 'list22.txt';
open(INF,"$list"
;
@test = <INF>;
### for each line, writes the line####
foreach $line (@test) {
chomp($line);
print "$line\n";
}
print "\nnext five lines being processed\n\n";
### dels the first 5 lines ###
@test= splice(@test,5);
foreach $line (@test) {
chomp($line);
print "$line\n";
}
What I need to do is call the first 5 lines of the text file and process them, then delete them and grab the next 5 lines, process them and delete them, ect...
However, I cant seem to get just the first 5 lines of the array and process them, using the code above, it calls all the lines in the array, but the splice does take out the first five lines after being.
Any ez solutions on this (not too famillar with perl yet, but am learning)?
Shawn (DMG2000)
compute_x@yahoo.com
### Gets the text fil ###
$list = 'list22.txt';
open(INF,"$list"
@test = <INF>;
### for each line, writes the line####
foreach $line (@test) {
chomp($line);
print "$line\n";
}
print "\nnext five lines being processed\n\n";
### dels the first 5 lines ###
@test= splice(@test,5);
foreach $line (@test) {
chomp($line);
print "$line\n";
}
What I need to do is call the first 5 lines of the text file and process them, then delete them and grab the next 5 lines, process them and delete them, ect...
However, I cant seem to get just the first 5 lines of the array and process them, using the code above, it calls all the lines in the array, but the splice does take out the first five lines after being.
Any ez solutions on this (not too famillar with perl yet, but am learning)?
Shawn (DMG2000)
compute_x@yahoo.com