[17891] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 51 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 12 18:07:00 2001

Date: Fri, 12 Jan 2001 15:05:15 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <979340714-v10-i51@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 12 Jan 2001     Volume: 10 Number: 51

Today's topics:
    Re: Ada feature borrowed for Perl?? <iltzu@sci.invalid>
    Re: Apply XPath expression to XML::DOM <bjoern@hoehrmann.de>
    Re: Archive::Zip - any user comments? (BUCK NAKED1)
        CFP: Yet Another Perl Conference 2001 (Rich Lafferty)
        Compare floats <dbohl@sgi.com>
    Re: Compare floats (Tad McClellan)
        Example Perl script (+HTML+Javascript) for Linux Apache <r.mccready@nextcall.net>
        File open problem <kai_jang@my-deja.com>
        Info-Zip Extraction Options (BUCK NAKED1)
    Re: Jobs: Senior Software Engineer <mischief@velma.motion.net>
    Re: left op of && and || only in scalar context ? <stephen@twocats.dont-spam.demon.co.uk>
    Re: left op of && and || only in scalar context ? <bart.lateur@skynet.be>
    Re: Murex Applications (Cameron Laird)
        Need documentation on NET:POP3 <don@lclcan.com>
    Re: Need documentation on NET:POP3 (Richard J. Rauenzahn)
        NO! [was: Re: can I chdir(DIRHANDLE)?] (LMC)
    Re: Perl crashes on exit <mischief@velma.motion.net>
        Perl script <brentd@cicada-semi.com>
    Re: Perl script nobull@mail.com
    Re: Perl script <comdog@panix.com>
    Re: Perl script <brentd@cicada-semi.com>
    Re: Putting text in an image? <ksm+usenet@universal.dca.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 12 Jan 2001 23:04:21 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Ada feature borrowed for Perl??
Message-Id: <979339185.16527@itz.pp.sci.fi>

In article <3a5f5142.51f6$200@news.op.net>, Mark Jason Dominus wrote:
>In article <979318857.3741@itz.pp.sci.fi>,
>Ilmari Karonen  <usenet11334@itz.pp.sci.fi> wrote:
>>  push(@ERRORS, "You omitted your age!"), last
>>      if param('age') eq "";
>>  push(@ERRORS, "Your age should be a number!"), last
>>      if param('age') =~ /\D/;
>
>Very interesting.  I would have considered that 'spaghetti code', and
>I would have been embarrassed to write it.  (That is not intended as a
>criticism of any kind.)

Now *that's* funny..  I can see how, it *is* repetitive, but then so
is the original too..  And there isn't really much common code in the
statements to factor out, which is IMHO a key criteria for spaghetti.

It may be just that your aesthetic sense is offended by the ", last",
while mine is more offended by the elsif and the one-statement blocks.

