#!/usr/bin/perl -w use strict; map { print if s!#\s*define\s+(\S+)\s+([^(?:\s*/\*.*\*/)]+)$!use constant $1 => $2;!g; } <>;