fork(5) download
  1. #!/usr/bin/env perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. while (<DATA>) {
  7.  
  8. if (/^index[1-9][0-9]{0,2}\.htm$/) {
  9. print "* [$_]\n";
  10. } else {
  11. print " [$_]\n";
  12. }
  13. }
  14.  
  15. __DATA__
  16. index0.htm
  17. index1.htm
  18. index2.htm
  19. index2.html
  20. sindex1.htm
  21. some-index1.htm
  22. index11.htm
  23. index111.htm
  24. index999.htm
  25. index1000.htm
  26.  
Success #stdin #stdout 0s 3696KB
stdin
Standard input is empty
stdout
  [index0.htm]
* [index1.htm]
* [index2.htm]
  [index2.html]
  [sindex1.htm]
  [some-index1.htm]
* [index11.htm]
* [index111.htm]
* [index999.htm]
  [index1000.htm]