(Shouldn't it have been ", next"?  Depends on context, really..)

Of course, I guess I might've written it like:

  barf "You omitted your age!"         if param('age') eq "";
  barf "Your age should be a number!"  if param('age') =~ /\D/;

 ..and surrounded the whole thing in an eval {} to catch the exception
thrown in the subroutine 'barf'.  Or something.


>I was wondering if you were going to say that.  Of course, ?:?: is
>just an abbreviated form of if-elsif.

Yes.  For some reason I like it.  It's.. less noisy, for one thing.
And it lets me factor common statement parts out of the conditional,
something even statement modifiers can't do.


>Here you changed the semantics, because you will now accept
>"------------------" as a title; in this program that behavior is
>incorrect.

Oops.  Silly me.  Though it's not really obvious which behaviour is
more desirable in reality -- yours would print an empty chapter with
no title.  That's probably why I missed it in the first place.


>I think the difference in our styles might be summarized: I like 
>"a if c" and "next if c"; I dislike "a,b if c" and "a, next if c".

I really dislike ", next" too, but I prefer it over the alternatives.
Actually, if I know the preceding expression, like push(), will always
be true, I'll frequently write "and next" instead.

A keyword like "then" as a low-precedence scalar comma would be nice.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"Ahh, 'interacts'... don't you just love carefully neutral terms like that
 to describe catastrophic orbital evolution?"   -- Brian Davis in r.a.sf.s



------------------------------

Date: Sat, 13 Jan 2001 00:01:53 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: Apply XPath expression to XML::DOM
Message-Id: <3a7c791a.24982913@news.bjoern.hoehrmann.de>

* Eric Bohlman wrote in comp.lang.perl.misc:
>> I've got XML::DOM::Document or XML::DOM::Node object and i want to use
>> XPath to get some nodes of this node-set. There is XML::XPath on CPAN,
>> but it doesn't seem to support this. Is this correct? If yes, why and
>> what can I do to reach my goal?
>
>XML::XPath uses its own object model for XML nodes rather than DOM.  

Due to what limitation of XML::DOM? Because it has no support for xml
namespaces? If so, will this change? Is there any work on a Perl
implementation of the DOM Level 2?

>XML::XQL, which implements an older language that's basically a subset of
>XPath, does work on DOM nodes; if you don't need to use arbitrary XPath
>expressions coming from outside your program, it might do the job.

I'd like to avoid the use of XQL.
-- 
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
<x>&#73; &#x2665; &#x2640;, &#x266B; &#x26; &#88;&#77;&#76; &#x263A;</x>


------------------------------

Date: Fri, 12 Jan 2001 13:31:07 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: Archive::Zip - any user comments?
Message-Id: <6172-3A5F5B7B-7@storefull-248.iap.bryant.webtv.net>

I've had no problems using Archive/Zip for decompression. . . though now
I use the easier info-zip library method with a command like `unzip -od
$file`

HTH,
--Dennis



------------------------------

Date: 12 Jan 2001 19:11:38 GMT
From: rich@bofh.concordia.ca (Rich Lafferty)
Subject: CFP: Yet Another Perl Conference 2001
Message-Id: <slrn95ulna.6dr.rich@bofh.concordia.ca>
Keywords: YAPC, Yet Another Perl Conference, Perl, Perl Mongers, McGill University, Montreal, Quebec, Canada, YAS, Yet Another Society

[Une version française suit / A French version follows.]

*** Third North American YAPC: First Call for Participation ***

                    Yet Another Society
              calls for your participation in

                         YAPC 2001
                 the Third North American 
               Yet Another Perl Conference

                 http://yapc.org/America/

                     McGill University,
                      Montreal, Quebec 

                  Wednesday through Friday 
                      June 13-15, 2001

YAPC is a place for people to meet and talk about Perl -- where
people who've done interesting things, people who are working
on the language itself, people who are using it daily,
and people who are looking to learn about it are all within
arm's reach.  Some of the great authors and coders in the field
will be on hand to discuss their work, as well as the nature
and direction of Perl itself.

Please join us for three days of listening and talking about 
Perl in Montreal.  

** Conference registration will be available by Feb. 1, 2001 at 

           http://na-register.yapc.org/

   Dorm rooms will be available at the University (rates TBA); the dorm
   request information will be on the website and registration
   form. 

           Registration Cost: CAD$125 (about USD$85)

** We are looking for sponsors. Please contact Kevin Lenzo 
   (lenzo@yapc.org) for information about how you can help 
   support the Yet Another society and YAPC.  Much of the 
   necessary funding for YAPC comes from the generous donations 
   of our sponsors.

** Submitted papers:             Submission Deadline: May 1, 2001

   All topics are welcome.  Here is a short list of subjects that 
   might be presented: 

     XML, CGI/Web, Interprocess Communication, GUIs (GTk, Tk), 
     Natural Language Processing, Interactive Perl,  Agents,
     Perl as Glue, Object-Oriented Perl, Scientific Applications,
     Guts, Internals, JAPHs, Perl Poetry, System Administration,
     DBI/DBD, Non-UNIX Perl, Security, Peer-to-Peer Communication,
     Your Favourite Topic.

   Please submit your abstracts to <na-author@yapc.org>. Authors 
   are requested to limit their abstracts to one or two paragraphs
   for Lightning Talks, and to 300 words for other talks.

   This year we will accept a number of types of talks:

     * Lightning:  5 minutes

       The lightning talks were instigated by Mark-Jason Dominus
       last year in Pittsburgh, and were replicated with great 
       success at the European YAPC in London.

       Participants speak for no more than five minutes, with the use
       of conventional transparencies.  Any use of data projector,
       etc, is discouraged, but allowed as long as the five minute
       time limit is maintained (set-up will be done as the clock
       ticks). The talk ends at the five-minute mark, regardless of
       whether or not the speaker has finished.

       Any topic is allowed, and some have been fantastically 
       humourous.  Lightning talks are an excellent forum for 
       first-time speakers.

     * Standard:      20 minutes

       A 'standard' talk is the preferred format.  This is enough 
       time to start a topic, introduce it with some pithy slides, 
       and open up to later conversation. 

     * Long and Extra-Long:   45 minutes, 90 minutes

       Long talks are reserved for experienced speakers covering
       large topics.  If you have an in-depth topic you would like
       to present in some detail, perhaps with considerable 
       discussion, a Long or Extra-Long talk may be the format of 
       choice.

     * Tutorial:   3 hours + break (possibly in two sets)

       Half-day (or possibly full-day) tutorials.

   ** Please submit your abstracts to <na-author@yapc.org>! **

Thank you; we hope you will participate. If you have any questions,
please mail <na-help@yapc.org>.

---

Yet Another Society is a non-profit organization for the 
advancement of collaborative efforts in computer and information 
sciences. YAS promotes symposia, teaching, and group projects.  
See http://yetanother.org for more information.

*** Third North American YAPC: First Call for Participation ***

---------------------------------------------------------------------------

                                 ***
  Troisième YAPC Amérique du Nord: Premier appel à la participation
                                 ***

                         Yet Another Society
                      vous invite à participer à

                              YAPC 2001
                             La troisième
                     Yet Another Perl Conference
                         en Amérique du Nord

                       http://yapc.org/America/

                          Université McGill,
                           Montréal, Québec

                       Du mercredi au vendredi
                         13 au 15 juin, 2001

YAPC est un endroit où se rencontrer et parler de Perl; où sont réunis
des gens qui ont fait des choses intéressantes, qui travaillent sur le
langage lui-même, qui utilisent ce langage tous les jours et qui
veulent en apprendre plus.  Quelques uns des meilleurs auteurs et
codeurs dans le domaine seront présents pour discuter de leur travail,
ainsi que de la nature et de l'avenir du langage Perl lui-même.

Joignez-vous donc à nous à Montréal pendant trois jours pour parler et
entendre parler de Perl.

** Inscrivez-vous à la conférence dès le 1er février:

                     http://na-register.yapc.org/

   Des résidences étudiantes pour les participants seront disponibles
   sur le campus de l'université (les tarifs seront annoncés plus
   tard); le formulaire d'inscription donnera toutes les informations
   nécessaires à ce sujet.

    Frais d'inscription à la conférence: 125$CDN (environ 85$US).

