Other Languages on the JVM Village

Love Jython? Can't get enough JRuby? Groovy? Dynamic languages on the JVM can set you free! Scala? Sure! Let us know what you think here in the Other Languages on the JVM SIG

Scala Example: a simple cat command

Hi,
Here is a simple Scala script that prints or concatenates text files:

//file: cat.scala
import java.io._

val files = args
for(f <- files){
val reader = new BufferedReader(new FileReader(f))
var ln: String = null
while({ln = reader.readLine; ln != null})
println(ln)
}


Happy programming!
-Z