|
Posted by Ch Lamprecht on June 16, 2006, 12:26 am
Please log in for more thread options
ivowel@gmail.com wrote:
> dear perl users: I want to write a function that extracts "ordinary"
> subroutines from perl code. (an equivalent task is extracting all
> macros from a latex file.) I am not trying to be too clever. let's
> presume I can recognize subs because subs and only subs always start at
> the first character of a line and are not anonymous. a sub is followed
> by a name and can contain nested expressions.
>
> I can do plain pattern matching to find the first occurance of the
> first sub: '^sub [a-zA-Z]+'. but now I am stuck. I need to continue
sub my_1st_sub_not_recognized {};
\w = a word character
Christoph
--
perl -e "print scalar reverse q/ed.enilno@ergn.l.hc/"
|