http://qs321.pair.com?node_id=76128

Q&A > input and output > Capturing input from pipe? - Answer contributed by Zombie lowlife

Okeeee, that was ALLOT simpler then I thought but it works exactly like I want, thanks allot.