[29393] in Perl-Users-Digest
Perl-Users Digest, Issue: 637 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 9 18:10:06 2007
Date: Mon, 9 Jul 2007 15:09:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 9 Jul 2007 Volume: 11 Number: 637
Today's topics:
carp "$!" vs carp "$!\n" (Name withheld by request)
Re: carp "$!" vs carp "$!\n" <glex_no-spam@qwest-spam-no.invalid>
Re: carp "$!" vs carp "$!\n" (Greg Bacon)
Re: Fork Example <joe@inwap.com>
google search <kvjohan@gmail.com>
Re: google search usenet@DavidFilmer.com
Re: How to check a form's field and exit Perl program i <hjp-usenet2@hjp.at>
Mac Addressbook and Mutt Alias <rwood@therandymon.com>
Outlook Express messages (was: Re: re-lurking) <rvtol+news@isolution.nl>
ranting about programming languages (was Re: How to che <m@rtij.nl.invlalid>
Re: re-lurking <spamtrap@dot-app.org>
Re: re-lurking QoS@domain.invalid
Re: re-lurking <invalid@invalid.nyet>
Re: Remove a specific element from an Array <spamtrap@dot-app.org>
Re: retrieving news messages <invalid@invalid.nyet>
Re: retrieving news messages <ced@blv-sam-01.ca.boeing.com>
Streamlining login to Web site mailbox@cpacker.org
Re: Streamlining login to Web site <glex_no-spam@qwest-spam-no.invalid>
Re: Win32::OLE, Microsoft Word <benhollister@gmail.com>
Re: XML SAX Parser for PERL xhoster@gmail.com
Re: XML SAX Parser for PERL <kkeller-usenet@wombat.san-francisco.ca.us>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 09 Jul 2007 20:56:08 GMT
From: anonb6e9@nyx3.nyx.net (Name withheld by request)
Subject: carp "$!" vs carp "$!\n"
Message-Id: <1184014565.647526@irys.nyx.net>
What am I missing here?:
/tmp $ perl -le 'use Carp;unlink "makesureImNotaFile";carp "$!";print "hi"'
No such file or directory at -e line 1
hi
/tmp $ perl -le 'use Carp;unlink "makesureImNotaFile";carp "$!\n";print "hi"'
No such file or directory
Why doesn't carp show the line number in the 2nd example above?
--
Thanks
------------------------------
Date: Mon, 09 Jul 2007 15:57:59 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: carp "$!" vs carp "$!\n"
Message-Id: <4692a157$0$513$815e3792@news.qwest.net>
Name withheld by request wrote:
> What am I missing here?:
>
> /tmp $ perl -le 'use Carp;unlink "makesureImNotaFile";carp "$!";print "hi"'
> No such file or directory at -e line 1
> hi
> /tmp $ perl -le 'use Carp;unlink "makesureImNotaFile";carp "$!\n";print "hi"'
> No such file or directory
>
> Why doesn't carp show the line number in the 2nd example above?
perldoc -f die
------------------------------
Date: Mon, 09 Jul 2007 21:52:33 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: carp "$!" vs carp "$!\n"
Message-Id: <1395bh15s9l6rf2@corp.supernews.com>
In article <1184014565.647526@irys.nyx.net>,
Name withheld by request <anonb6e9@nyx3.nyx.net> wrote:
: Why doesn't carp show the line number in the 2nd example above?
You have to follow the documentation rabbit hole:
1. The Carp(3) manpage notes, "The Carp routines are
useful in your own modules because they act like
die() or warn() . . ."
Fine, but how do they act?
2. The perlfunc(1) manpage's documentation on the
warn operator describes the output as "a message
on STDERR just like 'die' . . ."
Well?
3. In the documentation about the die operator (also
in the perlfunc(1) manpage), we find
die LIST
...
If the last element of LIST does
not end in a newline, the current
script line number and input line
number (if any) are also printed,
and a newline is supplied.
Ah, enlightenment. I hope this helps.
Greg
--
If you make an optimization and don't measure to confirm the performance
increase, all you know for certain is that you've made your code harder
to read.
-- Martin Fowler
------------------------------
Date: Mon, 09 Jul 2007 11:18:53 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Fork Example
Message-Id: <Sr6dnUk_Yb6F4Q_bnZ2dnUVZ_vGinZ2d@comcast.com>
Simon wrote:
> print `ping -n 30 predator`;
Do you know what the difference is between that and
system 'ping -n 30 predator';
? The one with backticks buffers up the output from the command,
and does not print anything at all until the command is completely
finished. The proper function lets you see the command's output
as it happens.
C:\> perldoc -q "using backticks"
-Joe
------------------------------
Date: Mon, 09 Jul 2007 11:16:10 -0700
From: LS <kvjohan@gmail.com>
Subject: google search
Message-Id: <1184004970.236895.280900@k79g2000hse.googlegroups.com>
Please can anyone tell me how do I could make search script to find my
chat.txt and print by date and time?
the txt file look like
date time user comment
2007.07.07 |12:00 pm | johan | the txt bla blabla
thanks
------------------------------
Date: Mon, 09 Jul 2007 19:16:10 -0000
From: usenet@DavidFilmer.com
Subject: Re: google search
Message-Id: <1184008570.586854.73240@d30g2000prg.googlegroups.com>
On Jul 9, 11:16 am, LS <kvjo...@gmail.com> wrote:
> Please can anyone tell me how do I could make search script to find my
> chat.txt and print by date and time?
Please choose a subject line that is descriptive of your question.
Your question has nothing to do with Google.
You may use the File::Find module to find the file itself:
perldoc File::Find
You may use the stat function to extract info about the file's inode
(date/time, user):
perldoc -f stat
You may use the print() function to print the information:
perldoc -f print
You may wish to format your output. You may do that a number of ways,
including:
perldoc -f format
perldoc -f printf
I have no idea what you mean by "comment". A file's inode does not
store a comment. Where do you expect to obtain the comment from?
Please read the posting guidelines for this newsgroup:
http://www.rehabitation.com/clpmisc/clpmisc_guidelines.html
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Mon, 9 Jul 2007 20:20:56 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: How to check a form's field and exit Perl program if it has a value?
Message-Id: <slrnf94v48.nro.hjp-usenet2@zeno.hjp.at>
On 2007-07-08 21:42, Martijn Lievaart <m@rtij.nl.invlalid> wrote:
> On Sat, 07 Jul 2007 18:22:35 -0400, Sherm Pendley wrote:
>>> A week learning VB usually is enough.
>>
>> In fact, a week learning the basics of *any* new language is usually
>> enough. All you really need to have "down cold" is the core syntax, and
>> a high-level roadmap of the language's standard library. You can look up
>> the details when you need them - that's what O'Reilly books are for.
>
><rant>
> Now you've hit one of my sour spots. In C++, a week is NOT enough. Make
> that a year for most people.
That's probably true of any programming language. In a week, you can -
as Sherm wrote - learn the core syntax and a a high-level roadmap of the
language's standard library, if - and only if - you are already a
competent programmer in one or more related programming languages.
That's enough to write some programs, but those programs won't be
pretty. It may also be enough to do some maintenance of existing
programs but that already takes you into dangerous territory as you
modify code you don't understand. To become competent in a programming
language you need much longer.
> Besides, who needs C++ when we've got Perl?
I certainly didn't learn Perl in a week[1], and I considered myself a
pretty competent programmer in 1995. Sometimes I wonder if I will ever
finish learning Perl :-)
hp
[1] I was able to extend a Perl program I inherited from by predecessor
within a few days. But the code was really horrible and I learned a
lot only later (some much later).
PS: See also: http://www.norvig.com/21-days.html
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
------------------------------
Date: Mon, 09 Jul 2007 22:03:19 +0100
From: R Wood <rwood@therandymon.com>
Subject: Mac Addressbook and Mutt Alias
Message-Id: <13958m02ae57qf4@corp.supernews.com>
Greetings -
I have been toying around for awhile with a Perl script that I could use to
periodically parse my Mac Addressbook into a file Mutt can use. It's not
perfect and better hackers than me will be able to make this script more
useable, but I'm releasing it under the GPL so hack away, just send me your
improvements so everyone can benefit.
Find my best effort at http://therandymon.com/content/view/125/79/
I'm cross posting this to comp.lang.perl.misc, since I got some help there.
As always my Woodnotes Guide to the Mutt Email Client, an intro guide for
newbies, is at http://therandymon.com/content/view/42/79/
------------------------------
Date: Mon, 9 Jul 2007 22:40:11 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Outlook Express messages (was: Re: re-lurking)
Message-Id: <f6udk7.1as.1@news.isolution.nl>
Wade Ward schreef:
> OE will never let you take a message out of
> the OE environment. You have to copy and paste it out
> in order to get a free-standing file.
That is a string of silly statements.
You really never tried "File/Save as"?
Further, there are plenty of tools that can convert OE message
files to plain text. For example some Perl modules:
http://search.cpan.org/search?m=module&q=dbx
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Mon, 9 Jul 2007 22:33:34 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: ranting about programming languages (was Re: How to check a form's field and exit Perl program if it has a value?)
Message-Id: <pan.2007.07.09.20.33.53@rtij.nl.invlalid>
On Mon, 09 Jul 2007 20:20:56 +0200, Peter J. Holzer wrote:
>><rant>
>> Now you've hit one of my sour spots. In C++, a week is NOT enough. Make
>> that a year for most people.
>
> That's probably true of any programming language. In a week, you can -
> as Sherm wrote - learn the core syntax and a a high-level roadmap of the
> language's standard library, if - and only if - you are already a
> competent programmer in one or more related programming languages.
> That's enough to write some programs, but those programs won't be
> pretty. It may also be enough to do some maintenance of existing
> programs but that already takes you into dangerous territory as you
> modify code you don't understand. To become competent in a programming
> language you need much longer.
It greatly depends on the language, and that is exactly my point. I
learned php in a few days, and consider myself a competent php
programmer. That is because php has features of languages I already know,
and because it is easy.
Python is already a bit harder, but moderately easy.
C is also not to hard, once you get a good grasp on pointers and memory
management. But even then, the terse syntax is a bit hard to read and
there are plenty of pitfalls.
Perl sometimes has obscure and/or terse syntax. It takes some getting
used to. Perl idioms are sometimes very different from other languages.
So it is more of a write only language than my previous examples. I
consider myself a mildly competent Perl programmer, but even I have to
read many sources a couple of times to understand them.
It took me a lot of time to get to my current level wrt Perl. But I could
be productive from day one, and I could figure out almost every source
that was not to obfuscated (read badly written) from day one.
Contrast this to C++. If you only use it as a better C, there is no
problem, it's probably even easier than C. But as soon as you start using
objects, the fun starts. By now I know the important rules, like make an
object copyable (and respect the big three) or forbid copying (which
either results in a compile or a link error, depending on context). Or
when to use overloading and when not. And what the rules are for name
resolution in the face of overloading (they are simple and intuitive,
yet...). Throw in templates and things get even more complex. Templates
use the definitions as seen at the time the template was defined.
Absolutely logical, unless you're wondering why your prototype isn't
picked up. And as Scott Meyers has shown, it is often better to use a
freestanding function as opposed to a member function. It makes a lot of
sense, but is completely contra intuitive. Now throw in friends, which
you need for overloading operators. Defining them gets all newbies and
when what overload gets used trips up even experienced programmers.
Add on top of that a standard library that has a lot of cruft from when
the language was still evolving and cannot be changed now and you have a
complete mess.
Finally, there are iterators and standard containers. When an iterator
gets invalid is a fine art in itself. So ask yourself, is it a good thing
that C++ programmers get thought iterators on day one? It probably is,
but that just shows the subtlety of the language.
Do you need to know all that? Not for a hello world program. But for any
serious program, any program that gets above the hello world level, you
do need to know that. Even for a simple program, you have got to have a
firm grasp of many, even most, aspects of the language.
Sure, a vector make it easy to use an array. However, suddenly your
objects have to be copyable. So you need to know all rules about copyable
objects. And while it's not exactly hard to understand the basics of when
your iterators into that vector get invalid, exactly which standard
library routines invalidate those iterators? And that same routine may or
may not invalidate your iterators if you switch to a list, or a dequeue.
I still love C++. It's a beautiful language, that gets things done. But
don't think you can pick it up in a week. Or three. You need a solid base
before you can write any serious programs, or modify one at that.
Point in case. I used to be a pretty competent C++ programmer (I probably
still am, I just haven't programmed much C++ lately). On the Interweb
thingy I met many other competent C++ programmers. Just go to comp.std.c+
+ or comp.lang.c++ and there are many, many way better programmers than
me. (Both in knowledge of the language and in programming as a whole, but
I'm focussing on the former). But in real life I met many C++
programmers, but seldom one that I would trust to write a serious
program. And yes, I'm talking about those programmers that write all
those custom made applications your bank puts on your desktop, or your
government uses to produce passports, or that an online merchant uses to
process transactions, or...
C++ is hard, very hard, to get right. I worked in teams of programmers
that really understood the issues and we wrote frameworks that were easy
to use and made us more productive. But more often than not, I had to
clean up the mess. Rewrite all inhouse libraries. Teach other programmers
about the many pitfalls of C++. Even advice managers that given their
current crop of programmers they would be better of choosing another
language.
>> Besides, who needs C++ when we've got Perl?
>
> I certainly didn't learn Perl in a week[1], and I considered myself a
> pretty competent programmer in 1995. Sometimes I wonder if I will ever
> finish learning Perl :-)
Me too. However, believe me, that's nothing compared to the mess an
average[1] C++ programmer can make.
M4
[1] Average, as in the median, common, or whatever it's called in
English. I don;t mean average as in mediocre here!
------------------------------
Date: Mon, 09 Jul 2007 12:29:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: re-lurking
Message-Id: <m2odilr14t.fsf@dot-app.org>
"Wade Ward" <invalid@invalid.nyet> writes:
> "Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
> news:lg4193ls2mc58frpi1e83hohbngdf49qme@4ax.com...
>> On Sat, 07 Jul 2007 17:53:49 -0700, Joe Smith <joe@inwap.com> wrote:
>>
>>> > It's a perl script. I think it's ironic that I can get news with OE
>>> > and other apps, but can't with a computer language that was designed
>>> > to do this.
>>>
>>>Not ironic at all. Read the documentation.
>
> I have been reading. A big fat interesting perl reference
The language reference will only take you so far - What you need to read is
the Net::NNTP module's documentation.
perldoc Net::NNTP
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Mon, 09 Jul 2007 17:00:38 GMT
From: QoS@domain.invalid
Subject: Re: re-lurking
Message-Id: <WQtki.25497$BT3.1351@trnddc06>
Sherm Pendley <spamtrap@dot-app.org> wrote in message-id: <m2odilr14t.fsf@dot-app.org>
>
> "Wade Ward" <invalid@invalid.nyet> writes:
>
> > "Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
> > news:lg4193ls2mc58frpi1e83hohbngdf49qme@4ax.com...
> >> On Sat, 07 Jul 2007 17:53:49 -0700, Joe Smith <joe@inwap.com> wrote:
> >>
> >>> > It's a perl script. I think it's ironic that I can get news with OE
> >>> > and other apps, but can't with a computer language that was designed
> >>> > to do this.
> >>>
> >>>Not ironic at all. Read the documentation.
> >
> > I have been reading. A big fat interesting perl reference
>
> The language reference will only take you so far - What you need to read is
> the Net::NNTP module's documentation.
>
> perldoc Net::NNTP
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net
Feel free to have a look at newssurfer on cpan scripts, this may help
somehow. (the latest version has better commenting)
Another thing.. ive noticed that you are using the 'newnews <since>'
method of gathering headers and will suggest that you use xover as the
many new emerging nntp standard works are leaning towards this method,
that said it is a good idea to fall back to newnews if xover fails.
Good luck to you, writing a newsreader is an interesting task.
------------------------------
Date: Mon, 9 Jul 2007 13:39:49 -0400
From: "Wade Ward" <invalid@invalid.nyet>
Subject: Re: re-lurking
Message-Id: <tu2dnWiw_pV77w_bnZ2dnUVZ_sGqnZ2d@comcast.com>
<QoS@domain.invalid> wrote in message news:WQtki.25497$BT3.1351@trnddc06...
>
> Sherm Pendley <spamtrap@dot-app.org> wrote in message-id:
> <m2odilr14t.fsf@dot-app.org>
>
>>
>> "Wade Ward" <invalid@invalid.nyet> writes:
>> > I have been reading. A big fat interesting perl reference
>>
>> The language reference will only take you so far - What you need to read
>> is
>> the Net::NNTP module's documentation.
>>
>> perldoc Net::NNTP
I'll look at this today.
>> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
>> Cocoa programming in Perl: http://camelbones.sourceforge.net
>
> Feel free to have a look at newssurfer on cpan scripts, this may help
> somehow. (the latest version has better commenting)
I'll look at this too.
> Another thing.. ive noticed that you are using the 'newnews <since>'
> method of gathering headers and will suggest that you use xover as the
> many new emerging nntp standard works are leaning towards this method,
> that said it is a good idea to fall back to newnews if xover fails.
>
> Good luck to you, writing a newsreader is an interesting task.
Writing a newsreader is grandiose for me right now, but definitely the
direction I'm heading. If OE or Thunderbird met my needs minimally, I
wouldn't feel the need. OE will never let you take a message out of the OE
environment. You have to copy and paste it out in order to get a
free-standing file. Thunderbird has a mind of its own.
--
Wade Ward
------------------------------
Date: Mon, 09 Jul 2007 12:35:59 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Remove a specific element from an Array
Message-Id: <m2k5t9r0uo.fsf@dot-app.org>
Sumit <sumit.techie@gmail.com> writes:
>> Have a look at "perldoc -q intersection"
Who said that? Please don't snip attribution - whether it's for blame or
credit, it's nice to know who deserves it. :-)
> sumit: perldoc -q intersection
> No documentation found for "perlfaq1".
> No documentation found for "perlfaq2".
> No documentation found for "perlfaq3".
> No documentation found for "perlfaq4".
> No documentation found for "perlfaq5".
> No documentation found for "perlfaq6".
> No documentation found for "perlfaq7".
> No documentation found for "perlfaq8".
> No documentation found for "perlfaq9".
Are you using Linux? Some Linux distributions put the Perl docs into a
separate package, such as perl-docs or perl-doc.
Mac OS X does that too - you need to install Xcode to get all the PODs.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Mon, 9 Jul 2007 13:31:56 -0400
From: "Wade Ward" <invalid@invalid.nyet>
Subject: Re: retrieving news messages
Message-Id: <cuydnYjjBueQ7A_bnZ2dnUVZ_tWhnZ2d@comcast.com>
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:5pdu839fptjcrc8171utccfbtrmbf4ms12@4ax.com...
> On Fri, 06 Jul 2007 21:03:41 -0400, Sherm Pendley
> <spamtrap@dot-app.org> wrote:
> Given that I actually have cancer... I'M TOUCHING MY NUTS! (I don't
> know how common it is outside of Italy - but it is a common
> "superstition" or better a ritual gesture, against adverse fate.)
Out of curiosity, does the first name Michele make you male or female? A
person can't tell with romance languages. The statement has a different
connotation depending on the gender of the person saying it. Here, to ward
off bad luck, we knock on wood.
--
WW
------------------------------
Date: Mon, 09 Jul 2007 11:10:19 -0700
From: "comp.llang.perl.moderated" <ced@blv-sam-01.ca.boeing.com>
Subject: Re: retrieving news messages
Message-Id: <1184004619.222928.308380@m37g2000prh.googlegroups.com>
On Jul 6, 12:04 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On Fri, 06 Jul 2007 11:18:35 +0200, Gunnar Hjalmarsson
>
> <nore...@gunnar.cc> wrote:
> >> When an object constructor fails, $! pretty much has nothing to do with
> >> what the module is complaining about.
>
> >Well, appropriate or not, but in this case it seems to have helped me
> >detect a problem that noone else has mentioned so far (the braces).
>
> Indeed in another post I also complained about either Net::NNTP's
> constructor not to give appropriate debug into or its docs not to be
> clear enough. OTOH inspecting the the source code of the module I see
> no explicit setting of $! and I don't know if any of the stuff from
> the used modules would do so either. Actually possible failures are:
>
> : return undef
> : unless defined $obj;
>
> and
>
> : unless ($obj->response() == CMD_OK)
> : {
> : $obj->close;
> : return undef;
> : }
>
> OTOH I don't see how setting $! to some particular C library errno
> would be a sane way to show the error. So that you actually detected a
> problem seems to be a fortunate coincidence.
>
The most likely errors are from the initial socket
connection. The inherited IO::Socket::INET and
friends seem to return $@ often by wrapping $!, eg,
$sock = IO::Socket::INET->new(PeerPort => 9999,
... or die "Can't bind : $@\n";
$@ = "connect: $!"; # from IO::Socket
# perl -MNet::NNTP -le 'Net::NNTP->new("non_news.com")
or die $@'
Net::NNTP: connect: Connection refused at -e line 1.
--
Charles DeRykus
------------------------------
Date: Mon, 09 Jul 2007 13:16:32 -0700
From: mailbox@cpacker.org
Subject: Streamlining login to Web site
Message-Id: <1184012192.422551.14860@57g2000hsv.googlegroups.com>
For an existing suite of CGI scripts, I have
a task to improve the site's login access,
and I would like to know if CGI::Auth is
what I need.
Right now, the user must log in to gain
access to the main menu page, which is a
static HTML page. If he then clicks on
certain menu items that require
more privileged access, he will be
presented with the login dialogue again.
I understand how this has been set up by
configuring httpd.conf.
What I would like to do is determine the
user's access level at his initial login
and generate the appropriate main menu
page, thereby removing the need for any
further logins. If CGI::Auth is what I
need for this, are there any good tutorials
on using it, maybe with a really well
spelled-out example?
--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacker.org
------------------------------
Date: Mon, 09 Jul 2007 15:51:14 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Streamlining login to Web site
Message-Id: <46929fc2$0$505$815e3792@news.qwest.net>
mailbox@cpacker.org wrote:
> For an existing suite of CGI scripts, I have
> a task to improve the site's login access,
> and I would like to know if CGI::Auth is
> what I need.
>
> Right now, the user must log in to gain
How is that login handled? HTTP authentication?
A form and CGI?
> access to the main menu page, which is a
> static HTML page. If he then clicks on
> certain menu items that require
> more privileged access, he will be
> presented with the login dialogue again.
> I understand how this has been set up by
> configuring httpd.conf.
If it's configured properly and if the user is authorized
to get documents from that directory/URL, then that
shouldn't happen.
If you want to stick with HTTP authentication,
then read a few documents about it and using groups.
>
> What I would like to do is determine the
> user's access level at his initial login
> and generate the appropriate main menu
> page, thereby removing the need for any
> further logins. If CGI::Auth is what I
> need for this, are there any good tutorials
> on using it, maybe with a really well
> spelled-out example?
Sounds like you're after a more dynamic page approach where
the static HTML would be generated, some how, based on
something about the user name. It could be
via a CGI, HTML::Mason (www.masonhq.com), or possibly
PHP (php.net) might be a solution. You may use
CGI:Auth to help manage authentication, or do it
yourself, either way you'll have to learn about
generating HTML dynamically and come up with how
to apply the logic.
------------------------------
Date: Mon, 09 Jul 2007 17:14:34 -0000
From: benhollister <benhollister@gmail.com>
Subject: Re: Win32::OLE, Microsoft Word
Message-Id: <1184001274.176261.256640@22g2000hsm.googlegroups.com>
On Jul 6, 2:07 pm, benhollister <benhollis...@gmail.com> wrote:
> Hey all,
> I've got a fairly large Word document with a whole bunch of anchors in
> it. I'm trying to write a PERL script that will utilize the MSWord
> Selection->Find command with regex enabled to find all of these
> anchors, and dump them to a text file. I've got everything up and
> running, and it's iterating through the entire document and catching
> everyone (I know this because I did a find and replace as a test), but
> I can't seem to dump whatever I select (highlight) to a var or list.
> Do any of you know the method that will return what I have
> highlighted? Ideally it would be like:
> my $anchor = $word->someHiddenMethod->text()
> or something like that.
>
> Thanks,
> - Ben Kershner
I finally figured it out. The key was the use of the valof command in
the Win32::OLE module. When I searched using:
my $search = $word->Selection->Find;
$search->Execute();
I could grab the contents with:
print Win32::OLE::valof($word->Selection->Range->Text),"\n";
------------------------------
Date: 09 Jul 2007 15:27:08 GMT
From: xhoster@gmail.com
Subject: Re: XML SAX Parser for PERL
Message-Id: <20070709112709.980$Eg@newsreader.com>
ranjeeth <mnranjeeth@gmail.com> wrote:
> Hi guys,
> I am currently developing an application that needs to process XML
> docs.
> Can you recomend me some XML SAX parsers for this purpose?
> Thanks,
> Ranjeeth
How about XML::SAX ?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Mon, 9 Jul 2007 12:30:47 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: XML SAX Parser for PERL
Message-Id: <80fam4x93e.ln2@goaway.wombat.san-francisco.ca.us>
On 2007-07-09, ranjeeth <mnranjeeth@gmail.com> wrote:
> I am currently developing an application that needs to process XML
> docs.
> Can you recomend me some XML SAX parsers for this purpose?
This sounds like a SAQ: look for the XML::SAX libraries in CPAN.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 637
**************************************