** Nous sommes à la recherche de commanditaires. Veuillez contacter
   Kevin Lenzo (lenzo@yapc.org) pour savoir comment vous pouvez
   encourager la Yet Another Society et YAPC.  Une grande partie des
   fonds nécessaires à YAPC proviennent en effet des généreuses
   contributions de nos commanditaires.

** Date de tombée pour la soumission des communications: 1er mai 2001

   Tous les sujets sont bienvenus.  Voici une liste non-exhaustive de
   sujets possibles:

     XML, CGI/web, communication inter-processus, GUIs (Gtk, Tk),
     traitement du langage naturel, Perl interactif, agents, Perl
     comme langage-"colle", Perl orienté-objet, applications
     scientifiques, entrailles, JAPHs, poésie Perl, administration de
     systèmes, DBI/DBD, Perl non-Unix, sécurité, communication
     'peer-to-peer', ...
     
   Veuillez soumettre les résumés de vos communiations à
   <na-author@yapc.org>. Les auteurs sont priés de limiter leurs
   résumés à un ou deux paragraphes pour les communications éclair, et
   à 300 mots pour les autres communications.

   Cette année, nous acceptons plusieurs sortes de communications:

     * Communications éclair: 5 minutes

       Les communications éclair ont été introduites l'été dernier à
       Pittsburgh par Mark-Jason Dominus et ont été reprises avec
       beaucoup de succès au YAPC européen à Londres.

       Les participants disposent d'un maximum de cinq minutes pour
       présenter leur communication, habituellement à l'aide d'un
       rétroprojecteur.  Tout autre mécanisme de présentation est
       déconseillé, mais permis dans la mesure où la limite de temps
       est respectée (l'installation se fait pendant que le temps
       s'écoule). La communication se termine au bout de cinq minutes,
       que le présentateur ait terminé ou non.

       Tout sujet est accepté, ce qui a donné lieu dans le passé à
       quelques communications hautement humoristiques.  Les
       communications éclair constituent un excellent forum pour des
       gens qui en sont à leurs premières présentations.

     * Standard: 20 minutes

       La communication standard constitue le format préféré. Il y a
       suffisamment de temps pour introduire le sujet, présenter
       quelques transparents bien choisis et permettre la discussion.

     * Longue et extra-longue: 45 minutes, 90 minutes

       Ces communications sont réservées aux présentateurs
       expérimentés et elles couvrent des sujets plus vastes.  Si vous
       désirez présenter un sujet et le discuter en détail, ce format
       pourrait s'avérer le plus approprié.

     * Tutoriel: 3 heures + une pause

       Tutoriels d'une demi-journée et possiblement d'une journée
       complète.

   ** Veuillez soumettre vos résumés à <na-author@yapc.org> **

Nous vous remercions et nous espérons que vous participerez en grand
nombre.  Si vous avez des questions, communiquez avec
<na-help@yapc.org>.

---

Yet Another Society est une société à but non-lucratif vouée à
l'avancement d'efforts colaboratifs en informatique et en sciences de
l'information.  YAS promouvoit des symposiums, de l'enseignement et
des projets de groupe.  Pour plus d'informations, voir
http://yetanother.org/.

                                 ***
  Troisième YAPC Amérique du Nord: Premier appel à la participation
                                 ***


------------------------------

Date: Fri, 12 Jan 2001 15:43:03 -0600
From: Dale Bohl <dbohl@sgi.com>
Subject: Compare floats
Message-Id: <3A5F7A67.7292801@sgi.com>


   I've look around and through FAQs but no luck.

How does one compare 2 floatinf point numbers in 
perl to see which is greater?

-- 

Thanks,
Dale


------------------------------

Date: Fri, 12 Jan 2001 15:13:34 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Compare floats
Message-Id: <slrn95upbe.2bt.tadmc@tadmc26.august.net>

Dale Bohl <dbohl@sgi.com> wrote:
>
>   I've look around and through FAQs but no luck.


Thanks. We appreciate that.

The next step is to get you to not ignore the other 95% of Perl's
standard docs  :-)


