i'm a java c/c++ person. trying out ruby for the 1st time!
how do i do something like this in ruby:
//this is java
public static void main ( String args [] ) {
File inFile = new File ( args [ 0 ] );
File outFile = new File ( args [ 1 ] );
DataInputStream reader = new DataInputStream ( new BufferedInputStream ( new FileInputStream ( inFile ) ) );
BufferedWriter writer = new BufferedWriter ( new FileWriter ( outFile ) );
String str;
while (str = reader.readline() != null){
writer.write (str);
}
}
note that this code may not compile i pulled it off of a java program i did a while back.
drjay