in reply to Re: Perl always reads in 4K chunks and writes in 1K chunks... Loads of IO!
in thread Perl always reads in 4K chunks and writes in 1K chunks... Loads of IO!
This:
open DF, "test.txt" || die "Can't read 'test.txt': $!\n"
Does not do what you think it does.
The || ties itself to "test.txt", which is always true, and not to the return of the open.
This:
open(DF, "test.txt") || die "Can't read 'test.txt': $!\n"
or:
open DF, "test.txt" or die "Can't read 'test.txt': $!\n"
(or binds less tight than ||)
Would accomplish what you want.
GreetZ!,
print "profeth still\n" if /bird|devil/;
open DF, "test.txt" || die "Can't read 'test.txt': $!\n"
Does not do what you think it does.
The || ties itself to "test.txt", which is always true, and not to the return of the open.
This:
open(DF, "test.txt") || die "Can't read 'test.txt': $!\n"
or:
open DF, "test.txt" or die "Can't read 'test.txt': $!\n"
(or binds less tight than ||)
Would accomplish what you want.
GreetZ!,
- ChOas
print "profeth still\n" if /bird|devil/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl always reads in 4K chunks and writes in 1K chunks... Loads of IO!
by zebedee (Pilgrim) on Jan 04, 2006 at 02:01 UTC |
In Section
Seekers of Perl Wisdom