>How does one compare 2 floatinf point numbers in 
>perl to see which is greater?


Perl's operators are documented in

   perldoc perlop

See the "Relational Operators" section.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Fri, 12 Jan 2001 20:25:47 -0000
From: "r.mccready" <r.mccready@nextcall.net>
Subject: Example Perl script (+HTML+Javascript) for Linux Apache Web server and Postgresql? Requested?
Message-Id: <3a5f680e_1@news1.vip.uk.com>

Apologies if this is obvious or in the wrong place, but I can't get the
querying database part of the following to work.

I have Linux Red Hat 6.1, Apache Web server and Postgresql.
Can anyone point me to an example Perl script (+HTML+Javascript) that shows
this combination being used to present a web page.
A simple query would be best to show the connection scripts etc.




------------------------------

Date: Fri, 12 Jan 2001 21:39:35 GMT
From: Kai Jang <kai_jang@my-deja.com>
Subject: File open problem
Message-Id: <93ntim$508$1@nnrp1.deja.com>

Hey guys.  Im hoping someone here can help me out. I've written a
program that navigates a directory structre and renames all files and
directories.  The problem I am having is with the second part of the
program.  I want it to open the files and serch through them and rename
any links to reflect the changes.  I tried a global subistitution using
a regular expression, but to no avail.  Maybe I am going about it
wrong.  How would you guys aproach this problem?  Any advice is
appreacated...


Sent via Deja.com
http://www.deja.com/


------------------------------

Date: Fri, 12 Jan 2001 13:55:46 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Info-Zip Extraction Options
Message-Id: <24382-3A5F6142-46@storefull-244.iap.bryant.webtv.net>


I'm using `gtar -xvzf $file` to extract a tarfile on FreeBSD.

