Check engine light on...starts up but stalls out within a few seconds. on 1996 Subaru Legacy Outback

The check engine light has been on for awhile, but, the vehicle still ran well. Long story short, it finally began to run rough and we limped it home. Changed fuel filter. Car will start right up and run fairly smooth but, die out within a few seconds. If I play with the accelerator pedal I can keep it running at about 3500 rpm's. Any ideas?

Asked by for the 1996 Subaru Legacy Outback
There's a reson for that light. It means get it checked out not ignore it.
Thank you Matte, somebody with a brain that knows how to use it.
4 more answers , 1 more comment
I have the same problem
can you tell me what was your solution
The Check Engine Light means there's a failure in your emissions control system ( The symptoms you describe are consistent with an emission control problem, and you'll need for a professional diagnostic tech to read the trouble codes and diagnose the problem. There's generally no easy fix to a serious emission control fault like the one your are experiencing.
Matte, have you noticed that there always seems to be some smart*ss offering nothing constructive in their answer. If he didn't have anything beneficial to add he should mind his own business.

Thank you Matte....I appreiciate your help.
First off, if you are mechanically inclined, i would start with a $20 repair manual. It will help you maintain, troubleshoot and repair most "basic" problems.
Second,and more toward the prob at hand, I have had the same problem, and it ended up being a cheap, but fairly simple repair....PCV valve check/replacement.
could also be a sensor, i.e. Throttle position, Mass Air Flow or Pressure sensor, (all have some similar symptoms), but you may nee the OBD II scanner for that!
buy $25 obd scanner and check codes.