Gas Flows, Star Formation and Galaxy Evolution