.... sub res_init { if ($os eq "unix") { res_init_unix(); } .... } .... sub res_init_unix { read_config($resolv_conf) if (-f $resolv_conf) and (-r $resolv_conf); .... } .... sub read_config { .... while () { <------ This is line 235 where it fails .... } .... res_init()