[10487] in Perl-Users-Digest
Perl-Users Digest, Issue: 4079 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 27 05:06:21 1998
Date: Tue, 27 Oct 98 02:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 27 Oct 1998 Volume: 8 Number: 4079
Today's topics:
Re: Array to Hash Keys <dgris@rand.dimensional.com>
Re: Array to Hash Keys (Larry Rosler)
Authentication with User Password dominic@shafika.vetri.com
Re: CGI problem when retrieving filenames <e.christensen@netjob.dk>
Re: changing route for users via html page (Smith and O'Halloran)
Re: Mail from Perl on NT (M.)
Re: Need help with SQL updates in WIN32 perl <e.christensen@netjob.dk>
Re: Not to start a language war but.. (Dennis Lee Bieber)
Re: Not to start a language war but.. (David Formosa)
Re: Not to start a language war but.. (Abigail)
Re: Not to start a language war but.. (Abigail)
Re: Not to start a language war but.. (David Formosa)
Re: Not to start a language war but.. <Klaus.Schilling@home.ivm.de>
Re: ODBC & MS Access <aaron@@primordium.com>
Re: ODBC & MS Access <sjohns17@uic.edu>
Re: Perl & Y2K - booby trap code <rra@stanford.edu>
Re: Problem with Win32 reg exp (Patrick Timmins)
script editing a text file. <sernc@mailserv.rz.fh-muenchen.de>
Re: Sending mail using perl (M.)
Re: Sending mail using perl (David Formosa)
Re: Sending mail using perl dave@mag-sol.com
Re: Size of JPEG and GIF <e.christensen@netjob.dk>
Weirdness with LWP Module mrkabir1466@my-dejanews.com
Re: What isn't Perl good for? (Abigail)
Re: What isn't Perl good for? (David Formosa)
Re: What isn't Perl good for? (David Formosa)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 27 Oct 1998 06:03:03 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Array to Hash Keys
Message-Id: <m31znueepw.fsf@rand.dimensional.com>
Tk Soh <r28629@email.sps.mot.com> writes:
> Larry Rosler wrote:
> > In the second case, where you don't know how many elements there are a
> > priori, if all you're interested in are the hash keys and the values may
> > be undefined (as seems likely from your problem statement):
> >
> > @hash_table{ <IN> } = ();
>
> This might be closer:
>
> grep {$hash_table{$_} = 0} <IN>;
Larry's solution is much better in terms of performance though.
Both versions put the entire file on the stack, but his assigns
in one swell foop while yours iterates over each element of the
list.
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
Supporter of grumpiness where grumpiness is due on clpm.
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Mon, 26 Oct 1998 22:05:56 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Array to Hash Keys
Message-Id: <MPG.109f029d524b7c0c9898e1@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <1dhj7ka.9o2kqwdxvltgN@bay1-271.quincy.ziplink.net> on Tue,
27 Oct 1998 00:47:54 -0500, Ronald J Kimball <rjk@coos.dartmouth.edu>
says...
> Tk Soh <r28629@email.sps.mot.com> wrote:
> > Larry Rosler wrote:
> > > @hash_table{ <IN> } = ();
> >
> > This might be closer:
> >
> > grep {$hash_table{$_} = 0} <IN>;
>
> Closer to what?
>
> If you are implying that Larry's suggestion does not work, I believe you
> are mistaken.
I think he meant closer to the original specification, which assigned
0, not undef, to each hash member. I made that distinction clear in
proposing the hash-slice approach.
I have addressed the 'grep in void context' issue in another post.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 27 Oct 1998 09:19:42 GMT
From: dominic@shafika.vetri.com
Subject: Authentication with User Password
Message-Id: <71437d$qgh$1@nnrp1.dejanews.com>
Hello All,
I need to implement a script that, after a successful password log-in,
will allow that user to see a selected group of HTML/ASP pages without having
to re-log in when he goes to another page within this selected group. This
selected group of html pages cannot be bookmarked, or seen by outsiders
who aren't authorized.
Also I dont want to display the password information on the Navigator URL
window.
Sometime back I saw a script called auth*.tar. But I am not able to locate
it now. Could you please give some pointers to do this.
Regards
Dominic
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 10:14:30 +0100
From: EC <e.christensen@netjob.dk>
To: Jeff Kiser <jeffk@synplicity.com>
Subject: Re: CGI problem when retrieving filenames
Message-Id: <36358EF5.E3FDD87F@netjob.dk>
Hi
You could use forward slash instead or
c:\\somedir\\somefile
Ernst
Jeff Kiser wrote:
> I have an example that works fine as one script but I wanted to attempt to
> make it a little more modular for ease with reuse. My main problem is, this
> is a CGI script that uploads a file selected using the mulitpart-form data
> encryption type (I am using CGI.pm by the way). When I select a file using
> NT, the file is written out as C:\<some path>\<some file>. My problem is
> that any backslashed characters are being interpretted before I can do
> anything with them. For example, if the path were C:\test\testfile.txt and
> I got to get it using $file = $form->param('filename'); the $file variable
> gets set as:
>
> C: est estfile.txt
>
> the '\t' character patterns are being interpretted as tab characters. I've
> tried to rebuild them but it won't work. Does anyone know of any
> workarounds to keep this translation from occuring? Thanks
>
> Jeff Kiser
> jeffk@synplicity.com
------------------------------
Date: 26 Oct 1998 22:07:37 -0800
From: inwap@best.com (Smith and O'Halloran)
Subject: Re: changing route for users via html page
Message-Id: <713nv9$pqm$1@shell3.ba.best.com>
In article <362B1F65.240FE6C1@dds.nl>, Freerk Jongsma <freerk@dds.nl> wrote:
>Am I on the right way, or is it very stupid to put the password in the
>perl script?
Yes, it is extremely stupid. Never every put the root's plaintext
password into a script.
If you have to, use a compiled binary program that is set-uid root.
(See "man chmod", look for "chmod u+s".)
-Joe
--
INWAP.COM is Joe and Sally Smith, John and Chris O'Halloran and our cats
See http://www.inwap.com/ for PDP-10, "ReBoot", "Shadow Raiders"/"War Planets"
------------------------------
Date: Tue, 27 Oct 1998 06:49:51 GMT
From: pub @ alma . ch (M.)
Subject: Re: Mail from Perl on NT
Message-Id: <36356c0b.1757181@news.urbanet.ch>
>I'm new to Perl and CGI and have scripts which send mail and work on my
>ISP's Unix server, using:
>
>$mailprog = '/usr/sbin/sendmail';
>
>open(MAIL, "|$mailprog $recipient")
>then all the other print MAIL statements.
>
>My questions are:
>
>1) Will this work also on NT?
No, there is no mail executable by default. You have to either get a
Win32 command-line mailer, or change your scripts to use one of the
Perl only mailing modules.
Look at http://alma.ch/perl/mail.htm for a description of
Mail::Sendmail and links to the other Perl and command-line mailers.
------------------------------
Date: Tue, 27 Oct 1998 10:12:17 +0100
From: EC <e.christensen@netjob.dk>
To: Hemi Craig <HemiCraig@hd.com>
Subject: Re: Need help with SQL updates in WIN32 perl
Message-Id: <36358E71.F65BA65E@netjob.dk>
Hi
If you use $O->DumpError;
You can see what went wrong
Ernst
Hemi Craig wrote:
> Looking for some expertise in the area of SQL command usage in PERL. I have
> not been able to successfully UPDATE a column in a table. I have been able to
> perform SELECTS without problems. My current NT box has WIN Perl and WIN32
> ODBC . Any help will be appreciated.
>
> I attempted with the following statements:
>
> $sqlstatement = "UPDATE CCUAlarms SET state = 1 WHERE ccu_id = 1";
>
> if (! $O->Sql($sqlstatement))
>
> {
>
> @FieldNames = $O->FieldNames(); # Get list of field names
> print("field descriptions are @FieldNames\n");
> foreach $k (@FieldNames) {
> print("fieldnames are <$k>\n");
> }
>
> while($O->FetchRow())
> { # Get a row of data
> undef %Data;
> %Data = $O->DataHash(); # Generate associative array
> # of field names and values
> $t = $Data{"state"};
>
> print ("\n\state = \t\t$t\n");
>
>
> } # end while
> } # end if
------------------------------
Date: Tue, 27 Oct 1998 05:56:45 GMT
From: wlfraed@ix.netcom.com (Dennis Lee Bieber)
Subject: Re: Not to start a language war but..
Message-Id: <36365a4c.4560561@nntp.ix.netcom.com>
On Mon, 26 Oct 1998 16:50:05 -0500, John Porter <jdporter@min.net>
declaimed the following in comp.lang.python:
>
> print "Hello World"
>
> is too tough for you?
>
Okay, so I did extend a bit of hyperbole...
> And if you were trying to learn Perl -- I assume you were, if you
> were actually reading two versions of the Camel book -- why didn't
> you ask here (comp.lang.perl.misc) for help?
At the time I didn't even have newsgroup access, just the first
version of the book and the hard-to-understand notes on an Amiga CD-ROM.
--
> ============================================================== <
> wlfraed@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed@dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
------------------------------
Date: 27 Oct 1998 05:58:09 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Not to start a language war but..
Message-Id: <slrn73ao7h.25k.dformosa@godzilla.zeta.org.au>
In article <36355525.50F0C274@Lugoj.Com>, James Logajan wrote:
>Abigail wrote:
[...]
>> Hmm, sure. But in Perl I can write "The answer is $a", just like in
>> the shell. And if I have a variable $goobelygook, and I upgrade Perl
>> with the new version of Perl having a function called 'goobelygook'
>> (or I use a Module that exports a function 'goobelygook') I won't have
>> any name clashes.
>
>IMHO you are paying an uneeded price to avoid name clashes.
Being able to directly insurt verables into strings is a very usefull
tool. Preventing name clashes with text is far more importent to me
then any other clashing problems.
[...]
>P.P.S. What DO Perl programmers call themselves? Perlers? Perlists?
Perlverts
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: 27 Oct 1998 06:12:18 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Not to start a language war but..
Message-Id: <713o82$98h$2@client3.news.psi.net>
Sam Holden (sholden@pgrad.cs.usyd.edu.au) wrote on MDCCCLXXXII September
MCMXCIII in <URL:news:slrn73a013.kmo.sholden@pgrad.cs.usyd.edu.au>:
++ On Mon, 26 Oct 1998 21:11:34 GMT, David Combs <dkcombs@netcom.com> wrote:
++ >(1) What about garbage collection?
++ >
++ >The last time I looked at Python, it worked via ONLY
++ >ref-counts; ie, could not gc circular lists, anything
++ >with backpointers, etc.
++ >
++ >Seemed to me like a real loss, compared to perl's.
++
++ But perl also uses a reference count and thus doesn't garbage collect
++ self-referential constructs....
Well, it does, but not as often as you might wish. It will do a mark
and sweep GC at the end of a thread.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|8;
.qq;8768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F;
.qq;76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V
/=$^U}while$^V!=$^W'
------------------------------
Date: 27 Oct 1998 06:09:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Not to start a language war but..
Message-Id: <713o3m$98h$1@client3.news.psi.net>
James Logajan (JamesL@Lugoj.Com) wrote on MDCCCLXXXIII September MCMXCIII
in <URL:news:36355525.50F0C274@Lugoj.Com>:
++
++ Thank you; my mistake has been pointed out to me by several people both
++ nicely and not so nicely. Actually the result is that I mistakenly gave
++ the Perl "$" more information than it actually supplied. It has been
++ almost 2 years since I looked at the language; I should have reviewed my
++ copy of "Programming Perl" before posting (see, I do own a copy). I may
++ actually intermixed Tcl syntax and concepts with Perl, both of which I
++ looked at about the same time. Horrible gaff. Still, I think my essential
++ point remains unaffected.
I don't think so. Your point was mostly based on the fact that '$' was
supposed to mean 'string', yet the variable was used as an integer.
Now that we have established '$' means scalar, and Perl will figure
out whether you have a string or an integer, there isn't much of your
point left.
++ > Hmm, sure. But in Perl I can write "The answer is $a", just like in
++ > the shell. And if I have a variable $goobelygook, and I upgrade Perl
++ > with the new version of Perl having a function called 'goobelygook'
++ > (or I use a Module that exports a function 'goobelygook') I won't have
++ > any name clashes.
++
++ IMHO you are paying an uneeded price to avoid name clashes. Besides,
++ I think that Bourne adopted the $ notation to avoid shell variable name
++ clashes with file names. Not really something a generalized scripting
++ language should be built around, IMHO.
Being able to do variable interpolation in strings belongs to my
top 5 favourite features of Perl.
I don't give a damn if you like Perl or not. By all means, if you find
things difficult about Perl, write them down so others can benefit from
them. Just don't write things that aren't true, or present opinions as
absolute values.
Abigail
--
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'
------------------------------
Date: 27 Oct 1998 07:16:08 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Not to start a language war but..
Message-Id: <slrn73aspn.hlr.dformosa@godzilla.zeta.org.au>
In article <713o3m$98h$1@client3.news.psi.net>, Abigail wrote:
>Being able to do variable interpolation in strings belongs to my
>top 5 favourite features of Perl.
What are the other 4?
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: 27 Oct 1998 00:15:50 +0100
From: Klaus Schilling <Klaus.Schilling@home.ivm.de>
Subject: Re: Not to start a language war but..
Message-Id: <87iuh69aop.fsf@ivm.de>
John Porter <jdporter@min.net> writes:
> Klaus Schilling wrote:
> >
> > Cool syntaxes like Scheme's don't need curly braces or indentation for
> > delimiting blocks, so there's no advantage in using either.
>
> Best answer I've heard yet.
>
> But it still begs another (related) question:
>
> If Scheme's syntax is so cool, why is it used even less than Python,
> not to mention Perl?
Because Scheme lacks a module system.
Klaus Schilling
------------------------------
Date: Mon, 26 Oct 1998 23:03:43 -0800
From: "Aaron Henderson" <aaron@@primordium.com>
Subject: Re: ODBC & MS Access
Message-Id: <713uqe$l0r$1@news.junction.net>
Problem Solved:
$SqlStatement = "SELECT * FROM contacts WHERE field_name=field_value";
I seem to have found the obscured "WHERE" part.
------------------------------
Date: Tue, 27 Oct 1998 02:12:04 -0600
From: Seth David Johnson <sjohns17@uic.edu>
Subject: Re: ODBC & MS Access
Message-Id: <Pine.A41.3.96.981027020138.144538C-100000@tigger.cc.uic.edu>
Aaron-
I had the same problem when I had to switch from a well-organized .dbase
file to a slightly less organized ODBC data source. While I could
process/print rows while I was fetching rows from the dbase file, I didn't
have the luxury with the open database. My solution (I can't guarantee
that this is the best) was to create and build on a sort of "hash tree"
(hashes of hashes of hashes, etc. - check out the Data Structures section
of the camel book), then go back to it after I had read everything from
the database and closed the connection. This way everything was
well-organized and I could do a
foreach(keys %hash) {
foreach(keys %{$hash{$subhash}}) { ... }
}
sort of thing. I could always back-reference whenever I needed to without
worrying what row I was on.
Let me know if this helps, or is completely useless...
-Seth Johnson
On Mon, 26 Oct 1998, it was written:
> I'm working on a perlScript for reading information from a MS Access
> database (Win32::ODBC). I'm basically searching through the listings and
> finding keyword matches. What I need to do is record what Row I found a hit
> at and then later read from this Row to display the information. I've been
> reading through the FAQ's but I can't seem to find out how to read from a
> specific row. The only way I can see of getting to a certain row right now
> is by using:
>
> while($db->FetchRow) {
> # process the row
> }
>
> ... and then testing to see which Row it is at. There must be a faster
> route I'm missing? Or maybe I'm approaching this the wrong way.
>
> Any information on this and on faster ways of searching Access databases is
> muchly appreciated!
>
> Aaron
>
> Primordium Productions - www.primordium.com
>
>
>
>
>
------------------------------
Date: 27 Oct 1998 00:11:08 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <yl4ssqxw4j.fsf@windlord.stanford.edu>
Craig Berry <cberry@cinenet.net> writes:
> jkane@my-dejanews.com wrote:
>> When I look at the output of localtime, it is only two digits. When
>> 2000 rolls around, won't $year += 1900 still give 1900? I am obviously
>> missing something major here.
> How can you conclude that?? Seriously, what sort of logic is behind
> that question?
Logic informed by every dealing they've had with how humans represent
dates probably from shortly after birth. Perl and C's handling of years
is illogical *in the context of human handling of years in dates*. Ilya's
certainly correct from the theoretical perspective that any given start of
epoch is as good as any other, but people don't come to Perl from a pure
mathematical background.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Tue, 27 Oct 1998 07:37:14 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Problem with Win32 reg exp
Message-Id: <713t7a$imh$1@nnrp1.dejanews.com>
In article <713flh$iht$1@nnrp03.primenet.com>,
"Tim Peter" <timpeter@primenet.com> wrote:
> OK, I'm gonna get hammered for this, but...
>
> I'm a long time lurker, first-time poster. I'm required to write a Perl
> script on an NT box due to current project. I've checked the FAQs, the man
> pages, AND Deja News archives, but... I couldn't find an answer to this
> anywhere. If you know the answer, or where I can find it, please let me
> know. Private e-mail is OK to conserve bandwidth.
>
> This reg exp fails and I don't know why:
>
> perl -e 's/foo/bar/gi' -p -i.bak *.txt
>
> This isn't CGI, it's at a command prompt. It must be a limitation of Win32,
> but I can't figure out how to get around it. Any help would be appreciated.
Try this (works for me on Gurusamy Sarathy Perl 5.004_02 on Win95):
perl -e "while(<>) {s/foo/bar/gi; print;}" -i.bak test.txt
The -p switch doesn't work (for me) on win32 (I don't know why),
so I have to manually put in a while loop.
The single quotes for the -e switched Perl code doesn't work (for me)
on win32 (I don't know why), so I have to use double quotes.
You won't get it to do what you want (I think) with any version of Perl
without the 'print' statement, as is documented for the -i switch in
perldoc perlrun .
Patrick Timmins
$monger{Omaha}[0]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 09:30:29 +0100
From: "Matevz Sernc" <sernc@mailserv.rz.fh-muenchen.de>
Subject: script editing a text file.
Message-Id: <7140ba$q9i$1@sparcserver.lrz-muenchen.de>
Hi all
Can anyone help me in making a cgi script which can open a text file and
deletes the last line + inserts what a user has entered in a form.
Thanks for helping
Mat.
------------------------------
Date: Tue, 27 Oct 1998 06:51:48 GMT
From: pub @ alma . ch (M.)
Subject: Re: Sending mail using perl
Message-Id: <36366d43.2069606@news.urbanet.ch>
>I have created a perl cgi program that will take a html form and
>process the data. The question is once i process the data i
>know how to shove the data into a output file but i would like to
>also automatically send the data to a person via e-mail.
Look at http://alma.ch/perl/mail.htm for a description of
Mail::Sendmail and for links to other modules and command-line
mailers.
------------------------------
Date: 27 Oct 1998 07:19:13 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Sending mail using perl
Message-Id: <slrn73asvh.hlr.dformosa@godzilla.zeta.org.au>
In article <36356075.82327645@auspex.net>, Justin B. Harvey wrote:
>Are there any issues with:
>
>open MAIL, "|mail $address" or die "mail not found, duh\n";
>print MAIL "Subject: Hello\n";
>print MAIL "Yadda yadda yadda\n";
>close MAIL;
>
>Security concerns? Just a different way? I'd be interesting in getting
>comments :>
$address='some@address;rm -rm *';
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: Tue, 27 Oct 1998 09:19:39 GMT
From: dave@mag-sol.com
Subject: Re: Sending mail using perl
Message-Id: <71437a$qgf$1@nnrp1.dejanews.com>
In article <3634C55A.1AC6@cabletron.com>,
Dan Tropea <dtropea@cabletron.com> wrote:
> I have created a perl cgi program that will take a html form and
> process the data. The question is once i process the data i
> know how to shove the data into a output file but i would like to
> also automatically send the data to a person via e-mail.
Dan,
Get the MailTools bundle from CPAN
<http://www.cpan.org/modules/by-module/Mail/>.
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://london.pm.org/>
[Note Changed URL]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 10:02:20 +0100
From: EC <e.christensen@netjob.dk>
To: parab0la@my-dejanews.com
Subject: Re: Size of JPEG and GIF
Message-Id: <36358C1C.929D9403@netjob.dk>
Hi
If you are on a NT server you could use fly.exe (maybe it comes in a Unix version
too?)
Ernst
parab0la@my-dejanews.com wrote:
> Hi all,
>
> I'm writing a small HTML generator in PERL, and wants to find out the size of
> GIF and JPEG images. So that I can write the HEIGHT= and WIDTH= options in
> the <IMG> tag. What is the most suitable way to do it? Should I use PERL to
> parse the header of those files? Or is there any external command that I can
> call?
>
> Thx!
> --
> Parabola - the famous curve.
> URL: http://parabola.home.ml.org/
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 27 Oct 1998 06:50:40 GMT
From: mrkabir1466@my-dejanews.com
Subject: Weirdness with LWP Module
Message-Id: <713qg0$fmn$1@nnrp1.dejanews.com>
Hi,
The following script works from command-line but does
not work as a CGI script.
----------
#!/usr/bin/perl
#use LWP::Debug qw(+);
use strict;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
my $ua = new LWP::UserAgent;
my $url = 'http://www.perl.com/';
my $request = new HTTP::Request('GET', $url);
my $response = $ua->request($request);
print "Content-type: text/html\n\n";
print "Process id $$ <br>";
if ($response->is_success) {
print $response->content;
} else {
print $response->error_as_HTML;
}
---------
There is NO CGI related problem in the script
as it shows the followig output:
--------
Process id 32430 <br><HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</h1>
500 Can't connect to www.perl.com:80 (Invalid argument)
</BODY>
</HTML>
--------
My platform is: RedHat Linux 5.1 runing Apache 1.3.3
Perl version: I have tried the script on both 5.005_02 and
5.004_04 versions.
I also have the latest version of following modules:
IO, LWP, Bundle::libnet, MD5, HTML::Parser, MIME::Base64.
Any idea whats the problem here?
Thanks.
MK
kabir@nitec.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 27 Oct 1998 06:16:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: What isn't Perl good for?
Message-Id: <713ogh$98h$3@client3.news.psi.net>
John Moreno (phenix@interpath.com) wrote on MDCCCLXXXIII September
MCMXCIII in <URL:news:1dhj6wr.155mssxkasb4aN@roxboro0-006.dyn.interpath.net>:
++ Tom Christiansen <tchrist@mox.perl.com> wrote:
++
++ > --tom
++ > -- "If Dennis Ritchie were the man who developed Modula-2 then C would be
++ > long forgotten."
++ > --Tarjei Jensen
++
++ Not really perl related but better than the troll - this sounds profound
++ but I can't figure out what it means. Any idea?
To me it looks like that Tarjei finds Modula-2 a far better language
than C, but he blames "advertisement" of the fact that C is a winner
and Modula-2 plays at the side line.
I agree with the first part, I've no reason to assume the second
part is true.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: 27 Oct 1998 06:20:12 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: What isn't Perl good for?
Message-Id: <slrn73apgr.25k.dformosa@godzilla.zeta.org.au>
In article <3635069f.795963@news.junctionnet.com>, Michael Lewchuk wrote:
>On Sun, 25 Oct 1998 20:11:26 GMT, Daniel Grisinger
[...]
>>Please elaborate on exactly how it is not a programming language.
>
>I believe localization is my biggest concern: the ability to structure an
>entire program as a hierarchical series of modules, each containing its own
>environment. Such a task is natural in some ASM, C, heck, most programming
>languages, but not in perl.
Do you mean like this?
sub routen {
my $verable;
my $otherverable;
}
or do you mean like this
package package1;
sub stub {}
sub stub1 {}
package package2;
sub stub2 {}
sub stub3 {}
>>You may want to include your definition of `programming language'
>>for the benefit of us morons who think that perl qualifies.
>
>First of all, I didn't call anyone a moron.
>
>Second, my concerns are stated above.
I would consider perl a programin language because it is turning complete.
[...]
>If words like "illegible", "unmaintainable", "buggy", and "incomprehensible"
>have no meaning for you, it's not my problem.
Buggy? If you have found bugs in perl could you please submit via perlbug
so that we can correct them.
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: 27 Oct 1998 06:30:18 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: What isn't Perl good for?
Message-Id: <slrn73aq3q.25k.dformosa@godzilla.zeta.org.au>
In article <1dhj6wr.155mssxkasb4aN@roxboro0-006.dyn.interpath.net>, John
Moreno wrote:
>Tom Christiansen <tchrist@mox.perl.com> wrote:
>
>> --tom
>> -- "If Dennis Ritchie were the man who developed Modula-2 then C would be
>> long forgotten."
>> --Tarjei Jensen
>
>Not really perl related but better than the troll - this sounds profound
>but I can't figure out what it means. Any idea?
>
My guess is that if Dennis Ritchie developed modula-2 then m-2's standard
modules wouldn't have been in WaReZ CaPs and the keywords would have been
in lowercase. Then modula two would have been easyer to type and would
have won out against C.
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4079
**************************************