G
George
I thought I would use perl instead of fortran to parse a text file, what
with the new m// s/// capabilities at my fingertips.
So it is that I need to open a text file and send it to STDOUT. This may
come across as a contemptable FAQ to some. I've just looked at all the
entries with the string 'file' beginning them in the index of the camel
book, and it's huge and ambiguous to a guy who is not in the native perl
environment, ie, a server, but simply needs to get a little io on windows.
This is what I have so far:
use strict;
use warnings;
my $divider= "%\n" # a percentage sign and a newline
# perl scraper1.pl
In fortran, the snippet would be:
open(unit=50,file='ehp3.txt',form='formatted')
do
read(50,*,iostat=eof) line
if (eof /= 0) exit
write(*,*) trim(line)
end do
close(unit=50)
Thanks for your comment.
--
George
It's going to be the year of the sharp elbow and the quick tongue.
George W. Bush
Picture of the Day http://apod.nasa.gov/apod/
with the new m// s/// capabilities at my fingertips.
So it is that I need to open a text file and send it to STDOUT. This may
come across as a contemptable FAQ to some. I've just looked at all the
entries with the string 'file' beginning them in the index of the camel
book, and it's huge and ambiguous to a guy who is not in the native perl
environment, ie, a server, but simply needs to get a little io on windows.
This is what I have so far:
use strict;
use warnings;
my $divider= "%\n" # a percentage sign and a newline
# perl scraper1.pl
In fortran, the snippet would be:
open(unit=50,file='ehp3.txt',form='formatted')
do
read(50,*,iostat=eof) line
if (eof /= 0) exit
write(*,*) trim(line)
end do
close(unit=50)
Thanks for your comment.
--
George
It's going to be the year of the sharp elbow and the quick tongue.
George W. Bush
Picture of the Day http://apod.nasa.gov/apod/