Suggestions other than grep -b3 :-)
McGlinchy, Alistair
Alistair.McGlinchy at marks-and-spencer.com
Thu Apr 13 15:52:03 BST 2006
Depending on the style of code it could be useful. It won't catch
everything and it will find false positives
$/ = '\nsub';
while (<DATA>) {
if (/ \b
my \s+ (\$\S+) \b
.*
my \s+ \1 \b
/sxm ) {
print "duplicate 'my'ing of $1 found in\nsub $_";
}
}
**********************************************************************
Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
London
W2 1NW
Registered No. 214436 in England and Wales.
Telephone (020) 7935 4422
Facsimile (020) 7487 2670
<<www.marksandspencer.com>>
Please note that electronic mail may be monitored.
This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful.
2005
More information about the london.pm
mailing list