1. Is there a way to get Info-Zip to make a list of files without the
first directory name? For example, say it extracts to "Alias-1.9" with
all the extracted files inside of the Alias-1.9 folder. Can I extract
all of the files without the 'first' directory name of "Alias-1.9"?
(Note: any subsequent directories I want to keep)

2. Similarly, is there a way to get gtar to give a list of file names
without having to splice, pop, or join? I tried -t --list, etc. (I'm
trying to get a list of the extracted files to use for uploading.)

I've studied man tar and tar --help and can't figure out how to do the
above from those docs.

Thanks,
Dennis



------------------------------

Date: Fri, 12 Jan 2001 22:43:46 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Jobs: Senior Software Engineer
Message-Id: <t5v252lg6is6fe@corp.supernews.com>

Eli the Bearded <elijah@workspot.net> wrote:
> In comp.lang.perl.misc, Chris Stith  <mischief@velma.motion.net> wrote:
>> If I were a recruiter wanting to make use of this newsgroup, I'd

[snip]

> That is *way* to much work for a pimp^H^H^H^Hrecruiter. I read this
> group in bits regularlly (most topics not selected by my 'killfiles'
> don't get read, so maybe I see 5-10% of the traffic here) and I'd
> find that a lot of work.

True, scanning the group could be a lot of work for one person.
But it's better that they do a lot of work to find someone than to
make all of us do a little bit of work to chastise them and explain
why.

>> I'd then check to see if any of those people have actual resumes or
>> curricula vitae on the net, such as at the web pages listed on

[snip]

> That's also a lot of work, unless the .sig explicitly mentions
> that there is a CV there to read.

If I were explicitly available, I would mention it in my .sig for
all to read. I'm not explicitly available right now, but for the
right money I could entertain offers. :)

>> I know that myself, personally, don't have a resume on the
>> net today, but I do from time to time. Some people here might not
>> even mind being emailed job offers directly to them, although I'm
>> sure some would.

> I would mind. (I was flattered when I first got them, back in
> 1995 or 1996, now it is just spam.)

[snip]

I'm sure many people would mind unsolicited job offers. I don't
when I mention availability in my .sig, as I have before. I do
get upset when someone sends unsolicited job offers to my office
email where my boss might see it over my shoulder. :)

> If I saw someone here posting a CV and knew that they had some
> skill from their posts, I'd  certainly look at it. I'm not hiring
> anyone and I am not a recruiter, but my company does have positions
> open and that filling some of them (at least) means an easier day
> for me.

Amen. Filling positions here would be a blessing too. 

> I know brian d foy mentions that he is 'for hire' in his .sig, but
> I also know that he would not fit any positions here.

Randal Schwartz lists himself as a consultant, as does Tad McClellan,
but I doubt we could afford their services as consultants and
I'm sure we couldn't afford to hire them full-time. Besides, if Randal
worked here he'd be bored and I'd be bored doing nothing but
administering servers. The same would probably be true of Tad or
Anno or many of the other posters here.

> (Partially due to his location, partially because he is a bit
> too web oriented.) I don't see others representing themselves
> as available.

Almost everyone is potentially available for the right work conditions
and the right pay. Location isn't a factor for companies that have
embraced the idea of shifting bits from home. Whether or not they
would welcome a job offer at random is another story. The Perl jobs
mailing list, the job search sites, and the jobs NGs are still the
place to deal with this sort of thing, I agree. It's just that many
recruiters will give the excuse that they post here because this is
where the experts are and this is where they can better get a feel
for who has what level of expertise, so I thought I'd mention how
I would use the information found here from their point of view if
I were actually wanting to justify using this group for recruiting.


> has always seen 'location' as a big obstacle for Usenet job postings

This isn't necessarily true, although it often would be the case.
I know most companies want someone at least close enough for an
occaisional meeting at the company site even if they work from
home most of the time, and rightfully so. The Open Source projects
that have proven that collaboration over distance is feasible may
start to change some of these perceptions and requirements.

