passing $fd as a reference



Hi everybody,

below is a few lines from http::daemon pod:

--
$c->send_file( $filename )
$c->send_file( $fd )

Copy the file to the client. The file can be a string (which will be
interpreted as a filename) or a reference to an IO::Handle or glob.
--

I have to admit I have never read file contents by IO::Handle

I usually go about it by:

my $song = 'song.mp3';
open my $fh1, '<', $song or die "open(): $!\n";
binmode $fh1;
close($fh1);

how can I tie the code above to $c->send_file( $fd ) ???

--

btw, when reading a binary file in order to move cursor position, do you
think I should use "seek" or "sysseek" and the should I use read the
file by "read" or "sysread" ??

thanks ever so much!
.



Relevant Pages

  • Re: passing $fd as a reference
    ... In article, Larry ... below is a few lines from http::daemon pod: ... Copy the file to the client. ... The file can be a string (which will be ...
    (comp.lang.perl.misc)
  • RE: Previously Functioning Date Interpreter Now Failing
    ... Dim Entry As String ... Dim Result As String ... Dim ClientElement As Variant 'Holds the extracted Client Number ... ElseIf IsNumeric= False _ ...
    (microsoft.public.excel.programming)
  • Previously Functioning Date Interpreter Now Failing
    ... Dim Entry As String ... Dim Result As String ... Dim ClientElement As Variant 'Holds the extracted Client Number ... ElseIf IsNumeric= False _ ...
    (microsoft.public.excel.programming)
  • Re: Threading a server
    ... I am getting myself into a really big hole with this and the client is a little upset. ... private TcpListener tcpListener; ... private string CurrentCommand ... public string ExpectedSubject ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: SoapHttpClientProtocol request canceled
    ... Since this is only happening on the VB client, is there any chance that the ... The VB.NET exe and the VB6 exe both use VB.NET dll to sent request/response ... > inputHeaderer, String messageControlPayload, string inputMessage) ... > Imports System.ComponentModel ...
    (microsoft.public.dotnet.framework.webservices)