[23726] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5932 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 12 11:05:48 2003

Date: Fri, 12 Dec 2003 08:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 12 Dec 2003     Volume: 10 Number: 5932

Today's topics:
        can not make <linh@chello.no>
    Re: can not make <carsten@welcomes-you.com>
    Re: How to map URL to %xx? <syscjm@gwu.edu>
        MAKE QUICK CASH RIGHT NOW!!! 100% LEGAL, INSTRUCTIONS I <acidcash@houston.rr.com>
        MAKE THOUSANDS NOW!!! EARN TONS OF CASH TODAY!!! NO GIM <acidcash@houston.rr.com>
    Re: open/seek vs IO::Open/setpos news@roaima.freeserve.co.uk
    Re: Parsing delimiter-separated data. <a24061@yahoo.munged>
    Re: Parsing delimiter-separated data. (Anno Siegel)
        Sending default code back to browser (Page)
    Re: Sending default code back to browser <noreply@gunnar.cc>
        Truncate a file from the beginning <bg@euro.net>
    Re: Truncate a file from the beginning <Paul.E.Boardman@umist.ac.uk>
    Re: Truncate a file from the beginning <bg@euro.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 12 Dec 2003 13:50:39 +0100
From: ngoc <linh@chello.no>
Subject: can not make
Message-Id: <oprz2japphozc6tv@news.online.no>

Hi
I try to install one package under Solaris.
> perl Makefile.PL
> make
The error message is /prog/gcc/bin/SUNSV/gcc command not found
I have gcc only in /usr/local/bin and
"which gcc" point to this location
How to solve this problem?
(I do the same in Linux, all OK. But not in Solaris).
Ngoc


------------------------------

Date: Fri, 12 Dec 2003 14:12:16 +0100
From: Carsten Aulbert <carsten@welcomes-you.com>
Subject: Re: can not make
Message-Id: <brcerj$1r57e$1@ID-213226.news.uni-berlin.de>

Hi Anonymous,

ngoc wrote:

> The error message is /prog/gcc/bin/SUNSV/gcc command not found
> I have gcc only in /usr/local/bin and
> "which gcc" point to this location
> How to solve this problem?

Try (under Bourne like shells)
CC=/usr/local/bin/gcc make

under C-shell
setenv CC /usr/local/bin/gcc
make

Otherwise, try hacking the Makefile itself

HTH

CA


------------------------------

Date: Fri, 12 Dec 2003 09:51:44 -0500
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: How to map URL to %xx?
Message-Id: <3FD9D600.6040302@gwu.edu>

Matija Papec wrote:
> On Fri, 12 Dec 2003 04:00:31 GMT, "Liberal" <test@test.com> wrote:
> 
> 
>>$url =~ s/([^\w.-])/sprintf "%%%02X", ord $1/eg;
>>
>>don't understand it and don't care. it works.
> 
> 
> So, you just wanted to share your thoughts with the world? :)
> 
Well, posting the answer to your own question if you find it elsewhere
is good netiquette; you have to give him credit for that, even if his
attitude towards understanding the code he uses is horrible.

                Chris Mattern



------------------------------

Date: Fri, 12 Dec 2003 12:17:01 GMT
From: "MAKE CASH NOW!!!" <acidcash@houston.rr.com>
Subject: MAKE QUICK CASH RIGHT NOW!!! 100% LEGAL, INSTRUCTIONS IN THIS POST!!
Message-Id: <1liCb.169420$do1.123808@twister.austin.rr.com>

HOW TO MAKE TONS OF QUICK MONEY, GUARANTEED!

I was browsing through news groups just like you are now, and 
came across an article similar to this that said you can make
 thousands of dollars within weeks >with only an investment of 
$6.00. So I thought, "yeah right, must be a scam," but like most of
 us, I was curious, so I kept reading. Anyway, it said that you send $1 to each of the 6 names and addresses stated in the article. You then place your own name and address on the bottom of the list and post the article in at least 200 news groups. No catch that was it. So after thinking it over, I thought about trying it. I figured, "What have I got to lose; only 6 stamps & $6, right?" Then I invested the measly $6. Within days I started getting money in the mail. I figured it would end soon, but the money kept coming. In my first week I made $47. By the second week I had over a thousand dollars. As the weeks went, the money grew. It is certainly worth the $6 investment and 6 stamps! Let me explain how & why it works. Also, make sure you save it to your computer, so you can get the information. Please follow the directions EXACTLY, and thousands of dollars can be yours in weeks. You are in the business of developing Mailing Lists. Many large corporations are happy to pay big !
