Re: opening a file
- From: Jürgen Exner <jurgenex@xxxxxxxxxxx>
- Date: Thu, 08 Jan 2009 10:52:23 -0800
cartercc <cartercc@xxxxxxxxx> wrote:
On Jan 7, 9:50 pm, George <geo...@xxxxxxxxxxxxxxx> wrote:
I thought I would use perl instead of fortran to parse a text file, what
with the new m// s/// capabilities at my fingertips.
Easy, easy, easy ...
open INFILE, "<nameoffile.txt";
Most people would suggest to use the three-argument form of open:
open INFILE, '<', 'nameoffile.txt';
Almost all people would strongly suggest to test for failure:
open INFILE, '<', 'nameoffile.txt' or
die "Cannot open nameoffile.txt because $!\n";
jue
.
- Follow-Ups:
- Re: opening a file
- From: George
- Re: opening a file
- References:
- opening a file
- From: George
- Re: opening a file
- From: cartercc
- opening a file
- Prev by Date: Re: opening a file
- Next by Date: Re: Regular Expression Question
- Previous by thread: Re: opening a file
- Next by thread: Re: opening a file
- Index(es):