in reply to Matching C-Style comments
This takes the matching operator m, uses parens as delimiter to the regexpif ($file[$i] =~ m(/\*)) ...
Actually I tried it on the command line using
which seems to me like it works. Correct me if I'm getting things wrong. BTW: is there a better command line for this? I don't understand why the first line (which is what I type in) is echoed once$ perl -p -e 'print "MATCH" if m(/\*)' foo foo /* MATCH/*
| Regards... | Stefan |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching C-Style comments
by Abigail (Deacon) on Jun 20, 2001 at 02:44 UTC |