Anyway, this non-technical thread is becomeing one of the longer
ones in the newsgroup. :( I'll go ahead and end this post now,
because I don't take pride in posting one of the longest posts
in a thread of this nature, although I'm sure people have noticed
before I can be rather voluminous in my responses.

Chris

-- 
Christopher E. Stith

"Get real!  This is a discussion group, not a helpdesk.  You post
 something, we discuss its implications.  If the discussion happens to
 answer a question you've asked, that's incidental." -- nobull in clpm



------------------------------

Date: Fri, 12 Jan 2001 20:19:19 -0000
From: "Stephen Collyer" <stephen@twocats.dont-spam.demon.co.uk>
Subject: Re: left op of && and || only in scalar context ?
Message-Id: <979331252.9849.0.nnrp-09.9e98901a@news.demon.co.uk>


<nobull@mail.com> wrote in message news:u9d7dsiql8.fsf@wcl-l.bham.ac.uk...

> > Maybe there's a problem with having to reevaluate the same
> > expression in two different contexts ?
>
> Yes - expressions can have side effects.  Consider:
>
> @a = foo() || bar();
>
> I think having foo() called twice would be a considered a bug and not
> a feature.  (Even if it were documented!).

Yeah, good point.

>
> The alternative would be to have EXPR2 evaluated in a
> scalar context.
> I must admit this is what my intuition would have said.

Mine too - I suspect this is a slightly dusty corner of Perl whose
implementation wasn't considered too carefully, and the context
in which the expressions were evaluated just fell out from some
natural implementation of the operator.

> But it's not
> the way it is, and the way it is is the way it's documented so I'm not
> gonna loose any sleep over this one.

I'm not either, but I'm documenting it for a course, and I'd
like to have a decent explanation - for now, your piece of
code will do in the unlikely event that any asks about it.

Steve Collyer.




------------------------------

Date: Fri, 12 Jan 2001 21:17:17 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: left op of && and || only in scalar context ?
Message-Id: <umsu5t4540so705lbgub7t8fseiffrekib@4ax.com>

Stephen Collyer wrote:

>> The alternative would be to have EXPR2 evaluated in a
>> scalar context.
>> I must admit this is what my intuition would have said.
>
>Mine too - I suspect this is a slightly dusty corner of Perl whose
>implementation wasn't considered too carefully, and the context
>in which the expressions were evaluated just fell out from some
>natural implementation of the operator.
>
>> But it's not
>> the way it is, and the way it is is the way it's documented so I'm not
>> gonna loose any sleep over this one.
>
>I'm not either, but I'm documenting it for a course, and I'd
>like to have a decent explanation - for now, your piece of
>code will do in the unlikely event that any asks about it.

I agree with the intuition of both of you. So why does Perl do it in
another way? Well: most likely, because that offers the most
flexibility. You can FORCE evaluation of the right hand side of the '||'
expression into scalar context. So nothing's lost here. But, if it
always would have been evaluated in scalar context, there's no way you
could have gotten the result of evaluation in list context back.

So, passing the context of the outside of the expression to the right
hand side of the offers you the most possibilities, including all of
those the "intuitive behaviour" would have offered us (Just say "scalar"
;-). So that's what Perl does. Well, I think that's why.

-- 
	Bart.


------------------------------

Date: 12 Jan 2001 14:36:25 -0600
From: claird@starbase.neosoft.com (Cameron Laird)
Subject: Re: Murex Applications
Message-Id: <67E6A3405585A733.4531008C9ADBFF33.2B531E9EE594C8A7@lp.airnews.net>

In article <slrn95tsro.2q0.bernard.el-hagin@gdndev25.lido-tech>,
Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote:
>On Fri, 12 Jan 2001 11:44:30 -0000, Rob Parkes <robert.parkes@dpp.co.uk>
>wrote:
>>Does anybody know what Murex is? I think its a banking application used by
>>german investment banks? any idea's?
>
>By what twisted logic did you come to the conclusion that this was the
>place to ask?
			.
			.
			.
You really don't see?  Murex is a large proprietary
analytic product owned by a company headquartered in
Guelph, Ontario; it manages portfolio financial risk,
particularly with synthetic derivatives.  Computer folks
with Murex experience are alleged to be easy to place.
Perl is ... well, that you already know.  Pretty obvious
now, eh?
-- 

Cameron Laird <claird@NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html


------------------------------

Date: Fri, 12 Jan 2001 16:32:14 -0500
From: Don <don@lclcan.com>
Subject: Need documentation on NET:POP3
Message-Id: <3A5F77DE.4764033B@lclcan.com>

Hi,

Still a perl novice but learning...

I'm trying to use the Net:POP3 module to interact with my POP3 mail
server.  I've managed to make the connection by issuing the following
code:

my $webfile = Net::POP3->new('localhost', Port => 110, Timeout => 60)
   or die "Cannot open mail server $!";

Now, I'd like to retrieve the number of messages so I tried the
following:

my $nummsgs = $webfile.login('my_user', 'my_password')
   or die "Error retrieving number of messages $!";

I get the error: Undefined subroutine &main::login called at lclmail.pl
line 11.

What I really need is some documentation on how to use the module as the
author has provided no examples of how to use the methods besides the
constructor.



------------------------------

Date: 12 Jan 2001 22:09:06 GMT
From: nospam@hairball.cup.hp.com (Richard J. Rauenzahn)
Subject: Re: Need documentation on NET:POP3
Message-Id: <979337345.849228@hpvablab.cup.hp.com>

Don <don@lclcan.com> writes:
>
>my $webfile = Net::POP3->new('localhost', Port => 110, Timeout => 60)
>   or die "Cannot open mail server $!";
>
>Now, I'd like to retrieve the number of messages so I tried the
>following:
>
>my $nummsgs = $webfile.login('my_user', 'my_password')
>   or die "Error retrieving number of messages $!";
>
>I get the error: Undefined subroutine &main::login called at lclmail.pl
>line 11.

Try  $webfile->login('my_user', 'my_password')

>What I really need is some documentation on how to use the module as the
>author has provided no examples of how to use the methods besides the
>constructor.

That is because those instructions would not be specific to that module.

Your confusion is in how to call methods off of an object.  You may find
the results of the following code surprising...

my $a = "hello, world!";
print $a.localtime(time);

The perltoot and perlobj manpages talk about objects in Perl, but are
pretty detailed and seem to be intended for object programmers.

Rich
-- 
Rich Rauenzahn ----------+xrrauenza@cup.hp.comx+ Hewlett-Packard Company
Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave. 
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014


------------------------------

Date: Fri, 12 Jan 2001 15:22:43 -0500
From: "Antoine Beaupre (LMC)" <lmcabea@lmc.ericsson.se>
Subject: NO! [was: Re: can I chdir(DIRHANDLE)?]
Message-Id: <3A5F6793.7750D6EA@lmc.ericsson.se>

Wow, that's odd... I really remember having read this somewhere. Too
[much|less] coffee. :)