bucks for lists. Here Are The 4 Easy Steps To Success: Get 6 separate pieces of paper and write the
 following on each piece of paper: "PLEASE PUT ME ON YOUR 
MAILING LIST." Now get 6 $1 bills and place 1 inside of each of the
 6 pieces of paper so the bill will not be seen through the envelope
 (to prevent theft). Next, place 1 paper in each of the 6 envelopes 
and seal them with the $1 bill enclosed. You now should have 6 
sealed envelopes each with a piece of paper stating the above 
phrase and a $1 bill enclosed in each envelope. What you are 
doing is creating a service - THIS IS 100% LEGAL! You are 
requesting a legitimate service and you are paying for it. I was a 
little skeptical about the legal aspects of it all so I checked it out 
with the Postal Service (1-800-275-8777) and they confirmed that
 it is legal. Mail the six envelopes to the following addresses:

[1] Mike Collett PO Box 68037 Tucson, AZ 85737
[2] Latrese Branch 1570 Lakeside Drive Prince George, VA 23875  
[3] Pamela Marmolejo 1055 Cardiff Way Beaumont, CA 92223
[4] Lea Vigil 5212 Arden Dr. Temple City, CA 91780
[5] Raymond Howe 214 Jones RD., Lot24 Saratoga Springs, NY
[6] Justin Butler 7201 Spencer Hwy. # 251 Pasadena, TX 77505 

