Return to Snippet

Revision: 38310
at December 30, 2010 20:21 by miceno


Initial Code
new File("simple.tab").withReader{r->
    line = r.readLine();
    println "first line: $line"
    r.splitEachLine("\t"){fields->
            println "fields on line: $fields"
    }  
}

Initial URL
http://snipplr.com/developer/

Initial Description
Read a file with tabs

Initial Title
Read formatted file one-liner

Initial Tags

                                

Initial Language
Groovy