home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rbemx144.zip / ruby-1.4.4 / sample / dir.rb < prev    next >
Text File  |  1998-01-16  |  170b  |  11 lines

  1. # directory access
  2. # list all files but .*/*~/*.o
  3. dirp = Dir.open(".")
  4. for f in dirp
  5.   $_ = f
  6.   unless (~/^\./ || ~/~$/ || ~/\.o/)
  7.     print f, "\n"
  8.   end
  9. end
  10. dirp.close
  11.