Now take the #1 name off the list that you see above, move the 
other names up (6 becomes 5, 5 becomes 4, 4 becomes 3, etc.) Add YOUR NAME as   number 6 on the list. Try to keep this article as close to the original as possible and post your article to at least 200 news groups. All you need is 200, but the more you post, the more money you make! NOTE: You may want to retain every name and address sent to you. This VERIFIES that you are truly providing a service. Your name will be moved up the list geometrically so that when your name reaches the #1 position you will be receiving Thousands of Dollars in Cash! What an opportunity for only $6, $1 for each of the 6 people listed above. Send it now, add your own name to the list and you're in business. You do not need to retype this letter to do your own posting. Simply put your cursor at the beginning of this letter and drag your cursor to the bottom of
this document, and select copy from the edit menu. Open a blank 
notepad and place your cursor at the top of the page. From the 
edit menu select paste. Save your new notepad file as a text File, if 
you want to do your posting in different settings, you will always 
have this file to go back to. Use the Internet and search for various 
news groups (forums, message boards, discussions). Visit these 
message boards and post this article as a new message by 
highlighting the text of this letter and selecting paste from the edit 
menu. You are finished and have finished your first posting. 
Congratulations! THAT`S IT. All you have to do is post away. 
*THE MORE YOU POST, THE MORE MONEY YOU WILL MAKE* MAKE 
CERTAIN ADDRESSES ARE CORRECT 

Assume you get a 7.5% return: When you do 200 posts, 15 people 
send you $1.00 Those 15 do 200 posts, 225 people send you $1.00 
Those 225 do 200 posts, 3,375 people send you $1.00 Those 3,375
 do 200 posts, 50,625 people send you $1.00 Those 50,625 do 200
 posts, 759,375 people send you $1.00  So far you have received 
at least $759,375. With an original investment of only $6.00. 
Thousands of people all over are joining the Internet and reading 
these articles every day, JUST LIKE YOU right now. So you can turn 
$6 into thousands! 





------------------------------

Date: Fri, 12 Dec 2003 15:23:23 GMT
From: "MAKE MONEY RIGHT NOW!!!" <acidcash@houston.rr.com>
Subject: MAKE THOUSANDS NOW!!! EARN TONS OF CASH TODAY!!! NO GIMMICK!!!
Message-Id: <L3lCb.178611$do1.115973@twister.austin.rr.com>

READING THIS COULD CHANGE YOUR LIFE! 

I found this on a bulletin board and decided to try it. A little 
while back, I was browsing through newsgroups, just like you are now, 
and came across an article similar to this that said you could make 
thousands of dollars within weeks with only an initial investment of 
$6.00! So I thought, Yeah right, this must be a scam,but 
like most of us, I was curious, so I kept reading. Anyway, it said 
that you send $1.00 to each of the 6 names and address stated in the 
article. You then place your own name and address in the bottom of 
the list at #6, and post the article in at least 200 newsgroups. 
(There are thousands) No catch, that was it. So after thinking it 
over, and talking to a few people first, I thought about trying it. I 
figured: what have I got to lose except 6 stamps and $6.00, 
right? Then I invested the measly $6.00. Well GUESS WHAT!!... 
within 7 days, I started getting money in the mail! I was shocked! I 
figured it would end soon, but the money just kept coming in. In my 
first week, I made about $25.00. By the end of the second week I had 
made a total of over $1,000.00! In the third week I had over 
$10,000.00 and it's still growing. This is now my fourth week and I 
have made a total of just over $42,000.00 and it's still coming in 
rapidly. It's certainly worth $6.00, and 6 stamps, I have spent more 
than that on the lottery!! Let me tell you how this works and most 
importantly, why it works....Also, make sure you print a copy of this 
article NOW, so you can get the information off of it as you need it. 
I promise you that if you follow the directions exactly, that you 
will start making more money than you thought possible by doing 
something so easy! 
Suggestion: Read this entire message carefully! (print it out or 
download it.) Follow the simple directions and watch the money come in! 
It's easy. It's legal. And, your investment is only $6.00 (Plus postage) 

IMPORTANT: This is not a rip-off; it is not indecent; it is not 
illegal; and it is virtually no risk - it really works!!!! 
If all of the following instructions are adhered to, you will receive 
extraordinary dividends. 

PLEASE NOTE: 
Please follow these directions EXACTLY, and $50,000 or more can be 
yours in 20 to 60 days. This program remains successful because of 
the honesty and integrity of the participants. Please continue its 
success by carefully adhering to the instructions. 
You will now become part of the Mail Order business. In this business 
your product is not solid and tangible, it's a service. You are in 
the business of developing Mailing Lists. Many large corporations are 
happy to pay big bucks for quality lists. However, the money made 
from the mailing lists is secondary to the income which is made from 
people like you and me asking to be included in that list. 
Here are the 4 easy steps to success: 

STEP 1: Get 6 separate pieces of paper and write the following on 
each piece of paper;PLEASE PUT ME ON YOUR MAILING LIST. Now 
get 6 US $1.00 bills and place ONE inside EACH of the 6 pieces of 
paper so the bill will not be seen through the envelope (to prevent 
thievery). Next, place one paper in each of the 6 envelopes and seal 
them. You should now have 6 sealed envelopes, each with a piece of 
paper stating the above phrase, your name and address, and a $1.00 
bill. What you are doing is creating a service. THIS IS ABSOLUTELY 
LEGAL! You are requesting a legitimate service and you are paying for 
it! Like most of us I was a little skeptical and a little worried 
about the legal aspects of it all. So I checked it out with the U.S. 
Post Office (1-800-725-2161) and they confirmed that it is indeed 
legal! Mail the 6 envelopes to the following addresses: 


#1) 	Matt Madracki 
	P.O. Box 1529 
	Sutton West, Ontario 
	L0E 1R0 

#2) 	DT Clark 
	700 forbes ave apt C14 
	pittsburgh pa, 15219 

#3) 	K WHITAKER
	RR# 2 BOX 2032
	HALLSTEAD PA 18822 

#4) 	SHANNON NICKERSON
	P.O. BOX 95 CLARK'S 
	HARBOUR SHELB.CO NS
	B0W 1P0

#5) 	DANNY MARLO
	655 EAST 92 ST
	BROOKLYN NY, 11236

#6)	Justin Butler
	7201 Spencer Hwy. # 251
	Pasadena, TX 77505


STEP 2: Now take the #1 name off the list that you see above, move 
the other names up (6 becomes 5, 5 becomes 4, etc...) and add YOUR 
Name as number 6 on the list. 

STEP 3: Change anything you need to, but try to keep this article as 
close to original as possible. Now, post your amended article to at 
least 200 newsgroups. (I think there are close to 24,000 groups) All 
you need is 200, but remember, the more you post, the more money you make! 
This is perfectly legal! If you have any doubts, refer to Title 18 
Sec. 1302 & 1341 of the Postal lottery laws. 
Keep a copy of these steps for yourself and, whenever you need money, 
you can use it again, and again. 

PLEASE REMEMBER that this program remains successful because of the 
honesty and integrity of the participants and by their carefully 
adhering to the directions. Look at it this way. If you are of 
integrity, the program will continue and the money that so many 
others have received will come your way. 

NOTE: You may want to retain every name and address sent to you, 
either on a computer or hard copy and keep the notes people send you. 
This VERIFIES that you are truly providing a service. (Also, it might 
be a good idea to wrap the $1 bill in dark paper to reduce the risk of mail
theft.) 

So, as each post is downloaded and the directions carefully followed, 
six members will be reimbursed for their participation as a List 
Developer with one dollar each. Your name will move up the list 
geometrically so that when your name reaches the #1 position you will 
be receiving thousands of dollars in CASH!!! What an opportunity for 
only $6.00 ($1.00 for each of the first six people listed above) Send 
it now, add your own name to the list and you're in business! 

---DIRECTIONS ----- FOR HOW TO POST TO NEWSGROUPS------------ 
Step 1) You do not need to re-type this entire letter to do your own 
posting. Simply put your cursor at the beginning of this letter and 
drag your cursor to the bottom of this document, and select 'copy' 
from the edit menu. This will copy the entire letter into the 
computer's memory. 

Step 2) Open a blank 'notepad' file and place your cursor at the top 
of the blank page. From the 'edit' menu select 'paste'. This will 
paste a copy of the letter into notepad so that you can add your name 
to the list. 

Step 3) Save your new notepad file as a .txt file. If 
you want to do your postings in different settings, you'll always 
have this file to go back to. 

Step 4) Use Netscape or Internet explorer and try searching for 
various newsgroups (on-line forums, message boards, chat sites, 
discussions.) 

Step 5) Visit these message boards and post this article as a new 
message by highlighting the text of this letter and selecting paste 
from the edit menu. Fill in the Subject, this will be the header that 
everyone sees as they scroll through the list of postings in a 
particular group, click the post message button. You're done with 
your first one! Congratulations...THAT'S IT! All you have to do is 
jump to different newsgroups and post away, after you get the hang of 
it, it will take about 30 seconds for each newsgroup! 
**REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE MONEY YOU WILL MAKE!! BUT
YOU HAVE TO POST A 
MINIMUM OF 200** 
That's it! You will begin receiving money from around the world within days!
You may eventually want to rent a P.O.Box due to the large amount of mail you 
will receive. If 
you wish to stay anonymous, you can invent a name to use, as long as 
the postman will deliver it. 
**JUST MAKE SURE ALL THE ADDRESSES ARE CORRECT.** 

Now the WHY part: 
Out of 200 postings, say I receive only 5 replies (a very low example). So then
I made $5.00 with my name at #6 on the letter. Now, each of the 5 persons 
who just sent me $1.00 make the MINIMUM 200 
postings, each with my name at #5 and only 5 persons respond to each 
of the original 5, that is another $25.00 for me, now those 25 each 
make 200 MINIMUM posts with my name at #4 and only 5 replies each, I 
will bring in an additional $125.00! Now, those 125 persons turn 
around and post the MINIMUM 200 with my name at #3 and only receive 5 
replies each, I will make an additional $626.00! OK, now here is the 
fun part, each of those 625 persons post a MINIMUM 200 letters with 
my name at #2 and they each only receive 5 replies, that just made me 
$3,125.00!!! Those 3,125 persons will all deliver this message to 200 
newsgroups with my name at #1 and if still 5 persons per 200 
newsgroups react I will receive $15,625,00! With an original 
investment of only $6.00! AMAZING! When your name is no longer on the 
list, you just take the latest posting in the newsgroups, and send 
out another $6.00 to names on the list, putting your name at number 6 
again. And start posting again. The thing to remember is: do you 
realize that thousands of people all over the world are joining the 
internet and reading these articles everyday?, JUST LIKE YOU are 
now!! So, can you afford $6.00 and see if it really works?? I think 
so... People have said, "e;what if the plan is played out and no 
one sends you the money? So what! What are the chances of that 
happening when there are tons of new honest users and new honest 
people who are joining the internet and newsgroups everyday and are 
willing to give it a try? Estimates are at 20,000 to 50,000 new 
users, every day, with thousands of those joining the actual 
internet. 
Remember: play FAIRLY and HONESTLY and this will really 
work.


------------------------------

Date: 12 Dec 2003 13:45:24 GMT
From: news@roaima.freeserve.co.uk
Subject: Re: open/seek vs IO::Open/setpos
Message-Id: <brcgnn$1r2ja$1@ID-127751.news.uni-berlin.de>

James Willmore <jwillmore@remove.adelphia.net> wrote:
>>      $h->setpos (0, SEEK_SET)        # use Fcntl qw/:DEFAULT :seek/

> You have to 'getpos' first - if I read the documentation properly.
> Then, 'setpos'.

Given that getpos returns an opaque value, it seems to me that providing
a WHENCE value (i.e. SEEK_SET in my example) is meaningless. Can anyone
provide a counter-example?

Cheers,
Chris
--
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


------------------------------

Date: Fri, 12 Dec 2003 14:25:05 +0000
From: "Adam" <a24061@yahoo.munged>
Subject: Re: Parsing delimiter-separated data.
Message-Id: <E1AUoE5-00063n-MS@garcia.ducksburg.lan>

> //  I'm writing a hash (string keys, string values) to a text file (by STDOUT) 
> //  for reading later, and I decided on the following format:
> //  
> //  key|value|
> //  another key|another value|
> //  
> //  to make the file clearly human-readable (the values and keys can contain 
> //  spaces).  I've also provided for escaping ``|'' and ``\'' in the data with 
> //  ``\|'' and ``\\'' respectively.
 ..
> //  What's the best way to reverse the escapes?
> 
> What is the best way? Here is *a* way of dealing with it:
 ..
> while (<DATA>) {
>     chomp;
>     my ($key, $value) = /^([^\\|]*(?:\\.[^\\|]*)*)\|([^\\|]*(?:\\.[^\\|]*)*)\|$/
>          or next;
>     map {s/\\(.)/$1/g} $key, $value;
>     print "[$key] [$value]\n";
> }

Thanks -- that's much better.  I wonder if it would be more effective
just to work from left to right by characters instead of using a
regexp.

Since this is a standard, traditional, Unix file format, isn't there a
"canonical" way to analyse it?

-- Adam










------------------------------

Date: 12 Dec 2003 14:51:34 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Parsing delimiter-separated data.
Message-Id: <brcklm$e82$1@mamenchi.zrz.TU-Berlin.DE>

Adam <a24061@yahoo.munged> wrote in comp.lang.perl.misc:
> > //  I'm writing a hash (string keys, string values) to a text file (by
> STDOUT) 
> > //  for reading later, and I decided on the following format:
> > //  
> > //  key|value|
> > //  another key|another value|
> > //  
> > //  to make the file clearly human-readable (the values and keys can contain 
> > //  spaces).  I've also provided for escaping ``|'' and ``\'' in the
> data with 
> > //  ``\|'' and ``\\'' respectively.

[...]

> Since this is a standard, traditional, Unix file format, isn't there a
> "canonical" way to analyse it?

The file format is usually called CSV (comma separated values), even if
the separator can be something else.  Do a CPAN search for CSV.

Anno


------------------------------

Date: 12 Dec 2003 07:18:03 -0800
From: page_nix@hotmail.com (Page)
Subject: Sending default code back to browser
Message-Id: <745d2cc4.0312120718.47a017c@posting.google.com>

I'm not sure how this would work, but I'm guessing it's possible...

I have a Perl script that retrieves one of either two types of files, gifs
and pdfs.  It works well.  The URL specifices which gif or pdf is to be
returned.  The script finds the file on the server, opens it, and sends it
to the user's browser window.

My problem is when the user specifies a file that doesn't exist.  Because of
the nuances of Internet Explorer, if the user used a URL to view a PDF, the
next time that user uses that same url, a PDF is expected by IE to be
returned.  If I try to return HTML text saying, "Sorry, file not found", IE
has trouble rendering it since it isn't a PDF this time.  So what I'd like
to do is return a "default" PDF or GIF in the event that the file isn't
found.  I don't want to create a default PDF or GIF file though.   In other
words, I'd like to hardcode the GIF or PDF info in the Perl script.

Is this as easy as opening a PDF in a text editor, copying the code, and
pasting it into a Perl Print statement (making sure to send the appropriate
content headers of course)?  When I open a GIF in a text editor, I get some
pretty weird looking Hex code, so I didn't know if this approach would work.


------------------------------

Date: Fri, 12 Dec 2003 16:21:27 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Sending default code back to browser
Message-Id: <brcn1v$1snei$1@ID-184292.news.uni-berlin.de>

Page wrote:
> My problem is when the user specifies a file that doesn't exist.
> Because of the nuances of Internet Explorer, if the user used a URL
> to view a PDF, the next time that user uses that same url, a PDF is
> expected by IE to be returned. ...

Do you have a Perl question?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Fri, 12 Dec 2003 12:54:42 +0100
From: "BG" <bg@euro.net>
Subject: Truncate a file from the beginning
Message-Id: <70iCb.5164$n31.90007@news2.e.nsc.no>

Wanted: I'd like to cut of  n-bytes from the start of the file.

Problem: I have a CGI Perl script that return a wav file from GET requests.
I don't know any better method to send wav file than just putting the it in
the body of the returned html page. The returned html page will then be
processed (by the client that sent GET request, which also is a Perl
script). So this html page is binary file with HTML (ascii) header.  I need
to strip off the html header to be able to play the wav file.

Any helps would be appreciated.


BG




------------------------------

Date: Fri, 12 Dec 2003 12:23:44 -0000
From: "Paul Boardman" <Paul.E.Boardman@umist.ac.uk>
Subject: Re: Truncate a file from the beginning
Message-Id: <3fd9b3aa$1@news.umist.ac.uk>


"BG" <bg@euro.net> wrote in message
news:70iCb.5164$n31.90007@news2.e.nsc.no...
> Wanted: I'd like to cut of  n-bytes from the start of the file.
>
> Problem: I have a CGI Perl script that return a wav file from GET
requests.
> I don't know any better method to send wav file than just putting the it
in
> the body of the returned html page. The returned html page will then be
> processed (by the client that sent GET request, which also is a Perl
> script). So this html page is binary file with HTML (ascii) header.  I
need
> to strip off the html header to be able to play the wav file.
>
> Any helps would be appreciated.

Well, this really isn't a Perl problem.  The problem is that you don't
understand how to send wav files over HTTP.

You need to send a different header than the usual text/html one.  The
following page lists a common set of MIME types you might want to send:

http://www.galileo.edu/wp/presentation-html-download?presentation_id=193

The specific one you want is probably audio/x-wav.

Paul




------------------------------

Date: Fri, 12 Dec 2003 14:23:14 +0100
From: "BG" <bg@euro.net>
Subject: Re: Truncate a file from the beginning
Message-Id: <7jjCb.5186$n31.90185@news2.e.nsc.no>

Hi

The correct mime type is audio/x-wav as you said. I tried with
HTTP::Request (GET ftp://  ...) and got it confirmed.
I got it working by  (GET   http:// ....  ) now. Thanks.

BG



"Paul Boardman" <Paul.E.Boardman@umist.ac.uk> wrote in message
news:3fd9b3aa$1@news.umist.ac.uk...
>
> "BG" <bg@euro.net> wrote in message
> news:70iCb.5164$n31.90007@news2.e.nsc.no...
> > Wanted: I'd like to cut of  n-bytes from the start of the file.
> >
> > Problem: I have a CGI Perl script that return a wav file from GET
> requests.
> > I don't know any better method to send wav file than just putting the it
> in
> > the body of the returned html page. The returned html page will then be
> > processed (by the client that sent GET request, which also is a Perl
> > script). So this html page is binary file with HTML (ascii) header.  I
> need
> > to strip off the html header to be able to play the wav file.
> >
> > Any helps would be appreciated.
>
> Well, this really isn't a Perl problem.  The problem is that you don't
> understand how to send wav files over HTTP.
>
> You need to send a different header than the usual text/html one.  The
> following page lists a common set of MIME types you might want to send:
>
> http://www.galileo.edu/wp/presentation-html-download?presentation_id=193
>
> The specific one you want is probably audio/x-wav.
>
> Paul
>
>




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 5932
***************************************


home help back first fref pref prev next nref lref last post