open(INFO,$file); while(){ print if /\bint\b/; print if /\bfloat\b/; } close(INFO)