Hi,
I want to convert the following lines from Perl to Ruby. And I cannot
figure out how to load the file into memory:
The Perl file:
open (DEF, "<$input_def") || die "$0: cannot read $input_def\n";
$/ = undef; # read the entire file...
$_ = <DEF>; # ...into memory
close(DEF);
$sep = "\003"; # Use cntl-C as a separator between elements
s/\n\s*-\s/\n$sep /g; # replace leading dashes with separator
s/#[^\n]*\n/ /g; # delete comments
s/\s+/ /g; # replace all newlines with space
....
Thanks
Craig
--
___________________________________________________________________________
Craig Files, PhD | /
http://coxcomb.ftc.agilent.com/~cfiles/ | __o /
craig_files / agilent.com | \<, /
____________________________________________|_____()/ ()____/ (970)288-0183