[16648] in Perl-Users-Digest
Perl-Users Digest, Issue: 4060 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 18 18:05:39 2000
Date: Fri, 18 Aug 2000 15:05:24 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966636323-v9-i4060@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 18 Aug 2000 Volume: 9 Number: 4060
Today's topics:
Re: Apache and cgi/perl <flavell@mail.cern.ch>
Re: cookie problem (Tony L. Svanstrom)
Re: Diamond-pattern inheritance protection (Conway) (Mark-Jason Dominus)
Download a file (Ken Loomis)
Re: Download a file <care227@attglobal.net>
Re: Eval and Regexps Help (Mark-Jason Dominus)
Re: FileHandle in array <ceeeya@my-deja.com>
Re: Finding a duplicate character <lr@hpl.hp.com>
Re: Following Hyperlinks with cgi (Slightly Off Topic) <godzilla@stomp.stomp.tokyo>
Re: Following Hyperlinks with cgi (Slightly Off Topic) <russ_jones@rac.ray.com>
Re: Following Hyperlinks with cgi <russ_jones@rac.ray.com>
Re: Following Hyperlinks with cgi <amonotod@netscape.net>
Re: Following Hyperlinks with cgi <russ_jones@rac.ray.com>
Re: Following Hyperlinks with cgi <godzilla@stomp.stomp.tokyo>
Re: Following Hyperlinks with cgi <amonotod@netscape.net>
funny perl <guym@guymcarthur.com>
Re: funny perl <katz@underlevel.net>
Re: help with RegExp <lr@hpl.hp.com>
Help! About running perlscript in Browser. hewuma@yahoo.com
Help. Proxy Server and login?????????????? <mkhan@crosscom.com>
Re: Html-like tags parsing (Damian Conway)
Re: My script has some bugs <kodos9@hotmail.com>
Net::ftp problem. 26red@my-deja.com
Re: Net::ftp problem. <amonotod@netscape.net>
Re: network operations under perl <amonotod@netscape.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 18 Aug 2000 23:05:31 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Apache and cgi/perl
Message-Id: <Pine.GHP.4.21.0008182250530.4917-100000@hpplus03.cern.ch>
[posted and an email copy sent...]
On Thu, 17 Aug 2000, J. Round wrote:
> In windows, I got no idea what to put there.
Just to round off this topic, no-one seems to have mentioned that it's
actually an FAQ. In your ActivePerl installation, it should have
created a menu item that opens the documentation for ActivePerl. In
addition to all the regular Perl documentation and FAQs, this includes
an "ActivePerl FAQ", one of whose sections is called "WebServer
Config". There, one finds configuration details for several different
choices of server, including Win32 Apache.
(I'm quoting here from a version that's around a year old, so
apologies of this doesn't quite fit the latest release)
I'd recommend checking out all of the available FAQs just to get a
feel for what's there.
Anyhow, under the entry for Win32 Apache it says
Apache provides an emulation of the UNIX shebang (#!/path/to/perl)
syntax, so the next step is easy. You can put you Perl scripts into
your cgi-bin directory, as long as you have a path to a valid
interpreter at the top. For example:
#!C:\PERL\5.00464\bin\MSWin32-x86\perl.exe
use CGI qw(:standard) ;
print header();
print "Hello, world";
Now, quite why they use backslashes in their example, I don't know,
because forward slashes work just as well, and are surely more
familiar to those with general Perl experience, no? Oh well.
cheers
------------------------------
Date: Fri, 18 Aug 2000 21:33:01 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: cookie problem
Message-Id: <1efkx44.1nouz6q3dvgr4N%tony@svanstrom.com>
Jeff Zucker <jeff@vpservices.com> wrote:
> MartinQz wrote:
> > ps. please forgive my poor English... ^_^
>
> No problem, this is an international group and all are welcome.
> Besides, you made yourself very well understood. ^_^
Jeff, are non-asians really allowed to use that kind of smileys?! ;-)
/Tony
--
/\___/\ Who would you like to read your messages today? /\___/\
\_@ @_/ Protect your privacy: <http://www.pgpi.com/> \_@ @_/
--oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
DSS: 0x9363F1DB, Fp: 6EA2 618F 6D21 91D3 2D82 78A6 647F F247 9363 F1DB
---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
\O/ \O/ ©1999 <http://www.svanstrom.com/?ref=news> \O/ \O/
------------------------------
Date: Fri, 18 Aug 2000 17:44:47 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Diamond-pattern inheritance protection (Conway)
Message-Id: <399d760e.3db$1e4@news.op.net>
Keywords: Sumerian, carouse, guzzle, hilarity
In article <8njmf1$3ut$1@nnrp1.deja.com>, <mgreenwood@tqs.com> wrote:
> I have added protection against
>repeated initializations in case of diamond-pattern inheritance as
>follows (taken almost verbatim from the text, section 6.1.5):
>
>sub _init
>{
> my ($self, %args) = @_;
> return if $self->{_init}{__PACKAGE__}++;
> # more stuff...
>}
>Here's my problem: my objects were not getting properly initialized.
Damian made a mistake here.
When the expression that indexes a hash is a single Perl identifier,
such as 'x' or '__PACKAGE__', it is always taken as a literal string.
(An identifier is a string that could serve as a variable name.) This
is so that you can write something like
$h{time}
and not have to worry that it might be calling the 'time' function.
When you change the key to
__PACKAGE__.""
then the hash key is no longer a Perl identifier, so it is evaluated
as an expressions, and __PACKAGE__ is replaced with the name of the
current package.
Changing it to
+__PACKAGE__
should also work.
------------------------------
Date: Fri, 18 Aug 2000 20:12:03 GMT
From: nospam@nospam.com (Ken Loomis)
Subject: Download a file
Message-Id: <399d9802.21309546@news.tiac.net>
Hello:
What is the perl command to download a file from within a cgi
response?
I'd like a qualifier web page before issuing a download.
Thanks,
Ken
------------------------------
Date: Fri, 18 Aug 2000 17:33:08 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Download a file
Message-Id: <399DAB94.8633BA7@attglobal.net>
Ken Loomis wrote:
>
> Hello:
>
> What is the perl command to download a file from within a cgi
> response?
Can you be more specific? Not sure this quite makes sense.
>
> I'd like a qualifier web page before issuing a download.
Qualifier?
------------------------------
Date: Fri, 18 Aug 2000 17:36:58 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Eval and Regexps Help
Message-Id: <399d7439.375$3bf@news.op.net>
In article <8ni3gd$b0t$1@nnrp1.deja.com>, <bluearchtop@my-deja.com> wrote:
>I want to be able to embed perl code in a string delimited by <% %> and
>have it evaluated.
There are a lot of modules that will do that. Text::Template is one
of them; probably other people can name some others.
------------------------------
Date: Fri, 18 Aug 2000 19:02:51 GMT
From: ceeeya <ceeeya@my-deja.com>
Subject: Re: FileHandle in array
Message-Id: <8nk18e$hcc$1@nnrp1.deja.com>
In article <0c3ppsce3b6u6k3agl28m46iblgh6dkdsg@4ax.com>,
Abe Timmerman <abe@ztreet.demon.nl> wrote:
--cut--
>
> Yep. I found that readline() doesn't work on my Linux box (perl
> 5.005_03) either. No problem on NT4 and ActivePerl 5.6.0 (616). The
> entry for readline() in perlfunc doesn't seem to have changed.
>
> > I've been pouring over perlref, but haven't been able to make the
proper
> > connect yet.
>
> The FileHandle manpage says:
> $fh->getline
> This works like <$fh> described in the section on "I/O Operators"
in
> the perlop manpage except that it's more readable and can be
safely
> called in an array context but still returns just one line.
>
> But don't get your hopes up, that didn't work either. Looks like a
bug.
> --
> Good luck,
> Abe
>
OK, I tried it under cygwin on my NT box and your readline() technique
worked fine. It doesn't work on my target SUNOS 5.5.1 box. Perl is
5.004_04.
I guess it is somewhat inconsistent at this point :( At least, as
typical with perl, there are different ways to accomplish my task.
Thanks!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 11:17:52 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Finding a duplicate character
Message-Id: <MPG.14071da98398a74898ac93@nntp.hpl.hp.com>
In article <8njptu$8br$1@nnrp1.deja.com> on Fri, 18 Aug 2000 16:57:46
GMT, vanis@my-deja.com <vanis@my-deja.com> says...
> Hi, Thank you for the quick replies.. I apologize if the question was
> insulting easy...I can understand how responding to a question (quite
> frequently) which can be found in the faq is annoying..
>
> > (Just Another Larry) Rosler
> > s/(.)\1/$1($1)/g; # add /s to include newlines
>
> > Kjetil Skotheim
> > s/(\w)(\1)/$1($2)/g;
>
> The first thing I learned about Perl, TMTOWTDI..Which answer is more
> efficient?? It seems as though Larry used a single grouping, while
> Kjetil used two separate groupings..
perldoc Benchmark
> > > P.s. A link to the faqs please...
> >
> > perlfaq4: "How do I remove consecutive pairs of characters?"
>
> I'm sorry for not being more specific, I meant a URL to the FAQ..not an
> reference to where I might find the related topic....if
> possible..gracias
perldoc perlfaq
For a URL, start at the obvious http://www.perl.com/ and follow the FAQ
link.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 18 Aug 2000 13:39:22 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Following Hyperlinks with cgi (Slightly Off Topic)
Message-Id: <399D9EFA.4B20826@stomp.stomp.tokyo>
Russ Jones wrote:
> "Godzilla!" wrote:
> > Jeremiah Adams wrote:
(snippage)
> Say you are responsible for keeping a hard-copy version of your very
> large aircraft manufacturing company's IT disaster recovery plan up to
> date, and the original copy of that plan lives on the web....
You maintain your original copy on the web? Well, hmm..
If a portion of the web goes down, the entire web goes
down? Should this server storing your original copy
suffer a hard drive crash or... hackers get at it.
Lots of stuff could happen.
Can't say I cotton to 'what if' people although this is
my behavior in this article. Nonetheless, seems prudent
to keep such a vital document or program on a portable
hard drive, on zip disk and CD rom, all stored within a
safe controlled environment, such as an air conditioned
low humidity room which is moderately stray radiation and
magnetically safe with a significant "air gap" protection
against any web connections.
My presumption is, based on your multiline logo, you are
indicating a *copy* of your original recovery plan is kept
on the web for clear and logical reasons.
True what you say about a link checker and a limit on
kilobyte size of return data. Hmm.. for a search engine
return such as yahoo, doubtful a huge load would be
returned. Most search engines simply return a page of
links, maybe ten to twenty kilobytes? However, if a
script checked returned links, this could certainly be
a big adventure for a long time.
Guessing this originating author will figure out inherent
problems with link resolution. Sure doesn't hurt though
for you to mention these topics. It's good information.
I wonder what would happen if a script like this hit one
of those pages which force hundreds of pop-up windows?
Godzilla!
------------------------------
Date: Fri, 18 Aug 2000 16:35:01 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Following Hyperlinks with cgi (Slightly Off Topic)
Message-Id: <399DAC05.C45B04B5@rac.ray.com>
"Godzilla!" wrote:
>
> Russ Jones wrote:
>
> > Say you are responsible for keeping a hard-copy version of your very
> > large aircraft manufacturing company's IT disaster recovery plan up to
> > date, and the original copy of that plan lives on the web....
>
> You maintain your original copy on the web? Well, hmm..
> If a portion of the web goes down, the entire web goes
> down? Should this server storing your original copy
> suffer a hard drive crash or... hackers get at it.
> Lots of stuff could happen.
>
This hypothetical disaster plan would be stored on the corporate
intranet, behind several layers of firewall, on a number of different
servers. Different areas of responsibility (mainframe, network,
desktop, Sun, HP, AIX, etc.), perhaps in different geographical
locations, would maintain their own sections of the plan. If some or
all of the intranet was to become unavailable due to some catastrophic
event, then the hypothetical hard-copy of the hypothetical disaster
plan would be taken from the fire-proof safe where it's kept, or,
barring that, recalled from the salt mines (literally) (yes I know
what "literally" means) where it is maintained. If a drive crashed, it
would be restored from backups. If the data center was nuked along
with the air base across the street, secondary backups and the
hard-copy would be recalled from the salt mines and carried to a
non-radio-active backup site.
Of course this is all hypothetical, and any similarity to the security
or disaster recovery procedures of any actual company is entirely
coincidental.
Since I AM only speaking hypothetically, it probably wouldn't be right
for me to mention that you don't seem to have any grasp of what goes
on in hypothetical corporate data centers where such things as
disaster recovery plans and firewalls and backups are common place.
Iesu, I can't believe I'm even responding to this person.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: Fri, 18 Aug 2000 14:37:49 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Following Hyperlinks with cgi
Message-Id: <399D908D.8256B065@rac.ray.com>
"Godzilla!" wrote:
>
> Jeremiah Adams wrote:
>
> > Can someone tell me how to follow hyperlinks with perl?
> > Or send me to a faq or website? IE, I want to submit a
> > link to the script and have the script resolve it.
>
> Easy enough!
>
> Two basic methods for this. One is to use LWP, the other
> to do a simple print Location.
>
If you're writing a link checker to make sure that none of the links
on a given page are busted, it's pretty easy.
If you want to do something like giving your script a URL and having
it list all the hyperlinks "below" that first URL, you have to have
some kind of limiting logic because sooner or later you'll hit a link
that will direct you to the main page of Yahoo and you'll end up
collecting the entire web.
Similarly, you want to have some kind of logic that will keep you from
revisiting the same page more than once, or you'll hit that "home"
link that everyone has on all of their pages and you'll loop forever.
Use LWP. As well as being able to do http get commands, it has user
agent routines that obey the standard robot rules, it has routines
that reports back all the information that's transmitted with the
page, like the last modified date, and ones that will parse out all of
the url's on the page that was just returned.
> I am curious though. If you already have a link to a
> site, couldn't you discover what is there by following
> this link via your browser? This is faster and certainly
> more efficient than using Perl for this task.
Say you are responsible for keeping a hard-copy version of your very
large aircraft manufacturing company's IT disaster recovery plan up to
date, and the original copy of that plan lives on the web. You could
feed in the url of the top page of the plan into your web crawler and
have it save the url of every page that had changed since the last
time you printed your hard-copy. Then you could feed that list into
some kind of web page printer.
It's not at all easy, but it's a very interesting and challenging
project.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: Fri, 18 Aug 2000 19:35:14 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: Following Hyperlinks with cgi
Message-Id: <8nk35h$jki$1@nnrp1.deja.com>
In article <399D7A42.50BC44AB@stomp.stomp.tokyo>,
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> Jeremiah Adams wrote:
>
> > Can someone tell me how to follow hyperlinks with perl?
> > Or send me to a faq or website? IE, I want to submit a
> > link to the script and have the script resolve it.
>
> I am curious though. If you already have a link to a
> site, couldn't you discover what is there by following
> this link via your browser? This is faster and certainly
> more efficient than using Perl for this task.
>
Personally, I don't give a shit why he wants it, and neither should you.
But, he probably want's to use it as a link counter, so that he can
track whether or not links from his site are being used. There's a
working script to do this on my site:
http://www.geocities.com/amonotod
It's ugly and uses meta refresh tags instead of Location headers (My new
script uses headers -- ok, it's not real new, it's about a year old, but
I haven't updated my web page with the script), but, like I said, it
does work.
<offtopic>
If the original author want's to email me, go ahead, I'll mail you the
new script no problem. Godzilla can't though, because she's a freakin
coward troll with no real email address. Freakin coward troll...
</offtopic>
HTH,
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 14:44:26 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Following Hyperlinks with cgi
Message-Id: <399D921A.540ADDE6@rac.ray.com>
Russ Jones wrote:
>
> If you're writing a link checker to make sure that none of the links
> on a given page are busted, it's pretty easy.
>
Crap, I know better than that. I meant to say "none of the links on a
given page IS busted."
Mea culpa, mea maxima culpa.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: Fri, 18 Aug 2000 13:58:34 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Following Hyperlinks with cgi
Message-Id: <399DA37A.E98AEC11@stomp.stomp.tokyo>
amonotod wrote:
> "Godzilla! wrote:
> > Jeremiah Adams wrote:
(gracious snippage)
> Personally, I don't give a shit why he wants it, and neither should you.
> Godzilla can't though, because she's a freakin
> coward troll with no real email address. Freakin coward troll...
> </offtopic>
My goodness. Must be having a corncob day.
I am making an assumption the Department of
Defense Network Information Center and the
Defense Information Systems Agency, are both
unaware you are using their system to abuse
the public. Most illogical on your part.
Godzilla!
------------------------------
Date: Fri, 18 Aug 2000 21:18:24 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: Following Hyperlinks with cgi
Message-Id: <8nk96e$qvs$1@nnrp1.deja.com>
In article <399DA37A.E98AEC11@stomp.stomp.tokyo>,
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> amonotod wrote:
>
> > "Godzilla! wrote:
> My goodness. Must be having a corncob day.
>
> I am making an assumption the Department of
> Defense Network Information Center and the
> Defense Information Systems Agency, are both
> unaware you are using their system to abuse
> the public. Most illogical on your part.
>
> Godzilla!
>
See, you can't just take a dig, and shut up, can you?
I am quite aware of how NNTP works, you have no knowledge to impart to
me. Or to anyone else, judging from your posting history.
amonotod
Hey, do you see the valid email address in my signature? Try listing
yours sometime. Like I said earlier -- Freakin coward troll...
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 13:12:18 -0700
From: Guy McArthur <guym@guymcarthur.com>
Subject: funny perl
Message-Id: <Pine.LNX.4.21.0008181309170.9460-100000@astronomica.as.arizona.edu>
Somewhere I once saw (perhaps an old edition of the camel
book) trivial examples of code that actually worked in two languages
(e.g. perl and C).
Does anyone know where I might find such examples?
GKM
------------------------------
Date: 18 Aug 2000 17:42:03 -0400
From: Jordan Katz <katz@underlevel.net>
Subject: Re: funny perl
Message-Id: <m3em3mz1p0.fsf@underlevel.underlevel.net>
Guy McArthur <guym@guymcarthur.com> writes:
> Somewhere I once saw (perhaps an old edition of the camel
> book) trivial examples of code that actually worked in two languages
> (e.g. perl and C).
>
> Does anyone know where I might find such examples?
At http://www.itknowledge.com/tpj/obfusc-4-awards.html
The entry you're looking for is: ``Second place: Philippe Bruhat's wc
(word count) script, which compiles both in C and in Perl, caused one
judge to leap from his chair and go wash his hands obsessively.''
--
Jordan Katz <katz@underlevel.net>
------------------------------
Date: Fri, 18 Aug 2000 14:03:20 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: help with RegExp
Message-Id: <MPG.14074476e7cee7398ac96@nntp.hpl.hp.com>
In article <8njjoh$gv$1@nnrp1.deja.com> on Fri, 18 Aug 2000 15:12:36
GMT, michaeljgardner@my-deja.com <michaeljgardner@my-deja.com> says...
...
> So, you've basically got a string of two "words" separated by one or
> more spaces, and you want to convert it to the first word. Here's a
> couple of ideas;
>
> 1) replace the space(s) and the last word with nothing
>
> $name=~s/\s+\w+//;
As that might work earlier in the string if there were leading spaces or
more than two words, an anchor at the end would be a good idea.
$name =~ s/\s+\w+$//;
> 2) return just the first word;
>
> $name=~m/(^\w+)/;
>
> I'm not sure if the second one changes $name's value to the match, so I
^^^^^^^^^^^^^^^
> put parenthesis around the match so that in any event, the first match
> would be saved in the system variable $1. So you may need to re-assign
^^^^^^^^^^^^^^^
> $name=$1.
If you can run a Perl program, it takes less effort to test these
conjectures than to talk about them. If you can't run a Perl program,
why are you responding here?
Or you could even read (gasp!) perlop before posting, to further your
own knowledge so as to be able better to help others.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 18 Aug 2000 18:35:33 GMT
From: hewuma@yahoo.com
Subject: Help! About running perlscript in Browser.
Message-Id: <8njvlj$fil$1@nnrp1.deja.com>
Hi All!
I have a question.
I run perlscript in browser? Small one is running well. But for the
large perlscript, I got following error message:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site
might be experiencing technical difficulties, or you may need to adjust
your browser settings.
------------------------------------------------------------------------
--------
Please try the following:
Click the Refresh button, or try again later.
If you typed the page address in the Address bar, make sure that it is
spelled correctly.
To check your connection settings, click the Tools menu, and then click
Internet Options. On the Connections tab, click Settings. The settings
should match those provided by your local area network (LAN)
administrator or Internet service provider (ISP).
If your Network Administrator has enabled it, Microsoft Windows can
examine your network and automatically discover network connection
settings.
If you would like Windows to try and discover them,
click Detect Network Settings
Some sites require 128-bit connection security. Click the Help menu and
then click About Internet Explorer to determine what strength security
you have installed.
If you are trying to reach a secure site, make sure your Security
settings can support it. Click the Tools menu, and then click Internet
Options. On the Advanced tab, scroll to the Security section and check
settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
Click the Back button to try another link.
Cannot find server or DNS Error
Internet Explorer
How to solve the problem?
Hope anybody can answer my question
Hewu
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 15:55:11 -0500
From: "Mohammad Khan" <mkhan@crosscom.com>
Subject: Help. Proxy Server and login??????????????
Message-Id: <399da2c3$0$9778@wodc7nh1.news.uu.net>
Hi,
I have a perl script which posts data to different web sites. Now one of
our customer is using Proxy server, which verifies the login and password
before letting them see the external internet web sites. Now how do I pass
the login info to the proxy server.
This is how my script looks like.
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);
$ua->proxy(['http', 'ftp'] => 'http://proxy.com');
Thanks in advance.
------------------------------
Date: 18 Aug 2000 21:44:08 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Html-like tags parsing
Message-Id: <8nkan8$ep4$1@towncrier.cc.monash.edu.au>
Jonathan Stowe <gellyfish@gellyfish.com> writes:
>On 18 Aug 2000 11:28:44 -0400, Ryan Tarpine Wrote:
>> I am trying to parse some files that have html-like (beginning and
>> ending) tags. However, when tags contain other tags of the same kind
>> (I can't think of better terminology. Sorry), a simple regexp
>> doesn't work.
>There are modules for the parsing of both HTML and XML, examples of which are
>given frequently in this group, you could do worse than search through
>Deja News for some examples or look at CPAN to see if there is something
>there that meets your requirements.
And if they don't you might consider Text::Balanced.
Damian
------------------------------
Date: Fri, 18 Aug 2000 14:32:38 -0700
From: "Chris" <kodos9@hotmail.com>
Subject: Re: My script has some bugs
Message-Id: <%cfn5.4628$uX.5744@newsfeed.slurp.net>
Do you have a header in the script?
print "Content-type: text/html\n\n";
"Brent Schenk" <brent.schenk@home.com> wrote in message
news:399d6b59.0@news...
> My script is basically finished! It has some bugs in it. When I do the
> check in windows/dos it goes just fine, but when I upload it to my server
it
> blows up with a 500 error and I can't figure it out. I have no way of
> tracking what is happening or where it is at when it stops. If someone
> could tell me how to do that, or do it for me if they have a UNIX machine
> that would be great! Maybe someone might even want to take a look at the
> script fix it leaving commments where they changed it. Thanks alot for
> anybody's help!
>
>
------------------------------
Date: Fri, 18 Aug 2000 21:22:07 GMT
From: 26red@my-deja.com
Subject: Net::ftp problem.
Message-Id: <8nk9db$r3b$1@nnrp1.deja.com>
I am using gbarr's version of FTP.pm and I wrote a
sample program that uses it.. Here is how it looks..
#!/usr/local/bin/perl5 -w
BEGIN
{
require "FTP.pm";
#use Net::FTP;
#END
}
$hostname = 'EQTS5';
printf "$hostname\n";
$username = 'progtrad';
$password = 'progtrad';
#Hardcore the directory and filename to get
$filename = 'potomac.pl';
#!/usr/local/bin/perl5 -w
BEGIN
{
require "FTP.pm";
#use Net::FTP;
#END
}
$hostname = 'EQTS5';
printf "$hostname\n";
$username = 'bike';
$password = 'bike';
#Hardcore the directory and filename to get
$filename = 'potomac.pl';
#Open the connection to the host
printf "Start the connection\n";
$ftp = new Net::FTP('EQTS5', Debug => 1);
$ftp->login('progtrad', 'progtrad');
printf "During the connection to the host\n";
#Now get the file and leave ...
$ftp->get('splitfinder.xls');
printf "After getting the file\n";
$ftp->quit;
printf "Goodbye\n";
However, when I run it.. I get this error
Can't locate object method "new" via package
"Net::FTP::A" at /usr/local/lib/per
l5/sun4-solaris/5.00404/IO/Socket.pm line 253.
Has anybody came across this problem..
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 21:39:59 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: Net::ftp problem.
Message-Id: <8nkafc$sdf$1@nnrp1.deja.com>
In article <8nk9db$r3b$1@nnrp1.deja.com>,
26red@my-deja.com wrote:
> I am using gbarr's version of FTP.pm and I wrote a
> sample program that uses it.. Here is how it looks..
>
> #!/usr/local/bin/perl5 -w
> BEGIN
> {
> require "FTP.pm";
> #use Net::FTP;
> #END
> }
> $hostname = 'EQTS5';
> printf "$hostname\n";
> $username = 'progtrad';
> $password = 'progtrad';
> #Hardcore the directory and filename to get
> $filename = 'potomac.pl';
> #!/usr/local/bin/perl5 -w
> BEGIN
> {
> require "FTP.pm";
> #use Net::FTP;
> #END
> }
> $hostname = 'EQTS5';
> printf "$hostname\n";
> $username = 'bike';
> $password = 'bike';
> #Hardcore the directory and filename to get
> $filename = 'potomac.pl';
> #Open the connection to the host
> printf "Start the connection\n";
> $ftp = new Net::FTP('EQTS5', Debug => 1);
> $ftp->login('progtrad', 'progtrad');
> printf "During the connection to the host\n";
> #Now get the file and leave ...
> $ftp->get('splitfinder.xls');
> printf "After getting the file\n";
> $ftp->quit;
> printf "Goodbye\n";
> However, when I run it.. I get this error
>
> Can't locate object method "new" via package
> "Net::FTP::A" at /usr/local/lib/per
> l5/sun4-solaris/5.00404/IO/Socket.pm line 253.
>
Well, no, but is that really just one script? Looks like two mashed
together... Hmmm, anyway, here's a script that works perfectly for me
on WinNT ASPerl 5.005:
#!/usr/bin/perl -w
use strict;
use Net::FTP;
my $REMOTESERVER="ftp\.host\.net"; #hostname
my $username="user";#login ID
my $password="p\@ssw0rd";#password
my $path2file = "/usr/account/pub/example.gz";#remote file
my $filesaveas = "d:/download/example.gz";#local file
unlink ($filesaveas);
print "Getting file...\n";
my $ftp=Net::FTP->new($REMOTESERVER) or die "Cannot Connect: $@\n";
$ftp->login($username,$password) or die "Could not login to the
Server\n";
#$ftp->type("A"); #text
$ftp->type("I"); #binary
$ftp->get($path2file,$filesaveas);
$ftp->quit();
HTH,
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 18 Aug 2000 20:01:34 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: network operations under perl
Message-Id: <8nk4mh$ldt$1@nnrp1.deja.com>
In article <399d752f.85628023@nntp.unsw.edu.au>,
newsgroup@here.com wrote:
> attempting to put together a program to enumerate all workgroups in
> the LAN, all machines in a given workgroup, and all shared directories
> on that machine (the idea is to search the LAN for a given filename).
As posted by Simon Oliver <simon.oliver_at_umist.ac.uk> to the
Perl-Win32-Admin mailing list,
Perl-Win32-Admin@listserv.ActiveState.com,
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
#!perl -w
use strict;
use Win32::Lanman;
use Data::Dumper;
my ($node, $domain, $dc);
my $servers_info = [];
my $servers = [];
my $shares = {};
$node = Win32::NodeName;
$domain = Win32::DomainName;
Win32::Lanman::NetGetAnyDCName($node, $domain, \$dc) or die $^E;
# get a list of servers
Win32::Lanman::NetServerEnum($dc, $domain, SV_TYPE_SERVER,
$servers_info) or die
$^E;
@{$servers} = map {$_->{name}} @{$servers_info};
#print Dumper($servers), "\n";
# get the servers' shares and paths
$shares = get_shares($servers, STYPE_PRINTQ);
print Dumper($shares), "\n";
exit;
sub get_shares {
my ($servers, $constraint) = @_;
my $hash_ref = {};
foreach my $server (@$servers) {
$hash_ref->{$server} = get_server_shares($server,
$constraint);
}
return $hash_ref;
}
sub get_server_shares {
my ($server, $constraint) = @_;
my @shares;
my $hash_ref = {};
Win32::Lanman::NetShareEnum($server, \@shares) or return;
# print "$server\n";
foreach my $share (@shares) {
if (defined $share->{path}){
if (defined $constraint) {
next unless ($share->{type} ==
$constraint);
}
# print "\t$share->{netname},
'$share->{remark}'\n";
$hash_ref->{$share->{netname}} =
$share->{remark};
}
}
return $hash_ref;
}
_______________________________________________
> Thanks heaps in advance
>
> -dionysus
HTH,
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4060
**************************************