summaryrefslogtreecommitdiff
path: root/dists/win32/shebang-activeperl.pl
blob: b9b27641acb7c4c72f857b1e6c70d3ef8374a1cb (plain)
  1. #!c:\perl\bin\perl
  2. # Use this script to convert the beginnings of files to the path to ActivePerl
  3. # if you are installing with ActivePerl.
  4. opendir DIR, ".";
  5. @perlfiles = grep /\.pl/, readdir DIR;
  6. closedir DIR;
  7. foreach $file (@perlfiles) {
  8. open FH, '+<', "$file";
  9. @file = <FH>;
  10. seek( FH, 0, 0 );
  11. truncate( FH, 0 );
  12. $line = shift @file;
  13. if ($line =~ /^#!/) {
  14. print FH "#!c:\\perl\\bin\\perl\n";
  15. } else {
  16. print FH $line;
  17. }
  18. print FH @file;
  19. close(FH);
  20. }