And by the way, I'm still out of it when I say:

chdir(<FROM>); # evil!

This is not working. In fact, it brings me back to my home dir.

Oh well..

A.

--
La sémantique est la gravité de l'abstraction.


------------------------------

Date: Fri, 12 Jan 2001 21:24:35 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Perl crashes on exit
Message-Id: <t5utgj6uj7dj82@corp.supernews.com>

Alan Pettigrew <alan@nospam.com> wrote:
> Further investigation seems to point to the basename function.

> If I use:
>    my @suff = ('.xml','.csv','.ini');
>    $work = basename($file, @suff);
> then the program crashes on exit.
> If instead I use:
>    $work = basename($file, '.xml');
>    $work = basename($work, '.csv');
>    $work = basename($work, '.ini');
> then there is no crash.

What is the syntax internal to the suffixlist? Must the values
there be separated by commas? Must it be a scalar? Perhaps
maybe it could be a scalar with mulitple values, separated by
spaces?

I'm not familiar with the tools you are using, but these could
be issues leading to your crash if they are important to the
package.

> Is the syntax of the basename wrong, or is there some bug?
> The book says basename (fullname [, suffixlist]).

Please say the book gives a description of what should be in
suffixlist. It could be that it needs to be a "list" of values,
but not given in Perl's list context (for example, a scalar, a
comma-separated list of multiple scalars, or a scalar containing
comma-separated values).

See if any of these work for basename:

    $work = basename($file, '.xml', '.csv', '.ini');

    my @suff = ('.xml', '.csv', '.ini');
    $work = basename($file, join(',', @suff) );

    my $suffixes = ('.xml', '.csv', '.ini');
    $work = basename($file, $suffixes);

> Is this merely moving where fields occur in memory, and masking the 
> crash, or can I assume this is a workaround?

