Rob and David,

  Thanks very much! That's exactly what I am looking
for and sorry for the misleading subject on the email.


Rob: Could you please explain why you need 2 questions
marks on line#7 instead of just one minimal quantifier
needed  (I hope I am using the right words this time
!!!).

Thanks,
Ramesh

1 while ( $code =~ m{
2    \#(ifn?def) \s+ def \s* \n
3    (.*?) \s+
4    (?:
5    \#else \s+ def \s* \n
6    (.*?) \s+
7    )??   
8    \#endif \s+ def \s* \n
9  }isxg ) {

10  my ($def, $undef) = $1 eq 'ifdef' ? ($2, $3 
11  || '') : ($3 || '', $2);

12  printf "  Defined: %s\n", $def;
13  printf "Undefined: %s\n", $undef;
14  print "\n";
}




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to