harry1705 has asked for the wisdom of the Perl Monks concerning the following question:
I am a perl beginner,I am working on windows7 usin strawberry perl, I am trying to open a file using
If i had to open some file from say C:\perl_tests\test.txt, what should be the string $fname#opening a file, checking the error code. $fname="/home/isg/report.txt"; open xyz, $fname or die "Error in open:$!"; while(<xyz>){ print "line number $. is : $_"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file basics
by repellent (Priest) on Mar 11, 2012 at 22:33 UTC | |
by harry1705 (Initiate) on Mar 12, 2012 at 01:15 UTC | |
by Anonymous Monk on Mar 12, 2012 at 12:41 UTC | |
by harry1705 (Initiate) on Mar 13, 2012 at 04:02 UTC |