From: Tristan Knowles Date: 2005-07-17T01:00:36+09:00 Subject: Reading only files within a dir I am trying to create two html drop downs in a ruby script. The first to select a /var/log directory, and the second to view a specific file within that directory. I'm just unsure of how to pass a post variable back into the ruby script, or whether there is another way to do this? My current code is like this: ======== # List dir names puts "
" puts "\n" puts "
" # List File names puts "
" puts "\n" puts "
" ======== So, i need to pass the post variable from the select box for the dir to the select box below, and from there onto my script below to actually view the contents (already have the last part working, using a normal variable). Also, is there any different between Dir.entries and Dir.foreach? Isn't Dir.foreach the same as Dir.entries("/dir").each? Thanks. Tristan ___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com