while(<>){ if( $. == 1 ){ warn "i'm splitting"; ... } ... }