in reply to regex for regex?
# in code.pl, for example if ( /test1/ ) { print; } my $re = qr/test2/; my @array = split( /test3/, $ARGV[0] );
perl -MO=Concise,-exec code.pl | grep "</>"
produces the output,
"</>" is the symbol for an OP with a regular expression. Someone smarter than I might tell you whether this will catch all the regex cases. If the regex is read in at runtime (with YAML or Storable, for example) I think B::Concise would tell you there was a regex involved, but not what it was.code.pl syntax OK 3 </> match(/"test1"/) s/RTIME 9 </> qr(/"test2"/) s/64 e </> pushre(/"test3"/) s/64
--Solo
--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex for regex?
by ikegami (Patriarch) on Jun 27, 2006 at 17:05 UTC |