[12728] in Perl-Users-Digest
Perl-Users Digest, Issue: 138 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 14 05:07:17 1999
Date: Wed, 14 Jul 1999 02:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 14 Jul 1999 Volume: 9 Number: 138
Today's topics:
Re: ADO and OLE, does anyone know how to make this work <matt@sergeant.org>
Re: decimal to binary <sb@sdm.de>
Re: decimal to binary <sb@sdm.de>
Re: deleting files (Abigail)
document converter <tortuga@leland.stanford.edu>
Re: from a pipe (Bart Lateur)
Re: FTP Question (Abigail)
Re: Getting very irregular single 'name' field into fir <bjl@uq.net.au>
Installing perl modules in win perl question (john)
Re: Linux - Apache - Perl (Bart Lateur)
long explanations wearying (was Re: Top 10 responses) <jbc@shell2.la.best.com>
Re: MIME::Lite and file attachments (I.J. Garlick)
Re: NT Path Question... (Abigail)
Re: Perl based "yah**" style directory <phil.stubbington@nospam.ambitus.com>
Re: Perl CGI: streaming HTML output from a called prog (Abigail)
Re: simple regex question <dehon_olivier@jpmorgan.com>
Re: Taking a Microsoft Word upload and converting it to <jukka.juslin@poppi.cern.ch>
Re: VBScript to PerlScript <matt@sergeant.org>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Jul 1999 09:47:17 +0100
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: ADO and OLE, does anyone know how to make this work?
Message-Id: <378C4E95.C07D0713@sergeant.org>
Joe Devine wrote:
>
> Hi Matt,
>
> Read the FAQ before I posted. Cut and paste the examples. None
> worked.
I really must update that FAQ...
Add:
#!perl -w
as the first line, and change
use OLE;
to
use Win32::OLE;
and change
$Conn = CreateObject OLE "ADODB.Connection";
to
$Conn = Win32::OLE->new("ADODB.Connection");
The -w should tell you exactly what went wrong.
Matt.
------------------------------
Date: 14 Jul 1999 07:57:28 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: decimal to binary
Message-Id: <7mhft8$vh$1@solti3.sdm.de>
In article <378B8DDE.F00ECE4A@computer.org>, Carter Hamilton <carter@computer.org> wrote:
> Is there an easy way to convert an integer value to its binary
> equivalent?
How do I convert from hexadecimal to decimal:
1) $dec = 0xDEADBEEF;
2) $dec = hex("DEADBEEF");
3) $dec = unpack("N", pack("H8", substr("0" x 8 . "DEADBEEF", -8)));
4) use Bit::Vector;
$vec = Bit::Vector->new_Hex(32, "DEADBEEF");
$dec = $vec->to_Dec();
How do I convert from decimal to hexadecimal:
1) $hex = sprintf("%X", 3735928559);
2) $hex = unpack("H*", pack("N", 3735928559));
3) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$hex = $vec->to_Hex();
How do I convert from octal to decimal:
1) $dec = 033653337357; # note the leading '0'
2) $dec = oct("33653337357");
3) use Bit::Vector;
$vec = Bit::Vector->new(32);
$vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
$dec = $vec->to_Dec();
How do I convert from decimal to octal:
1) $oct = sprintf("%o", 3735928559);
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$oct = reverse join('', $vec->Chunk_List_Read(3));
How do I convert from binary to decimal:
1) $dec = unpack("N", pack("B32",
substr("0" x 32 . "11011110101011011011111011101111", -32)));
2) use Bit::Vector;
$vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
$dec = $vec->to_Dec();
How do I convert from decimal to binary:
1) $bin = unpack("B*", pack("N", 3735928559));
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$bin = $vec->to_Bin();
The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
are left as an exercise to the inclined reader. :-)
(Note: The advantage of the Bit::Vector module is that it works with
numbers of ANY size.)
Hope this helps.
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
From sb Thu Jul 8 16:27:58 1999
Subject: Re: BigInt: Decimal to Hex
In-Reply-To: <199907081423.IAA03177@jhereg.perl.com> from Tom Christiansen at "Jul 8, 99 08:23:08 am"
To: tchrist@jhereg.perl.com (Tom Christiansen)
Date: Thu, 8 Jul 1999 16:27:58 +0200 (MET DST)
From: Steffen Beyer <sb@sun.sdm.de>
Reply-To: sb@sdm.de (Steffen Beyer)
X-Disabled: Return-Receipt-To: sb@sdm.de
X-W3-Page: http://www.engelschall.com/u/sb/download/
X-Mailer: ELM [version 2.4ME+ PL39 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 310
Status: RO
Hello Tom Christiansen, in a previous mail you wrote:
> Beautiful!
Thanks!!!
Other suggestions follow shortly.
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
From sb Thu Jul 8 16:59:14 1999
Subject: Re: BigInt: Decimal to Hex
In-Reply-To: <199903111412.HAA00302@jhereg.perl.com> from Tom Christiansen at "Mar 11, 99 07:12:43 am"
To: tchrist@jhereg.perl.com (Tom Christiansen)
Date: Thu, 8 Jul 1999 16:59:14 +0200 (MET DST)
From: Steffen Beyer <sb@sun.sdm.de>
Cc: perlfaq-suggestions@perl.com
Reply-To: sb@sdm.de (Steffen Beyer)
X-Disabled: Return-Receipt-To: sb@sdm.de
X-W3-Page: http://www.engelschall.com/u/sb/download/
X-Mailer: ELM [version 2.4ME+ PL39 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1798
Status: RO
Hello Tom Christiansen, in a previous mail you wrote:
> >OK, I'll write it up.
> >Where should I send it to?
>
> perlfaq-suggestions@perl.com should work.
>
> thanks,
> --tom
Dear maintainers of the Perl documentation,
this is a suggestion for some minor (but IMnsHO :-) important) additions
to the standard Perl documentation:
(This diff was made against the POD documentation of Perl 5.005_03)
-------------------- cut here -------------------- cut here --------------------
*** perlmodlib.pod.orig Thu Jul 8 16:48:44 1999
--- perlmodlib.pod Thu Jul 8 16:33:47 1999
***************
*** 344,349 ****
--- 344,350 ----
=item Math::BigInt
arbitrary size integer math package
+ (but see also Bit::Vector from CPAN)
=item Math::Complex
*** perlop.pod.orig Thu Jul 8 16:48:44 1999
--- perlop.pod Thu Jul 8 16:41:38 1999
***************
*** 1832,1834 ****
--- 1832,1839 ----
print $x * $x;
# prints +15241578780673678515622620750190521
+
+ Note that the module Bit::Vector (available from CPAN) provides much more
+ efficient arbitrary precision integer arithmetic and overloaded operators,
+ too (the module is based on a C library internally).
+
*** perltrap.pod.orig Thu Jul 8 16:48:44 1999
--- perltrap.pod Thu Jul 8 16:47:34 1999
***************
*** 700,705 ****
--- 700,709 ----
use Math::BigInt;
+ or:
+
+ use Bit::Vector;
+
=item * Numerical
Assignment of return values from numeric equality tests
-------------------- cut here -------------------- cut here --------------------
Thanks a lot in advance for your kind consideration!
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
------------------------------
Date: 14 Jul 1999 08:07:02 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: decimal to binary
Message-Id: <7mhgf6$vh$3@solti3.sdm.de>
In article <378B8DDE.F00ECE4A@computer.org>, Carter Hamilton <carter@computer.org> wrote:
> Is there an easy way to convert an integer value to its binary
> equivalent?
How do I convert from hexadecimal to decimal:
1) $dec = 0xDEADBEEF;
2) $dec = hex("DEADBEEF");
3) $dec = unpack("N", pack("H8", substr("0" x 8 . "DEADBEEF", -8)));
4) use Bit::Vector;
$vec = Bit::Vector->new_Hex(32, "DEADBEEF");
$dec = $vec->to_Dec();
How do I convert from decimal to hexadecimal:
1) $hex = sprintf("%X", 3735928559);
2) $hex = unpack("H*", pack("N", 3735928559));
3) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$hex = $vec->to_Hex();
How do I convert from octal to decimal:
1) $dec = 033653337357; # note the leading '0'
2) $dec = oct("33653337357");
3) use Bit::Vector;
$vec = Bit::Vector->new(32);
$vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
$dec = $vec->to_Dec();
How do I convert from decimal to octal:
1) $oct = sprintf("%o", 3735928559);
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$oct = reverse join('', $vec->Chunk_List_Read(3));
How do I convert from binary to decimal:
1) $dec = unpack("N", pack("B32",
substr("0" x 32 . "11011110101011011011111011101111", -32)));
2) use Bit::Vector;
$vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
$dec = $vec->to_Dec();
How do I convert from decimal to binary:
1) $bin = unpack("B*", pack("N", 3735928559));
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$bin = $vec->to_Bin();
The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
are left as an exercise to the inclined reader. :-)
(Note: The advantage of the Bit::Vector module is that it works with
numbers of ANY size.)
Hope this helps.
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
------------------------------
Date: 14 Jul 1999 02:09:31 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: deleting files
Message-Id: <slrn7oodsf.h7.abigail@alexandra.delanet.com>
Jean (jean.zoch@utoronto.ca) wrote on MMCXLII September MCMXCIII in
<URL:news:FEtt3B.E4u@campus-news-reading.utoronto.ca>:
~~ Hi,
~~
~~ I would like to write a perl script that deletes text files in a directory.
~~ The filenames are numbers (like 996134274.txt) and only those which are less
~~ than a certain number (say 997000000.txt) should be deleted.
~~
~~ My problem is that I can't figure out a way to compare my filename with the
~~ number.
That's easy. Treat the filename as a number and it *will* be the
appropriate number. Behind the scenes, Perl sacrifices black cocks and
burns candles to make this work. But it will work.
~~ How can I store the filename in a temporary variable (so I am able to
~~ compare it)? Also, how can I check each text file in the directory (so that
~~ I can delete all necessary files)?
Open the directory, and read from it. That's explained in the manual.
Do you have any specific questions about the manual?
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 14 Jul 1999 01:56:21 -0700
From: Josh Suarez <tortuga@leland.stanford.edu>
Subject: document converter
Message-Id: <378C50B5.1910F5D1@leland.stanford.edu>
I need a program which can convert word documents (and perhaps other
formats) to text files, while retaining some indicator of which words
were originally bold and italic. The program needs to run on unix. Has
anyone seen something like this? A perl script perhaps?
Thanks,
Jim
------------------------------
Date: Wed, 14 Jul 1999 08:10:12 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: from a pipe
Message-Id: <378e387c.1592605@news.skynet.be>
Don Grogan wrote:
>Ok, thanks a lot! I had tried <stdin> before posting and that was nothing
>doing. I'll try <>.
Try <STDIN>, that WILL work. "<>" will try any files (@ARGV), first, and
if there aren't any, it will read from STDIN. I think that's nice and
versatile for a script like this. Maybe just what you want.
>I don't mean to sound stupid again, but what is wrong
>about the
>if ($_=~$pat){
>How else do you check and see if a string contains a substring? I thought
>that this was standard. I guess not...
Standard is { /$pat/ }. You may add the //o modifier, if this statement
will be run with only one pattern for the whole script. It ought to
speed it up quite a bit.
if(/$pat/o) { ... }
Bart.
------------------------------
Date: 14 Jul 1999 02:11:55 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: FTP Question
Message-Id: <slrn7ooe0v.h7.abigail@alexandra.delanet.com>
mike (mamedeo@yahoo.com) wrote on MMCXLIII September MCMXCIII in
<URL:news:378BE160.8386F129@yahoo.com>:
@@ I am certain this may be a frequently asked question if so my
@@ apoligises.
If you are so certain, you should read the FAQ and not post here.
@@ I would like to connect to an FTP server and get a dozen or so files. I
@@ only need to get files not put any files. Is there a simple way to do
@@ this. If someone could send me any code to get me started it would be
@@ appreciated.
Here's some starters code:
#!/opt/perl/bin/perl -w
use strict;
use Net::FTP;
# Fill in site specific details below.
__END__
Abigail
--
perl -wlne '}for($.){print' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 14 Jul 1999 18:42:06 +1000
From: "Brad Long" <bjl@uq.net.au>
Subject: Re: Getting very irregular single 'name' field into first/last name for credit card gateway -- what hit rate is possible?
Message-Id: <7mhi09$1ni$1@bunyip.cc.uq.edu.au>
Basically, I agree that Abigail is a problem!
If Abigail didn't respond to questions that she didn't want to answer, most
threads in this newsgroup would be much smaller. After making a couple
visits to this newsgroup, I have seen how Abigail not only says "...not a
Perl question..." but inflames arguments regarding the use of email, the
style of messages that should be posted etc. I find this to be a very poor
newsgroup, mainly due to the high email traffic that is generated by Abigail
herself......and the controversy that her postings create.
There does seem to be a merry band of minstrels that support Abigail's
postings. Poor souls!
Abigail, maybe you should think of creating a moderated list for Perl
(moderated by you, of course). Or, maybe you should stick to newsgroups that
are more appropriately labelled. I thought the ".misc" meant
miscellaneous....i.e. miscellaneous questions/postings about perl. Surely
this doesn't mean that if anyone mentions the word "UNIX" or "C" or anything
else along with the word "Perl" it becomes "not a Perl question".
.... maybe ".misc" stands for "misconception"... or "miscreant" ....
Anyway, Abigail, you can do us all a favour by only responding to posts when
you are being helpful. I'm sure everyone will be a lot happier.
Stephen Benson wrote in message <7mcsmt$67$1@plutonium.compulink.co.uk>...
>Atcherlly I do snip/arrange the buggers, time allowing, but again, so what?
>This meant to be content-driven communication. no? And that last one I felt
>should be left complete in all its glory.
>
>Bandwidth -- jeez I don't add html, lil songs and piccies -- an
>anachronistic discussion, I feel. What about all the mails that are in
there
>twice -- html/text? What about this ridiculous exchage?
>
>Basically I don't think anything I've done in my posts deserves this
>extended display of (b)anality.
>
>All I wanted was a couple of intelligent comments on a certain question.
>What do I get - acres of wasted bandwidth by a couplepeople claiming
they're
>in favour of saving bandwidth and I have to defend a posting style used by
>millions.
>
>And then there's Judge Abigail.... nc.
>
>Guys, do you just reply on these peripheral subjects, crusading to enforce
>the One True Posting Style or to save bandwidth while pissing it away?
>
>That is verry much it from me... everyone else, verry sorry for the waste
of
>space...
>
>> >I've posted for years, whether to put the quoted mail top/bottom is
>> >unregulated, and in practice more people do it the way I do, so people
>> >instantly see the current message, and scroll down to the old if they
>> >need it. Matter of taste.
>>
>> It's a poor habit, especially since that tends to make you lazy: you do
>> not snip the original post, and keep everything that is not important
>> for your reply in. That is an enormous waste of bandwidth, as servers
>> tend to drop older messages as soon as their disks are full. Your nasty
>> little habit makes sure that fewer posts are kept on the servers.
>
>
------------------------------
Date: Wed, 14 Jul 1999 08:23:04 GMT
From: john@nospam.co.uk (john)
Subject: Installing perl modules in win perl question
Message-Id: <378c4738.639237@news.freeuk.net>
Is the process of installing and calling
perl modules in Win Perl any different
to unix perl?
john
------------------------------
Date: Wed, 14 Jul 1999 08:10:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Linux - Apache - Perl
Message-Id: <37903a65.2081932@news.skynet.be>
Anno Siegel wrote:
>I have yet to see Abigail jump on anyone asking a Perl question in
>this group.
:: How do I .... in Perl?
RTFAQ (or RTFM)
Does that count? :-)
Bart.
------------------------------
Date: 14 Jul 1999 07:16:48 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: long explanations wearying (was Re: Top 10 responses)
Message-Id: <378c3960$0$208@nntp1.ba.best.com>
Uri Guttman <uri@sysarch.com> wrote:
> but you complained the docs used words you didn't understand. that is
> the crux of my post. we cannot explain each and every term used in the
> docs to you. there has to be a certain level of competency for efficient
> communication to take place.
It's actually sort of interesting how many Perl discussions end up
making me think of Tolkien quotations:
'In one thing you have not changed, dear friend,' said Aragorn: 'you
still speak in riddles.'
'What? In riddles?' said Gandalf. 'No! For I was talking aloud to
myself. A habit of the old: they choose the wisest person present
to speak to; the long explanations needed by the young are
wearying.'
-- The Two Towers
Uri argues that the person on the other side of the conversation must
be sufficiently knowledgeable for him (Uri) to be able to use the
convenient, efficient vocabulary of the experienced programmer.
Otherwise, Uri isn't interested in putting in the effort required to
communicate with that person. Which is fine; he shouldn't have to.
After all, his professional expertise lies in *programming*, not in
teaching, or communicating. But his use of "we" to imply that he is
speaking for the group as a whole is suspect. The individual
participants in c.l.p.m. can speak for themselves; they don't need Uri
to speak for them. That's the nature of an unmoderated newsgroup.
> c.l.p.misc is a discussion group on
> perl not a perl and compsci tutorial. you are expected to knwo some perl
> and hopefully some compsci (i wish that were true), before posting
> here. perl's curse is that it is too popular with the unwashed masses so
> we get, "i just read perl for morons (since i am a moron), what is a
> hash? the book uses that term a lot and i don't get it." to that newbie,
> i say get another job and don't be a programmer.
And here, predictably, is where I get my dander up. To assume that
someone must be a moron if he or she doesn't intuitively grasp what a
hash is based on whatever small subset of the docs he or she may have
been exposed to is, in my view, arrogant. To say that such a person
should get another job is to ignore the reality of what has been
happening in the outer layers of the Perl onion.
TomC recently offered the following on Slashdot:
"If you make a language so easy to use that even idiots can use, they
shall. And they have. In Perl's case, this is generally considered a
feature. But you've found the disadvantage: having to maintain a
program written by an idiot who can't even get their VCR to stop
flashing is what wrongly gives Perl a bad name. It should give the
idiot a bad name! C++ does not have this problem, because idiots are
afraid of it.
"Idiots are not afraid of Perl. Please stop blaming professionals for
that. What are we supposed to do? Tell non-professionals that they
aren't allowed to program, even if we made a language easy enough that
they can get results?"
Again, as someone who has a whole lot more in common with the inept,
bumbling newbies than with pros like Uri and Tom, I find myself
bristling at the automatic assumption that anyone who isn't technically
adept at programming is mentally deficient. But leave that aside. Tom,
at least, realizes that telling these people they have no business
programming is not going to stop them, at long as they have a tool like
Perl that lets them do useful work. Neither is being rude to them in
this newsgroup going to stop them from coming here for assistance --
especially in that the ones who push the old-timers' buttons in the
worst way are invariably the ones fresh off the boat, who weren't
around when the last batch was getting flamed.
This newsgroup, and the perl community that it reflects, have become a
lot bigger, and more diverse, over the last few years. This is both a
blessing and a curse, depending on your point of view. But regardless
of how you feel about it, it's a reality, and an unmoderated newsgroup
like this will of necessity reflect that reality, since it is
impossible to restrict people from participating based on *their*
notions of utility, rather than yours.
It isn't just Perl that has changed; it's the Internet community as a
whole. You're not dealing with a homogenous little group of academics
and government-funded researchers all pecking away in the Unix shell,
using trn to debate obscure points in their various intellectual
niches. The Internet has become a mass medium, and a commercial
phenomenon, with all the ugliness that implies.
Coming back to Perl, some of the hand-wringing I see around here
reminds me of debates in the early Christian church over whether or not
it was appropriate to spread the Word among the gentiles. But that's
not really something you get to vote on at this point; it's implicit in
the design decisions that have made Perl what it is, and that helped
create this whole culture clash in the first place.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Wed, 14 Jul 1999 08:34:53 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: MIME::Lite and file attachments
Message-Id: <FEuqI5.3q6@csc.liv.ac.uk>
In article <7mgilf$25r$1@nnrp1.deja.com>,
lbravo10102@my-deja.com writes:
> I installed MIME::Lite and wrote a little script
> that is supposed to send files in email.
>
> It works ok, and it is sending an email message
> with 2 attachments, but the attachments should be
> just plain old text (comma delimited files).
>
> The recipient gets gobbledeegook. So here's the
Yes. that's right. MIME encoding outputs "gobbledeegook" if you ask it
too, that's the whole pomt of it, after all why call it encoding?.
[snipped]
> attach $msg
> Type =>'application/octet-stream',
^^^^^^^^^^^^^^^^^^^^^^^^
????
> Disposition=>'attachment',
> Encoding =>'base64',
^^^^^^
????
> Path =>'/www/directory/path/',
> Filename =>'file1.txt';
^^^^^^^^^
???? (mind you, I suppose it could be a weirdly named binary
file)
This isn't a Perl problem. you need to go read the relevant RFC's on MIME
as you obvioulsy don't understand it. I am not saying the lines above are
wrong per se but it's just not common practice.
>
> attach $msg
> Type =>'text/plain',
> Disposition=>'attachment',
> Encoding =>'base64',
> Path =>'/www/directory/path/',
> Filename =>'file2.txt';
That one was closer but still no cigar.
> Any ideas? Thanks in advance!
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Ok I am feeling generous, here's a clue.
What's the opposite of encoding?
--
Ian J. Garlick
ijg@csc.liv.ac.uk
Children are unpredictable. You never know what inconsistency they're
going to catch you in next.
-- Franklin P. Jones
------------------------------
Date: 14 Jul 1999 02:20:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: NT Path Question...
Message-Id: <slrn7ooeg4.h7.abigail@alexandra.delanet.com>
Sean O'Neill (soneill@marsworks.com) wrote on MMCXLII September MCMXCIII
in <URL:news:UAHi3.27536$ga.41243@news21.bellglobal.com>:
,, I have a site that is in a subfolder of the root web of IIS and the current
,, directory always seems to start at the root web...and not in the current
,, folder. I can detect it and change it inside scripts, but when I try to do
,, <!-- exec cgi="someScript.cgi" --> NT always is looking at the root web and
,, of course doesn't find this file since it is in the current folder and not
,, the root web.
What's your Perl question?
Followups set.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 14 Jul 1999 07:24:40 GMT
From: "Phil Stubbington" <phil.stubbington@nospam.ambitus.com>
Subject: Re: Perl based "yah**" style directory
Message-Id: <YWWi3.610$ts3.17023@nnrp4.clara.net>
Matthew,
I'm basically looking for some scripts to maintain a directory and allow
searching.
I'll check over in comp.sources.wanted - thanks for the pointer.
regards,
phil
Matthew Bafford <*@dragons.duesouth.net> wrote in message
news:slrn7on0eb.4rl.*@dragons.duesouth.net...
> On Tue, 13 Jul 1999 15:40:09 GMT, Phil Stubbington"
> <phil.stubbington@nospam.ambitus.com> poured coffee onto a keyboard,
> producing the following in comp.lang.perl.misc:
> : Hi,
> :
> : I'm looking for an open source equivalent to yahoo, written in Perl.
Could
> : someone point me in the right direction if one exists.
>
> Yahoo is a pretty big site.
>
> Which part, exactly, are you looking for?
>
> : Apologies if this is not the correct newsgroup.......
>
> No, it really isn't. comp.sources.wanted, or something like that, might
> be more appropriate. You'll have to read the charter to be sure,
> though.
>
> : regards,
>
> HTH,
>
> : phil
>
> --Matthew
------------------------------
Date: 14 Jul 1999 02:26:07 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl CGI: streaming HTML output from a called program...
Message-Id: <slrn7ooerj.h7.abigail@alexandra.delanet.com>
Geoff Zehring (geoz@oz.net) wrote on MMCXLIII September MCMXCIII in
<URL:news:7mh3pd$hf1$0@216.39.133.81>:
-- Hello,
--
-- This is my first post to the comp.lang.perl.misc newsgroup. I hope I'm in
-- the right place!
It doesn't looks so.
-- I want to send real time output in HTML format to a specified frame from a
-- .sh file execution performed in a perl CGI script. I've tried everything
-- short of using socket assignment. My output always writes to the frame
-- after the .sh script has completed. Obviously, STDOUT is assigned to the
-- parent process (in this case, the browser) but I still can't get the output
-- to stream. Is JavaScript the answer?
And your Perl question is?
Followups set.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 14 Jul 1999 09:06:10 +0100
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: simple regex question
Message-Id: <iuxemib7j0t.fsf@in-csg58.uk.jpmorgan.com>
Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu> writes:
> /[a-zA-Z]+/ # If a 'word' can be only alphanumeric.
You probably meant alphabetic, alphanumeric would be /[A-Za-z0-9]+/
-Olivier
------------------------------
Date: Wed, 14 Jul 1999 09:41:34 +0200
From: Jukka Juslin <jukka.juslin@poppi.cern.ch>
Subject: Re: Taking a Microsoft Word upload and converting it to text
Message-Id: <378C3F2E.9C86BDBC@poppi.cern.ch>
rancorr@hotmail.com wrote:
>
> Hi,
>
> I want to create a script that will take a Microsoft Word document
> uploaded to my web site (web site is on a Linux/Apache machine) and
> convert the word document to HTML (hopefully preserving the HTML).
>
> I know Word has a "convert to HTML" feature, but I really don't want to
> put the user through all that hassle.
>
> Is there an easy way to do this?
>
> Thanks for your help!
You could put MSWordview program from Freshmeat to cron job.
++Jukka
------------------------------
Date: Wed, 14 Jul 1999 09:49:22 +0100
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: VBScript to PerlScript
Message-Id: <378C4F12.EF2E1E65@sergeant.org>
"Tomas R." wrote:
>
> HI
>
> >use Win32::OLE;
> >Win32::OLE->Warn(3);
> >Now tell us the error message.
>
> use Win32::OLE; Win32::OLE->Warn(3); error '80004005'
> Cannot autoload class method "Warn"
> :)
Oops... That should have been:
Win32::OLE->Option(Warn => 3);
Matt.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V9 Issue 138
*************************************