Re: Loading images with CGI.pm...Rephrased

2001-06-06 Thread Gary Stainburn
On Tuesday 05 June 2001 3:41 pm, Rich Fernandez wrote: > > -Original Message- > > From: Timothy Kimball [mailto:[EMAIL PROTECTED]] > > > > print STDOUT $query->header( > > -type => "video/mpeg", > > ); > > > > open MOVIE, $vidfile or die "Couldn't open $vidfile: $!"; > > while ( read(

RE: Loading images with CGI.pm...Rephrased

2001-06-05 Thread Timothy Kimball
Rich Fernandez: : Is there an advantage to using "read", as you did above, as opposed to : just saying: : : while(){print;} : close MOVIE; : : Or is it just a case of TMTOWTDI? It's more efficient to read() binary files than to loop through them with <>. "while (<...>)" is good for text fil

RE: Loading images with CGI.pm...Rephrased

2001-06-05 Thread Rich Fernandez
> -Original Message- > From: Timothy Kimball [mailto:[EMAIL PROTECTED]] > print STDOUT $query->header( > -type => "video/mpeg", > ); > > open MOVIE, $vidfile or die "Couldn't open $vidfile: $!"; > while ( read(VIDFILE, $_, 100_000) ) { print STDOUT; } > close MOVIE; > Thanks, thi

RE: Loading images with CGI.pm...Rephrased

2001-06-05 Thread Timothy Kimball
Rich Fernandez wrote: : Thanks for your responses but : I guess I wasn't clear enough with my original question. Sorry. : Let me try again... oops, sorry about that... didn't read your code fully. : I _already_ have a link on my page that says : http://gromit/cgi-bin/juggling.pl?video=rr.mpg> :

RE: Loading images with CGI.pm...Rephrased

2001-06-05 Thread Rich Fernandez
Thanks for your responses but I guess I wasn't clear enough with my original question. Sorry. Let me try again... I _already_ have a link on my page that says http://gromit/cgi-bin/juggling.pl?video=rr.mpg> Rubinstein's Revenge" When this link is clicked, my script will parse the URL and determi

Re: Loading images with CGI.pm

2001-06-05 Thread Gary Stainburn
The problem's probably because of file locations. If you don't supply a path in the img tag, it asumes the image is in the same directory as the cgi, and not in the web site's home directory which is presumably where you put the html file. Gary On Tuesday 05 June 2001 2:11 pm, Rich Fernandez

Re: Loading images with CGI.pm

2001-06-05 Thread Timothy Kimball
Rich Fernandez wrote: : I'm playing around with a web page that serves up an image or video file. : If I use straight HTML I can create a link that says something like "" and have the video display when the link is clicked, but I : can't get the right syntax using CGI.pm. Probably trivial, but...