Hacker News new | ask | show | jobs
by TomK32 1283 days ago
That file is very different with an added rewind and now case/when.

    dirp = Dir.open(".")
    dirp.rewind
    for f in dirp
      if (~/^\./ || ~/~$/ || ~/\.o/)
      else
        print(f, "\n")
      end
    end
    dirp.close
1 comments

   if (~/^\./ || ~/~$/ || ~/\.o/)
ah, the perl heritage is strong here!