I have very rarely found a case in which Perl had a problem with
memory alignment causing a crash or saving me from one. As a matter
of fact, I'm not sure I've ever found a problem caused by this that
didn't already have severe errors in my code. When I say severe, I
mean really hideous things that only get done in the dawning hours
after all the coffee is gone. Perl, being handled by a system
somewhere between pure interpretation and pure compilation but not
quite "jit", protects you from a lot of the intricacies of memory
problems. A high-level language should. (If you consider C high-level,
then you should realize that I make the previous statement considering
C to be mid-level. I don't think anythign breaks cleanly into two
parts, especially high-level vs. low-level languages.)


I'm not sure what you are doing is a workaround. It may be simply
more correct for the tools you are using. It may be a working
workaround that is no more technically correct. It may not even
be a complete workaround, as under stress or in production many
"workarounds" fail to work around things. My bet is, though, that
you've found one of possibly many ways to not just alleviate your
problem, but to eradicate it. There may be other ways which work
as well, but maybe not. I wish I knew more about your particular
dilemma so I could offer advice that is more helpful.

Chris

-- 
Christopher E. Stith

Try not. Do, or do not. The Force is binary. -- Yoda,
The Empire Strikes Back (paraphrased)



------------------------------

Date: Fri, 12 Jan 2001 13:31:38 -0600
From: Brent Dinicola <brentd@cicada-semi.com>
Subject: Perl script
Message-Id: <3A5F5B9A.D92BE396@cicada-semi.com>

Has anyone out there written a script that will check for something in a
log
say.. in the same hour the script is being run and if it finds it..
email someone?



------------------------------

Date: 12 Jan 2001 19:36:21 +0000
From: nobull@mail.com
Subject: Re: Perl script
Message-Id: <u9y9wgh8ap.fsf@wcl-l.bham.ac.uk>

Brent Dinicola <brentd@cicada-semi.com> writes:

> Subject: Perl script

Agghhhh!!!!!!!!!!!!!!!!!!!!

> Has anyone out there written a script that will check for something
> in a log say.. in the same hour the script is being run and if it
> finds it..  email someone?

Yes, I'd expect most system admins have written things like this.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: Fri, 12 Jan 2001 14:49:51 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Perl script
Message-Id: <comdog-CE38E8.14495112012001@news.panix.com>

In article <3A5F5B9A.D92BE396@cicada-semi.com>, Brent Dinicola 
<brentd@cicada-semi.com> wrote:

> Has anyone out there written a script that will check for something in a
> log
> say.. in the same hour the script is being run and if it finds it..
> email someone?

i've made several such scripts.  is there another question?

-- 
brian d foy <comdog@panix.com>
no longer for hire ;)


------------------------------

Date: Fri, 12 Jan 2001 14:00:06 -0600
From: Brent Dinicola <brentd@cicada-semi.com>
Subject: Re: Perl script
Message-Id: <3A5F6246.D2887961@cicada-semi.com>

brian d foy wrote:

> In article <3A5F5B9A.D92BE396@cicada-semi.com>, Brent Dinicola
> <brentd@cicada-semi.com> wrote:
>
> > Has anyone out there written a script that will check for something in a
> > log
> > say.. in the same hour the script is being run and if it finds it..
> > email someone?
>
> i've made several such scripts.  is there another question?
>
> --
> brian d foy <comdog@panix.com>
> no longer for hire ;)

Ok.. So I didn't specifically ask..

PS. and if so.. would anyone mind showing it to me.. or emailing?



------------------------------

Date: Fri, 12 Jan 2001 14:13:41 -0500
From: Ken MacFarlane <ksm+usenet@universal.dca.net>
Subject: Re: Putting text in an image?
Message-Id: <Pine.BSI.4.21.0101121413210.23513-100000@universal.dca.net>

On Fri, 12 Jan 2001, Eric wrote:
> Is there a perl module to help with placing text on an image?  For example,
> I am writing a program to generate a histogram of an image (thus creating a
> tiff), and I would like to be able to put numbers on the x axis scale.  Must
> I draw the numbers pixel by pixel, or is there a simpler way?

Image::Magick should be able to do this.

-- 
                                                     Ken MacFarlane
                                      <ksm+usenet@universal.dca.net>
                                         http://members.dca.net/ksm/ 



------------------------------

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 V10 Issue 51
*************************************


home help back first fref pref prev next nref lref last post