in reply to Converting C #define to 'use constant' statements
Try this:
perl -ne 'print if s!#\s*define\s+(\S+)\s+([^(?:\s*/\*.*\*/)])$!use co +nstant $1 => $2;!g' /usr/include/linux/elf.h >> Constants.pm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)RE: Converting C #define to 'use constant' statements
by tye (Sage) on Nov 03, 2000 at 20:35 UTC | |
by btrott (Parson) on Nov 03, 2000 at 22:43 UTC |