[12474] in Perl-Users-Digest
Perl-Users Digest, Issue: 6074 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 21 07:38:00 1999
Date: Mon, 21 Jun 99 04:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 21 Jun 1999 Volume: 8 Number: 6074
Today's topics:
[Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
Re: ActiveState Perl and use of PPM (Murray Nesbitt <murrayn>)
Re: Cure for document deficiency <gellyfish@gellyfish.com>
Re: Cure for document deficiency <dave@dave.org.uk>
Re: Fixed format fields: help needed! (Marcel Grunauer)
Re: function to read a line & return it (Abigail)
Re: Garbage collection question <eivind@solbors.no>
Re: Good reasons for avoiding modules (was: Re: Afraid (Abigail)
How to forward-declare a file handle? (Guenther Brunthaler)
how to test pl scripts.? <begum786@rocketmail.com>
Re: how to test pl scripts.? <gellyfish@gellyfish.com>
Re: Interpreting MS-ASCII - anyone have a filter? (Abigail)
Re: matinal musings and the madrugada (David Cantrell)
Re: matinal musings and the madrugada (David Cantrell)
multiple spaces and commas <plaven@idl.net.au>
Re: Need help with a perl/cgi workaround (brian d foy)
Need help with CGI/Perl - Repost for easy viewing esalmon@packet.net
Re: Opening a remote file? <simon@profero.com>
Re: Perl module to read Rich Text Format files? (Reini Urban)
reading current url from buffer ? <dialup55@amiga-suckers.de>
Re: Source Control (Rjack2)
Re: why wont this work? (Abigail)
Win32::AdminMisc <mario.eduardo@vu-wien.ac.at>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 21 Jun 1999 10:24:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage929960641.27327@news.teleport.com>
Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 10 Sep 1998
[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last major update of the Perl FAQ was in Summer of
1998; of course, ongoing updates are made as needed. ]
For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).
http://cpan.perl.org/doc/FAQs/
Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.
perldoc perlfaq
man perlfaq
If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.
If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.
http://cpan.perl.org/
http://www.perl.com/CPAN/
http://cpan.perl.org/doc/FAQs/FAQ/html/
http://www.perl.com/CPAN/doc/FAQs/FAQ/html/
You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)
California ftp://ftp.cdrom.com/pub/perl/CPAN/
Texas ftp://ftp.metronet.com/pub/perl/
South Africa ftp://ftp.is.co.za/programming/perl/CPAN/
Japan ftp://ftp.dti.ad.jp/pub/lang/CPAN/
Australia ftp://cpan.topend.com.au/pub/CPAN/
Netherlands ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
Switzerland ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
Chile ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/
If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:
setdir usenet-by-group/news.announce.newusers
send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.
Have fun with Perl!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 21 Jun 1999 09:47:51 GMT
From: mjn@CR1003182-A.crdva1.bc.wave.home.com (Murray Nesbitt <murrayn>)
Subject: Re: ActiveState Perl and use of PPM
Message-Id: <bTnb3.18007$LQ4.25304@news.rdc1.bc.wave.home.com>
In article <376C3AFE.FD0E3D4D@frontiernet.net>,
Bob Walton <walton@frontiernet.net> wrote:
>
>
> Erol Bernstein wrote:
[...]
> > PPM>install /location c:\perl\lib\site Tk.pm
> >
> > gives:
> >
> > Error installing package 'Tk.pm': Could not locate a PPD file for
> > package Tk.pm
Ask it to install what you really want: Tk.
PPM> install Tk
> Erol, I've had the best luck with PPM by doing as follows:
>
> 1. Browse to http://www.activestate.com/packages/zips
[...]
> I have had intermittent unreliability problems with ppm over the net with
> both Windows 95 and NT, but it has always worked well from a local
> directory.
This is a *lot* more work than is necessary for PPM to install a package.
Even through a firewall/proxy, there is no reason for most people to
download the ZIP file and go through these steps (if PPM is properly
configured--see http://www.activestate.com/PPM/).
The ZIP business was intended as a convenience for people who want to
install a particular package on a number of machines, so they wouldn't
have to grab the same package repeatedly over the Net. If you think
you need it for any other purpose, you've probably not configured PPM
properly.
Murray
------------------------------
Date: 21 Jun 1999 10:05:16 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Cure for document deficiency
Message-Id: <376e004c@newsread3.dircon.co.uk>
TRG Software : Tim Greer <webmaster@chatbase.com> wrote:
> Tom Christiansen wrote:
>>
>> I have an idea. When someone asks a questions that's in the standard
>> perl manpages, we'll all simply mail them the complete manpage. :-)
>
> Unfortunately, you still can't make them *read* it in their email,
> anymore then you can on their system. People usually skip over reading
> help pages, go to the bottom and contact the author and ask what's on
> the page anyway. Why waste the bandwidth? :-)
>
Ok, to tie this all together then we send them an MP3 file of someone *reading*
the relevant documentation.
/J\
--
"I don't have access to the intelligence" - Michael Howard
------------------------------
Date: Mon, 21 Jun 1999 10:18:20 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Cure for document deficiency
Message-Id: <376E035C.EE467F5B@dave.org.uk>
Jonathan Stowe wrote:
>
> Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> > [A complimentary Cc of this posting was sent to Dave Cross
> > <dave@dave.org.uk>],
> > who wrote in article <376DF148.3FB0C85A@dave.org.uk>:
> >> Perhaps we could get perldoc to print out something like 'These docs are
> >> best read in the bath' and see who's still posting in a week's time.
> >>
> >> Oh... wait. The people we're trying to er... 'remove' don't read
> >> perldoc, so that won't work :-(
> >
> > How much would it run us to run an MTV ad with
> >
> > "Quiz question one: can you take Perl docs with you in the bath?"
>
> Perhaps a little expensive - but how about a single posting in alt.perl
... or comp.lang.perl!
Dave...
------------------------------
Date: Mon, 21 Jun 1999 09:14:04 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Fixed format fields: help needed!
Message-Id: <37700222.1160048@enews.newsguy.com>
On Sun, 20 Jun 1999 18:26:24 -0700, lr@hpl.hp.com (Larry Rosler)
wrote:
>...
>+ I hope this is what you meant by fixed field output.
>
>He gave you an explicit example of what he meant by fixed field output.
>This is a lot better information than many posters provide.
>
>Unfortunately, that's not what your regex produced.
Resolution for next week: Don't code when half-asleep.
Mea culpa.
Marcel
------------------------------
Date: 20 Jun 1999 22:57:13 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: function to read a line & return it
Message-Id: <slrn7mre0k.k1b.abigail@alexandra.delanet.com>
Rick Delaney (rick.delaney@home.com) wrote on MMCXX September MCMXCIII in
<URL:news:376D9527.92A7C7C3@home.com>:
\\
\\ Abigail wrote:
\\ >
\\ > I'd suggest returning 4 fried chicken and a coke.
\\
\\ Legs or wings, honey?
All chickens I know have 2 legs, 2 wings, and a lot of meat in between.
Perhaps you should rent more movies.
Abigail
--
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'
-----------== 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: Mon, 21 Jun 1999 09:01:08 +0000
From: Eivind Trondsen <eivind@solbors.no>
Subject: Re: Garbage collection question
Message-Id: <376DFF54.8D53C51E@solbors.no>
Abigail wrote:
>
> Eivind Trondsen (eivind@solbors.no) wrote on MMCXIX September MCMXCIII in
> <URL:news:376D3A80.8D294625@solbors.no>:
<snip>
> [] while ( $user = pop @$users ) {
> [] ...
> [] }
> The problem with the above approach is that it will stop as soon as
> it hits a value in @$users that Perl thinks is 'false'. The second
> problem is that is destructs the @$users array, you can't use it again.
> If you want to use the while () construct, and don't mind destroying
> @$users, the following makes sure you iterate over all users:
>
> while (@$users) {
> $user = pop @$users;
> ...
> }
> Also note that by using pop() you are iterating in reverse order.
Yes, I know. My point was that I have this large array, I want to gobble
it in, garbage-collecting it's contents as soon as possible. I used pop,
because it is a more efficient way to dismantle an array, as a shift
alters all the indexes.
> [] foreach $user ( @$users ) {
> [] ...
> [] }
> This will iterate over the @$users array (aliasing $user to the
> various elements) without destroying @$users.
Sure, but without leaving any array element without a valid reference
(and thus making it available to the garbage man).
<snip>
> Yes, the first alternative will decrease the refcount of the elements of
> the array elements as you walk along. If nothing else points to those
> scalars, their memory should be released, and available to be reused
> by Perl. AFAIK, the memory of the array itself isn't freed during the
> process.
Good. It is as I thought then. The array only uses memory for the
references, right?
> Of course, if these memory issues are important for you, you might want
> to write your program such that it never has all those hashes at once
> in memory.
Roger that. Maybe I'll device a cunning ploy involving a file or
something...
Thanks :-)
--
Eivind Trondsen - SOL Bxrs AS http://www.solbors.no
Tlf 22 11 35 14 Fax 22 11 35 13 Mob 924 14 969
Feeling amorous, she looked under the sheets and cried, "Oh, no,
it's Microsoft!"
------------------------------
Date: 20 Jun 1999 23:01:16 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Good reasons for avoiding modules (was: Re: Afraid to ask about Y2K!)
Message-Id: <slrn7mre85.k1b.abigail@alexandra.delanet.com>
Paul David Fardy (pdf@morgan.ucs.mun.ca) wrote on MMCXIX September
MCMXCIII in <URL:news:7kjumh$n1c$1@coranto.ucs.mun.ca>:
$$ abigail@delanet.com (Abigail) writes:
$$ >>> What's the fear for a module?
$$
$$ Paul David Fardy wrote:
$$ >> If it's in Perl's core modules, no fear. Elsewise, the trouble I
$$ >> have is with portability. I'll have to distribute a growing list
$$ >> of modules with my programs. And is the module up-to-date?
$$
$$ Tom Phoenix <rootbeer@redcat.com> writes:
$$ > In what way is implementing the equivalent of a well-written module's
$$ > code within your own programs more portable, easier to distribute, or
$$ > easier to keep up-to-date?
$$
$$ I wasn't talking about platform portability, but system by system
$$ portability. If the I rely only on the core modules, I can run the
$$ program on any system running perl5 (sometimes more specifically
$$ perl5.00x or better). If it's not in the core, then that's additional
$$ work.
So, what should not be in the core then? Should be start with putting
everything in CPAN in the core?
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
-----------== 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: Mon, 21 Jun 1999 09:16:20 GMT
From: gb@evis.co.at (Guenther Brunthaler)
Subject: How to forward-declare a file handle?
Message-Id: <376f0254.269420826@news.teleweb.at>
Hi all!
I have a severe problem in a 'use strict' script:
I want to use the *xx{FILEHANDLE} syntax to obtain a symbolic
reference to a file handle, where 'xx' is the name from the
open xx, ">filename";
call. Unfortuntely, this call appears LATER in the source code than
the above line, although it will be executed first.
But PERL seems to complain about "*xx{FILEHANDLE}", because it does
not yet know that xx is a file handle at that point.
I suppose some sort of 'forward declaration' for a file handle is
required here.
But how can this be done? How can a normal file handle be declared
anyway?
Sincerly,
Guenther Brunthaler
Software Development
EVIS Technologies GmbH
Paniglgasse 19
A - 1040 Wien
Phone: +43 (1) 503 73 53
Fax: +43 (1) 503 22 50
WWW: http://www.evis.co.at
------------------------------
Date: Mon, 21 Jun 1999 18:07:28 +0800
From: Zam Zam Begum <begum786@rocketmail.com>
Subject: how to test pl scripts.?
Message-Id: <376E0EDF.332997E@rocketmail.com>
Hi ..
I am actually coming up with a mailer program using perl and looking for
help in using this Perl. I would like to test it out by uploading onto a
site. Is it possible to test it in a "testing" site .? Or are there any
of such sites available.? And also, do i have to put my perl scripts
under the bin/perl directory.?
Regards,
Zam
------------------------------
Date: 21 Jun 1999 11:23:23 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how to test pl scripts.?
Message-Id: <376e129b@newsread3.dircon.co.uk>
Zam Zam Begum <begum786@rocketmail.com> wrote:
>
> I am actually coming up with a mailer program using perl and looking for
> help in using this Perl. I would like to test it out by uploading onto a
> site. Is it possible to test it in a "testing" site .? Or are there any
> of such sites available.? And also, do i have to put my perl scripts
> under the bin/perl directory.?
>
Why cant you test locally - you might want to ask in a group that is
interested in these matters for recommendations for an HTTP server that
you can run locally.
Of course you will also need to have Perl installed.
/J\
--
"You're blowing me off for a monkey?" - Joey, Friends
------------------------------
Date: 20 Jun 1999 23:02:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <slrn7mreao.k1b.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCXX September MCMXCIII in
<URL:news:MPG.11d73890a9208038989c0a@nntp.hpl.hp.com>:
"" In article <slrn7mqgou.k1b.abigail@alexandra.delanet.com> on 20 Jun 1999
"" 14:38:11 -0500, Abigail <abigail@delanet.com> says...
"" ...
"" > s/([\x80-\x9F])/$t{$1} || ""/eg; # Replace all characters in the range
"" > # 0x80 - 0x9F with their translation,
"" > # squish it if there's no translation.
"" ...
"" > Note that this wouldn't work if there's a char you would want to
"" > replace with 0.
""
"" s/([\x80-\x9F])/defined $t{$1} && $t{$1}/eg;
""
"" Maybe someone should name this idiom after me. No one else seems to use
"" it! :-)
s/([\x80-\x9F])/exits $t{$1} && $t{$1}/eg;
would be more efficient.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== 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: Mon, 21 Jun 1999 09:11:35 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: matinal musings and the madrugada
Message-Id: <376f006e.241042270@news.insnet.net>
On Fri, 18 Jun 1999 11:14:30 GMT, bart.lateur@skynet.be (Bart Lateur)
said:
>David Cantrell wrote:
>
>>>the Marine Corps always dated their documents YY/MM/DD
>
>>Makes it nice n' easy to sort by date in a language which doesn't
>>support a Date type (see - back on topic!) which is a Good Thing.
>
>But yet it is a Y2K bug.
Not necessarily. The simple act of storing a year in two digits is
not a bug. Bugs only arise when the programmer makes incorrect
assumptions about what those two digits mean. Having said that, I
always use YYYYMMDD when there is nothing better easily available. It
makes that code easier for those who have to maintain it later, and
prevents _me_ from making incorrect assumptions when coding at 4
o'clock in the morning.
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Mon, 21 Jun 1999 09:19:26 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: matinal musings and the madrugada
Message-Id: <3770021d.241473109@news.insnet.net>
On 18 Jun 1999 19:54:28 GMT, snow@biostat.washington.edu (Gregory
Snow) said:
>In article <m3n1xxo5m2.fsf@moiraine.dimensional.com>,
>Daniel Grisinger <dgris@perrin.dimensional.com> wrote:
>>bart.lateur@skynet.be (Bart Lateur) writes:
>>
>>> David Cantrell wrote:
>>>
>>> >>the Marine Corps always dated their documents YY/MM/DD
>>>
>>> >Makes it nice n' easy to sort by date in a language which doesn't
> ^^^^
>
>It appears to me that the context is sorting, is the following a Y2K
>bug or not?
>
> [snip]
Context is important. If your data is, for example, significant
events in the Soviet Union, there is no problem. And it is still
fairly easy to sort two digit years, even if they _do_ cross a century
boundary. There is only a problem if the data spans more than one
century - that is, where YY can refer to two different YYYYs.
Mind you, I should have read that better, and spotted the two Ys where
I always use four :-(
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Mon, 21 Jun 1999 10:40:17 GMT
From: "Peter Lavender" <plaven@idl.net.au>
Subject: multiple spaces and commas
Message-Id: <01beba65$049fd740$090aa8c0@winnie.sspl.net.au>
Hi everyone,
I wish to take a like like:
06/19/99 10:33pm up 12 days, 4:23, 6 users, load average: 0.18, 0.14,
0.16
that has multiple spaces with commas to finish looking like:
06/19/99,10:33pm,up,12 days,4:23,6,users,load average:, 0.18,0.14,0.16
I'm very new to perl. My only background in programming is a few semesters
learning pascal and cobol at night school.
I have read the perlfaq6 but most of it went over my head.
Pete
------------------------------
Date: Mon, 21 Jun 1999 05:29:26 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Need help with a perl/cgi workaround
Message-Id: <brian-ya02408000R2106990529260001@news.panix.com>
In article <376D984B.2FAF@packet.net>, esalmon@packet.net posted:
> I am trying to put together a simple proxy CGI submit script that
> submits a POST, not a GET, CGI form submit. Following, is a script that
> submits a form through GET and it works fine. How would I change this
> script to do a post instead? If the CGI data pairs are not sent on the
> request line for POST, like it is for GET, what would need to be changed
> and/or added to the following script. I know it is sent through STDIN
> but how do I implement that, in Perl, from here?
throw away that script and start with LWP. your life will be simpler.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Sun, 20 Jun 1999 22:10:03 -0400
From: esalmon@packet.net
Subject: Need help with CGI/Perl - Repost for easy viewing
Message-Id: <376D9EFB.14C6@packet.net>
I am trying to put together a simple proxy CGI submit script that
submits a POST, not a GET, CGI form submit. Following, is a script that
submits a form through GET and it works fine. How would I change this
script to do a post instead? If the CGI data pairs are not sent on the
request line for POST, like it is for GET, what would need to be changed
and/or added to the following script. I know it is sent through STDIN
but how do I implement that, in Perl, from here?
Thanks in advance!
Eric R. Salmon
This code might be simpler to read!
-----------------------------------------------------------------------------------------------------------------------------
BODY: {
@Headers = ("User-Agent", "http-get/0.1");
$url = "/isp/somewhere/gateway.cgi?password=aD5YtE81&submit=Submit";
$document = Http_Get('www.somewhere.com', 80, $url);
}
##################################################
sub Http_Get {
my ( $server,
$port,
$document ) = @_;
# ---------------------------
if ($server =~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) {
@addrs = pack('C4', split(/\./,$server));
# ---------------------------
} else {
($dummy, $dummy, $dummy, $dummy, @addrs) =
gethostbyname($server);
}
# ---------------------------
$remote = pack("S n a4 x8", &AF_INET, $port, $addrs[0]);
socket ( S, &PF_INET, &SOCK_STREAM, &TCP) || die "socket: $!";
connect ( S, $remote) || die "connect: $!";
select ( S );
$| = 1;
select ( STDOUT );
$| = 1;
$request = "GET $document HTTP/1.0\r\n";
# ---------------------------
while ( $#Headers > 0 ) {
$request = $request . "$Headers[0]: $Headers[1]\r\n";
shift ( @Headers );
shift ( @Headers );
}
# ---------------------------
$request = $request . "\r\n";
print S "$request";
$big = 1024*1024;
$build = "";
# ---------------------------
while ( $len = sysread(S, $data, $big) ) {
$build = $build . $data;
}
# ---------------------------
close ( S ) || die "close: $!";
return $build;
} ################################################
sub TCP {
return join("", getprotobyname('tcp'));
} ################################################
sub SOCK_STREAM {
return 1;
} ################################################
sub AF_INET {
return 2;
} ################################################
sub PF_INET {
return &AF_INET;
} ################################################
-----------== 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: Mon, 21 Jun 1999 11:33:53 +0100
From: Simon Wistow <simon@profero.com>
Subject: Re: Opening a remote file?
Message-Id: <376E1511.99DA8A93@profero.com>
> And how is that going to write to a file on Microsoft's server? There's
> a big difference between a path to a file, and a URL path. Are you
> looking to just print a page on another server in your own script not on
> that same server, or are you actually trying to alter a file on another
> server? I don't think it's doing what you think it's doing.
Long day at work and I didn't read the question proeprly ... what I meant was
that PHP3 can open a remote URL for reading. I suppose you could open a remote
file for writing by using a hack of Net::FTP and some sort buffer/temp file hwre
opeing a remote url create s temp file, writing to that file handle actually
writes to that temp file and closing the file handle FTPs the file up.
--
Simon Wistow Development
simon@profero.com Profero Ltd
Phone : 0171 700 9960 Fax : 0171 700 9961
------------------------------
Date: Mon, 21 Jun 1999 09:35:16 GMT
From: rurban@xarch.tu-graz.ac.at (Reini Urban)
Subject: Re: Perl module to read Rich Text Format files?
Message-Id: <376e06e3.3412546@judy.x-ray.local>
some perl rtf reader/writer software of mine is now at
http://xarch.tu-graz.ac.at/~rurban/software/perl/ or
ftp://xarch.tu-graz.ac.at/pub/autocad/urban/perl/
but no module and not of general use.
rurban@xarch.tu-graz.ac.at (Reini Urban) wrote:
>mloll@wam.umd.edu (Michael Loll) wrote:
>>Hi, I was wondering if there was a perl module that could read and write
>>Rich Text Format documents? If not, would something like this interest
>>people?
>
>i wrote a few years ago a writer module (pod2rtf.pl) with winhelp-like
>footnotes and formatting style for links and chapter defs. (to convert
>pod to winhelp).
>this was later planned to be incorporated into some kind POD::Rtf.pm
>module, but it apparently didn't work out.
>pod2rtf.pl was at CPAN and is at my webpage. based on this are also a
>lot of other non-free winhelp generating scripts.
>
>i also wrote a small rtf reader but it just strips unnecessary
>formatting from bloated winword rtf's. i could put it on my page as well
>if someone needs it.
>but this was of no practical usage, the winhelp compiler does the same
>and winword bloats the rtf again when you reopen it.
>
>i once planned to write a rtf2html converter but the existing c-based
>programs worked fine for me and the table code was too hard.
>
>it would have been nice to have a better converter than the awful
>winword html exporter (alos used by the ms html helpworkshop), but it
>highly depends on winword internals changing every year or so, so i just
>wrote a couple of very short scripts which fixes the html generated by
>winword 7 and 8. nothing module or CPAN worthy.
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
------------------------------
Date: Mon, 21 Jun 1999 11:16:25 +0100
From: "raskal" <dialup55@amiga-suckers.de>
Subject: reading current url from buffer ?
Message-Id: <7kkvej$eva$1@black.news.nacamar.net>
hello all:)
I want to write a little program in perl that shows me the current URL
with ENV_REQUESTED_URI j just get the last visited one...
is there a command for reading the current URL ??
thanks in advance
Raskal
------------------------------
Date: 21 Jun 1999 10:19:16 GMT
From: rjack2@aol.com (Rjack2)
Subject: Re: Source Control
Message-Id: <19990621061916.01116.00002599@ng-fi1.aol.com>
Folks,
I decded to use CS-RCS for now. It is free for personal use, itt runs on a PC,
and it uses the Windows explorer.
This is perfect for me for now. Thanks for all the advice. My second choice
would have been CVS. It seems since they all use RCS, they are compatible.
Thanks,
Robert Jackson
------------------------------
Date: 20 Jun 1999 23:13:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: why wont this work?
Message-Id: <slrn7mrev9.k1b.abigail@alexandra.delanet.com>
ted fiedler (tfiedler@ptd.net) wrote on MMCXIX September MCMXCIII in
<URL:news:4wdb3.2647$I72.345843@nnrp1.ptd.net>:
`` why isnt this working the file is in the same dir as the program...?
``
``
`` #!/usr/bin/perl -w
`` use strict;
`` open(TESTFILE, "> test3_med.dat") || die"Cannot open test3_med.dat: $!\n";
`` while(<TESTFILE>) {
`` print"File opened successfully"; }
`` close(TESTFILE);
Why are you trying to read from a file that you have opened for reading?
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
-----------== 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: Mon, 21 Jun 1999 11:19:51 +0200
From: "EDUARDO Mario" <mario.eduardo@vu-wien.ac.at>
Subject: Win32::AdminMisc
Message-Id: <376e03b7@edvzmario.vu-wien.ac.at>
im using functions from Dave Roths AdminMisc,
i am getting the Win32 Error code 203 (Dezimal) which
has something to do with an environment option.
i have no idea what to do.
The following example lists only the global groups
but not the local groups on the PDC. I am Admin !
$Flag = SV_TYPE_DOMAIN_CTRL | 0x00008000 ;
if ( Win32::NetAdmin::GetServers($Server, $Domain, $Flag, \@List) )
{
print "ServerList :\n" ;
map { GroupList ($_) } @List ;
}
else
{
print "DomList geht net, schei...\n" ;
}
sub GroupList
{
my ($Srv) = "\\\\" . $_[0] ;
print $Srv,"\n" ;
if ( Win32::AdminMisc::GetGroups( $Srv, GROUP_TYPE_LOCAL, \@Groups ) )
{
print "aa\n" ;
DumpGroups( "local groups", @Groups );
}
else
{
W32ErrorProcessing () ;
}
if ( Win32::AdminMisc::GetGroups( $Srv, GROUP_TYPE_GLOBAL, \@Groups ) )
{
print "bb\n" ;
DumpGroups( "global groups", @Groups );
}
print "--------------------------------------------\n\n" ;
}
sub DumpGroups
{
my( $Type, @List ) = @_;
my( $iCount ) = 0;
print "This is the list of $Type:\n";
map { printf( "\t%03d) %s\n", ++$iCount, $_ ); } @List;
}
sub W32ErrorProcessing
{
$W32ErrorCode = Win32::GetLastError() ;
$W32ErrorText = Win32::FormatMessage ( $W32ErrorCode ) ;
printf ( "Error Code und Text :\n%05u - %s\n" , $W32ErrorCode,
$W32ErrorText ) ;
}
--
============================================================
Mario EDUARDO ICQ # : 19186716
Hardware and Operating Systems
University for Veterinary Medicine, Vienna
Josef Baumann Gasse 1 Tel. (+43 1) 25077 1608
A-1210 Wien / Vienna Fax. (+43 1) 25077 1690
Austria Email: Mario.Eduardo@vu-wien.ac.at
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 V8 Issue 6074
**************************************