hackMM
raw| 1 | #!/usr/local/bin/perl -w |
| 2 | |
| 3 | use File::Find; |
| 4 | |
| 5 | @files = (); |
| 6 | |
| 7 | sub wanted |
| 8 | { |
| 9 | if (/^Makefile.PL$/) |
| 10 | { |
| 11 | push(@files,"$File::Find::dir/$_"); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | find(\&wanted,"."); |
| 16 | |
| 17 | @ARGV = @files; |
| 18 | |
| 19 | |
| 20 | $^I = ".old"; |
| 21 | |
| 22 | while (<>) |
| 23 | { |
| 24 | if (s/\$Version\b/\$myVersion/g) |
| 25 | { |
| 26 | print STDERR "$ARGV:$.:$_"; |
| 27 | } |
| 28 | print; |
| 29 | } |