while (my $line = <>) {
  if (($fn) = ($line =~ /\@include\(([^\)]+)\)/)) {
    if ( -f $fn) {
      open F, $fn or die $!;
      local $/;
      my $content = <F>;
      close F;
      $line =~ s/\@include\([^\)]+\)/$content/;
    }
  }
  print $line;
}
