bahadur has asked for the wisdom of the Perl Monks concerning the following question:
also when i try to print the temporary file using the while loop nothing is printed which means there is nothing in the file. so whats is the problem?$handle = tempfile(); binmode $handle; binmode $conn1; my $buffer=0; while(my $read = sysread($conn1,$buffer,100)) { print "Writing the file\n"; my $n= syswrite($handle,$buffer,100); } while(<$handle>) { print "$_\n"; } return *handle;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: saving a file using a temporary file's handle
by BrowserUk (Patriarch) on Jun 03, 2005 at 05:38 UTC | |
by bahadur (Sexton) on Jun 03, 2005 at 05:52 UTC | |
by bahadur (Sexton) on Jun 03, 2005 at 06:10 UTC | |
by BrowserUk (Patriarch) on Jun 03, 2005 at 07:07 UTC |