a*****j 发帖数: 13 | 1 is it possible that I push filehandles into an array
like the following:
for($i=0; $i<10; ++$i)
{
open(tmp,"./abc.txt") or die(...);
push(@file_list, $tmp);
}
....
while(@file_list)
close(pop(@file_list));
I used the similar code like the above, but it gave me compilation errors.
another question: wot is the option that I should use to see compilation
errors from perl?
I am a pretty newbee in perl, please help!
//bow | a***r 发帖数: 35 | 2
while(@file_list){
close(pop(@file_list));
}
?
【在 a*****j 的大作中提到】 : is it possible that I push filehandles into an array : like the following: : for($i=0; $i<10; ++$i) : { : open(tmp,"./abc.txt") or die(...); : push(@file_list, $tmp); : } : .... : while(@file_list) : close(pop(@file_list));
| b*m 发帖数: 5 | 3
【在 a*****j 的大作中提到】 : is it possible that I push filehandles into an array : like the following: : for($i=0; $i<10; ++$i) : { : open(tmp,"./abc.txt") or die(...); : push(@file_list, $tmp); : } : .... : while(@file_list) : close(pop(@file_list));
|
|