i have the written this logic :
basically a file operation
Expand|Select|Wrap|Line Numbers
- open (CONFIGFILE, "$config_file") or die;
- while (<CONFIGFILE>) {
- chomp;
- if ( ! ( $_ =~ /^#/ ) ) {
- $CONFIG = $CONFIG . $_ . " ";
- }
- }
- close (CONFIGFILE);
now my problem is :
Config file has some 10 to 15 lines but the above code run for a while even after reading all the line from the file.
now i need some sort of logic where i can terminate the looping once it finishes the reading the line or it encounter the some specail character or keep some wait_time variable & loop till wait_time exceeds.
Can anyone help me on how to achieve above said logic ??
i need to alter this code to suit the above said requirement
can anyone help me on this ??
Regards,
Vijayarl