[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    [groovy-user] How to easily read from System.in?
From:       "Claus Hausberger" <CHausberger () gmx ! de>
Date:       2008-11-27 20:27:10
Message-ID: 20081127202710.86660 () gmx ! net
[Download RAW message or body]

Hello

I want to port some old Perl scripts to Groovy. In those scripts I have to read a lot \
from System.in.

I got this program working:


BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
print "input:"
String input = br.readLine()
println "input was:$input:"


It does exactly what I want but I wanted to ask if there is a shorter, more Groovy \
way to do this.


Claus
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: \
http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic