#!/usr/bin/perl while () { if (!$found && /^\#include/) { print "#include \"rsys/common.h\"\n"; $found = 1; } print $_; }