[24322] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6513 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 4 06:05:47 2004

Date: Tue, 4 May 2004 03:05:10 -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           Tue, 4 May 2004     Volume: 10 Number: 6513

Today's topics:
    Re: Books online???? (Anno Siegel)
    Re: complile a program with 2 files <mark.clements@kcl.ac.uk>
    Re: execute every 15 min <Joe.Smith@inwap.com>
    Re: Finding all open filehandles and closing them befor (Anno Siegel)
    Re: Finding file size over network (Cosmic Cruizer)
        How do I get MIME skeleton? <admin@asarian-host.net>
    Re: How to call another program <Joe.Smith@inwap.com>
    Re: How to call another program <flavell@ph.gla.ac.uk>
    Re: need help with security <matthew.garrish@sympatico.ca>
    Re: need help with security <bik.mido@tiscalinet.it>
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@augustmail.com
    Re: Q on "use" (Heinrich Mislik)
    Re: sort numeric lists <Joe.Smith@inwap.com>
    Re: What happend to www.perldoc.com?? (Rex Gustavus Adolphus)
    Re: write while( length $name ); <Joe.Smith@inwap.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 4 May 2004 09:59:25 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Books online????
Message-Id: <c77pht$o54$1@mamenchi.zrz.TU-Berlin.DE>

bxb7668 <bxb7668@somewhere.nocom> wrote in comp.lang.perl.misc:

> Please everyone. Before you reply with a sarcastic or RTFM answer,
> consider how you'd like other to respond to you if you were new or
> stuck or didn't know where to find the answer.

It is often all too clear what kind of answer is expected.  "Don't
bother me with details, give me code I can copy, paste and forget"
sums it up.

When a posting annoys me, I reserve the right to reply in kind.  Why
should the wishes of the poster take precedence?

Anno


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

Date: Tue, 04 May 2004 09:22:34 +0100
From: Mark Clements <mark.clements@kcl.ac.uk>
Subject: Re: complile a program with 2 files
Message-Id: <409752c1$1@news.kcl.ac.uk>

Susan wrote:

> I would like to put my hash table and array into one file(h.plx) and
> my main program in anohter one(h.pl). Now I don't know how to compile
> to make it work ... if I do perl h.plx h.pl ... it still doesn't work.
> Does anyone know how to compile? Please let me know, Thank you! 
perldoc -f require
should get you started.

Mark


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

Date: Tue, 04 May 2004 09:53:16 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: execute every 15 min
Message-Id: <gKJlc.20915$_41.1497665@attbi_s02>

Jeff Boes wrote:

> while (1) {
>   # Do your check here.
>   sleep (15 * 60);
> }
> 
> This has the advantage of being extremely portable. However, it has the 
> disadvantage of only ensuring that the *start* of one check will follow 
> the *end* of the previous check by *at least* 15 minutes. If a download 
> takes two minutes, then the start of each download will fall 17 minutes 
> after the last one.

   $sleep_seconds = 15 * 60
   while (1) {
      ...
      sleep ($sleep_seconds - (time % $sleep_seconds));
   }

	-Joe


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

Date: 4 May 2004 07:50:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Finding all open filehandles and closing them before exiting
Message-Id: <c77hvg$k7f$1@mamenchi.zrz.TU-Berlin.DE>

Vilmos Soti  <vilmos@vilmos.org> wrote in comp.lang.perl.misc:
> rook_5150@yahoo.com (Bryan Castillo) writes:
> 
> >>>> I have a signal handler which tries to unmount the disk in
> >>>> the case of a sigint, but it will fail if copy from File::Copy
> >>>> has an open filehandle on the mounted disk.

[...]

> I tried Rocco's MAX_OPEN_FDS solution (which is still unavailable
> on my nntp server), but I had the same problem you had: POSIX didn't
> know about it.

Under POSIX the name of the limit is _POSIX_OPEN_MAX, not MAX_OPEN_FDS.

Anno


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

Date: Tue, 04 May 2004 04:32:20 GMT
From: XXjbhuntxx@white-star.com (Cosmic Cruizer)
Subject: Re: Finding file size over network
Message-Id: <Xns94DEDB0F79626ccruizermydejacom@64.164.98.51>

XXjbhuntxx@white-star.com (Cosmic Cruizer) wrote in
<Xns94DEB1B73100Dccruizermydejacom@64.164.98.50>: 

>I'm having trouble getting file stats from files on remote servers. All
>the filenames get printed from within the if statement, but I am not
>getting anything for the file size (or any other stat I try). Doing a
>print on $target_file returns the full path and filename.
>
>Any suggestions?
>
>
>
>foreach (@server_list) {
>  print "$_ \n";
>
>  system("net use q: $_ /USER:$user $password");
>
>  opendir DIR, $file_path or die "Cannot open: $!";
>    my @files = grep { /GLC[0-9a-zA-Z]*\.tmp/ } readdir DIR;
>
>    for my $file ( @files ) {
>      my $target_file = $file_path . $file;
>
>      if (-e $target_file) {
>        $size = (stat($target_file))[7];  # Use 8th element of stat
>        print "  $file \t $size\n";
>      }
>
>    }
>
>  closedir DIR;
>
>  system("net use q: /delete");
>}

Finally figured it out. I replaced:
   $size = (stat($target_file))[7];
with
   $size = stat($target_file)->size;


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

Date: Tue, 4 May 2004 11:51:50 +0200
From: "Mark" <admin@asarian-host.net>
Subject: How do I get MIME skeleton?
Message-Id: <KJmdnSFLGoMi-grdRVn-gg@giganews.com>

Good morning,

I have been using MIME::Parser (From MIME-tools-6.200_02) to get a list of
all the "part" names of a MIME encoded message. I used something like:

$entity -> dump_skeleton ();

However, that decodes the entire message, and writes its parts to disk. And
all I want, is a list of names of all the parts (recursed). Like
dump_skeleton does, but then without the expensive decoding/disk IO.

Does anyone know whether there is an existing function for this?

Thank you,

- Mark




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

Date: Tue, 04 May 2004 08:50:00 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: How to call another program
Message-Id: <UOIlc.28627$Ik.1858841@attbi_s53>

Alan J. Flavell wrote:

> On Mon, 3 May 2004, Joe Smith wrote:
> 
> 
>>You could have part-1.pl output HTML that runs two CGIs in parallel.
>>
>>      <frameset rows="100%,*">
>>	<frame src="/cgi-bin/part-2.pl">
>>	<frame src="http://www.domain.com/cgi-bin/copyprog.pl">
>>      </frameset>
>>      <noframes>
>>         <body><img src="/cgi-bin/part-2.pl" width=1 height=1">
>>         <img src="http://www.domain.com/cgi-bin/copyprog.pl" width=1 height=1>
>>         </body>
>>      </noframes>
> 
> 
> Was that wise?  While it seems to have got the questioner off our
> backs, I'd have to say that if it were to be presented as a solution
> in a WWW group (which is where I suspect it would be more on-topic,
> since there's almost no specifically Perl-language relevance here), it
> would likely have been shot down in flames.

I did give it some thought, and decided that the expedient solution
would be worth it, if only to reduce flamage and allow other threads
of discussion to prosper.

> There's just too many imponderables being left to the client side
> (who'd be perfectly entitled to disable frames and/or images if they
> felt like it) for this to rate as a robust piece of web engineering,
> I'm afraid.

No frames: taken care of.  Both no frames and no images: only the OP
would know if that would be a concern for his expected audience.
As for robustness, I expect the OP will eventually realize that he
had 95% of the solution with the script that use LWP twice.

I would have done it this way:

1) Output the HTTP and HTML headers immediately, to give the user
    feedback.  This would include sending <BR>, <HR>, <P></P>, or other
    HTML tag that forces a line break, so that the browser will
    render the partial page.  (No <table> at this stage.)

2) Execute an LWP request inside the CGI, with a suitable timeout
    being set.  When the results come back, output more HTML, with
    another line break.

3) Do post-processing.  This could be fork()+exec(), system("... &"),
    or just let the browser sit and wait for processing to complete.
    [I've seen one CGI output <HR width="10%">(pause)<HR width="20%">,
    etc as a pseudo progress bar.]

	-Joe


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

Date: Tue, 4 May 2004 10:26:31 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: How to call another program
Message-Id: <Pine.LNX.4.53.0405041023330.11774@ppepc56.ph.gla.ac.uk>

On Tue, 4 May 2004, Joe Smith wrote:

> Alan J. Flavell wrote:
>
> > There's just too many imponderables being left to the client side
> > (who'd be perfectly entitled to disable frames and/or images if they
> > felt like it) for this to rate as a robust piece of web engineering,
> > I'm afraid.
>
> No frames: taken care of.

conceded

> Both no frames and no images: only the OP
> would know if that would be a concern for his expected audience.

Right.  I would have been more comfortable if the answer had made that
explicit, though.

> As for robustness, I expect the OP will eventually realize that he
> had 95% of the solution with the script that use LWP twice.

Food for thought...

all the best


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

Date: Tue, 4 May 2004 00:03:05 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: need help with security
Message-Id: <QBElc.20892$3Q4.485920@news20.bellglobal.com>


"Robin" <robin @ infusedlight.net> wrote in message
news:c74eqt$opc$1@news.f.de.plusline.net...
> "gnari" <gnari@simnet.is> wrote in message
> news:c742sf$6gh$1@news.simnet.is...
>
> > of course, it is your auth.pl that is the weakest link.
> >
>
> agreed, thanks... I'll set it up to use cookies...
>

Please enlighten me as to how the use of cookies will make your scripts any
more secure? If you really understood what they are how they work, you'd
know that they provide *no security* in and of themselves.

Matt




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

Date: Tue, 04 May 2004 09:08:30 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: need help with security
Message-Id: <klgd90t2olqdeqld7jl1oq9vp8qtfoc8lh@4ax.com>

On Mon, 03 May 2004 15:51:38 +0200, Gunnar Hjalmarsson
<noreply@gunnar.cc> wrote:

[important missing line here - my fault!]
>>>>> $rootfile =~ s/.+\///;
[snip]
>> '=~' ne '=';
>
>Never snip code that is needed for context. :)

Sorry, my mistake!


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Tue, 04 May 2004 02:22:33 -0500
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
Message-Id: <cbSdnXoaIqkk2QrdRVn-vw@august.net>

Outline
   Before posting to comp.lang.perl.misc
      Must
       - Check the Perl Frequently Asked Questions (FAQ)
       - Check the other standard Perl docs (*.pod)
      Really Really Should
       - Lurk for a while before posting
       - Search a Usenet archive
      If You Like
       - Check Other Resources
   Posting to comp.lang.perl.misc
      Is there a better place to ask your question?
       - Question should be about Perl, not about the application area
      How to participate (post) in the clpmisc community
       - Carefully choose the contents of your Subject header
       - Use an effective followup style
       - Speak Perl rather than English, when possible
       - Ask perl to help you
       - Do not re-type Perl code
       - Provide enough information
       - Do not provide too much information
       - Do not post binaries, HTML, or MIME
      Social faux pas to avoid
       - Asking a Frequently Asked Question
       - Asking a question easily answered by a cursory doc search
       - Asking for emailed answers
       - Beware of saying "doesn't work"
       - Sending a "stealth" Cc copy
      Be extra cautious when you get upset
       - Count to ten before composing a followup when you are upset
       - Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------

Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
    This newsgroup, commonly called clpmisc, is a technical newsgroup
    intended to be used for discussion of Perl related issues (except job
    postings), whether it be comments or questions.

    As you would expect, clpmisc discussions are usually very technical in
    nature and there are conventions for conduct in technical newsgroups
    going somewhat beyond those in non-technical newsgroups.

    The article at:

        http://www.catb.org/~esr/faqs/smart-questions.html

    describes how to get answers from technical people in general.

    This article describes things that you should, and should not, do to
    increase your chances of getting an answer to your Perl question. It is
    available in POD, HTML and plain text formats at:

     http://mail.augustmail.com/~tadmc/clpmisc.shtml

    For more information about netiquette in general, see the "Netiquette
    Guidelines" at:

     http://andrew2.andrew.cmu.edu/rfc/rfc1855.html

    A note to newsgroup "regulars":

       Do not use these guidelines as a "license to flame" or other
       meanness. It is possible that a poster is unaware of things
       discussed here.  Give them the benefit of the doubt, and just
       help them learn how to post, rather than assume 

    A note about technical terms used here:

       In this document, we use words like "must" and "should" as
       they're used in technical conversation (such as you will
       encounter in this newsgroup). When we say that you *must* do
       something, we mean that if you don't do that something, then
       it's unlikely that you will benefit much from this group.
       We're not bossing you around; we're making the point without
       lots of words.

    Do *NOT* send email to the maintainer of these guidelines. It will be
    discarded unread. The guidelines belong to the newsgroup so all
    discussion should appear in the newsgroup. I am just the secretary that
    writes down the consensus of the group.

Before posting to comp.lang.perl.misc
  Must
    This section describes things that you *must* do before posting to
    clpmisc, in order to maximize your chances of getting meaningful replies
    to your inquiry and to avoid getting flamed for being lazy and trying to
    have others do your work.

    The perl distribution includes documentation that is copied to your hard
    drive when you install perl. Also installed is a program for looking
    things up in that (and other) documentation named 'perldoc'.

    You should either find out where the docs got installed on your system,
    or use perldoc to find them for you. Type "perldoc perldoc" to learn how
    to use perldoc itself. Type "perldoc perl" to start reading Perl's
    standard documentation.

    Check the Perl Frequently Asked Questions (FAQ)
        Checking the FAQ before posting is required in Big 8 newsgroups in
        general, there is nothing clpmisc-specific about this requirement.
        You are expected to do this in nearly all newsgroups.

        You can use the "-q" switch with perldoc to do a word search of the
        questions in the Perl FAQs.

    Check the other standard Perl docs (*.pod)
        The perl distribution comes with much more documentation than is
        available for most other newsgroups, so in clpmisc you should also
        see if you can find an answer in the other (non-FAQ) standard docs
        before posting.

    It is *not* required, or even expected, that you actually *read* all of
    Perl's standard docs, only that you spend a few minutes searching them
    before posting.

    Try doing a word-search in the standard docs for some words/phrases
    taken from your problem statement or from your very carefully worded
    "Subject:" header.

  Really Really Should
    This section describes things that you *really should* do before posting
    to clpmisc.

    Lurk for a while before posting
        This is very important and expected in all newsgroups. Lurking means
        to monitor a newsgroup for a period to become familiar with local
        customs. Each newsgroup has specific customs and rituals. Knowing
        these before you participate will help avoid embarrassing social
        situations. Consider yourself to be a foreigner at first!

    Search a Usenet archive
        There are tens of thousands of Perl programmers. It is very likely
        that your question has already been asked (and answered). See if you
        can find where it has already been answered.

        One such searchable archive is:

         http://groups.google.com/advanced_group_search

  If You Like
    This section describes things that you *can* do before posting to
    clpmisc.

    Check Other Resources
        You may want to check in books or on web sites to see if you can
        find the answer to your question.

        But you need to consider the source of such information: there are a
        lot of very poor Perl books and web sites, and several good ones
        too, of course.

Posting to comp.lang.perl.misc
    There can be 200 messages in clpmisc in a single day. Nobody is going to
    read every article. They must decide somehow which articles they are
    going to read, and which they will skip.

    Your post is in competition with 199 other posts. You need to "win"
    before a person who can help you will even read your question.

    These sections describe how you can help keep your article from being
    one of the "skipped" ones.

  Is there a better place to ask your question?
    Question should be about Perl, not about the application area
        It can be difficult to separate out where your problem really is,
        but you should make a conscious effort to post to the most
        applicable newsgroup. That is, after all, where you are the most
        likely to find the people who know how to answer your question.

        Being able to "partition" a problem is an essential skill for
        effectively troubleshooting programming problems. If you don't get
        that right, you end up looking for answers in the wrong places.

        It should be understood that you may not know that the root of your
        problem is not Perl-related (the two most frequent ones are CGI and
        Operating System related), so off-topic postings will happen from
        time to time. Be gracious when someone helps you find a better place
        to ask your question by pointing you to a more applicable newsgroup.

  How to participate (post) in the clpmisc community
    Carefully choose the contents of your Subject header
        You have 40 precious characters of Subject to win out and be one of
        the posts that gets read. Don't waste them. Take care while
        composing them, they are the key that opens the door to getting an
        answer.

        Spend them indicating what aspect of Perl others will find if they
        should decide to read your article.

        Do not spend them indicating "experience level" (guru, newbie...).

        Do not spend them pleading (please read, urgent, help!...).

        Do not spend them on non-Subjects (Perl question, one-word
        Subject...)

        For more information on choosing a Subject see "Choosing Good
        Subject Lines":

         http://www.cpan.org/authors/id/D/DM/DMR/subjects.post

        Part of the beauty of newsgroup dynamics, is that you can contribute
        to the community with your very first post! If your choice of
        Subject leads a fellow Perler to find the thread you are starting,
        then even asking a question helps us all.

    Use an effective followup style
        When composing a followup, quote only enough text to establish the
        context for the comments that you will add. Always indicate who
        wrote the quoted material. Never quote an entire article. Never
        quote a .signature (unless that is what you are commenting on).

        Intersperse your comments *following* each section of quoted text to
        which they relate. Unappreciated followup styles are referred to as
        "top-posting", "Jeopardy" (because the answer comes before the
        question), or "TOFU" (Text Over, Fullquote Under).

        Reversing the chronology of the dialog makes it much harder to
        understand (some folks won't even read it if written in that style).
        For more information on quoting style, see:

         http://web.presby.edu/~nnqadmin/nnq/nquote.html

    Speak Perl rather than English, when possible
        Perl is much more precise than natural language. Saying it in Perl
        instead will avoid misunderstanding your question or problem.

        Do not say: I have variable with "foo\tbar" in it.

        Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
        or I have $var = <DATA> (and show the data line).

    Ask perl to help you
        You can ask perl itself to help you find common programming mistakes
        by doing two things: enable warnings (perldoc warnings) and enable
        "strict"ures (perldoc strict).

        You should not bother the hundreds/thousands of readers of the
        newsgroup without first seeing if a machine can help you find your
        problem. It is demeaning to be asked to do the work of a machine. It
        will annoy the readers of your article.

        You can look up any of the messages that perl might issue to find
        out what the message means and how to resolve the potential mistake
        (perldoc perldiag). If you would like perl to look them up for you,
        you can put "use diagnostics;" near the top of your program.

    Do not re-type Perl code
        Use copy/paste or your editor's "import" function rather than
        attempting to type in your code. If you make a typo you will get
        followups about your typos instead of about the question you are
        trying to get answered.

    Provide enough information
        If you do the things in this item, you will have an Extremely Good
        chance of getting people to try and help you with your problem!
        These features are a really big bonus toward your question winning
        out over all of the other posts that you are competing with.

        First make a short (less than 20-30 lines) and *complete* program
        that illustrates the problem you are having. People should be able
        to run your program by copy/pasting the code from your article. (You
        will find that doing this step very often reveals your problem
        directly. Leading to an answer much more quickly and reliably than
        posting to Usenet.)

        Describe *precisely* the input to your program. Also provide example
        input data for your program. If you need to show file input, use the
        __DATA__ token (perldata.pod) to provide the file contents inside of
        your Perl program.

        Show the output (including the verbatim text of any messages) of
        your program.

        Describe how you want the output to be different from what you are
        getting.

        If you have no idea at all of how to code up your situation, be sure
        to at least describe the 2 things that you *do* know: input and
        desired output.

    Do not provide too much information
        Do not just post your entire program for debugging. Most especially
        do not post someone *else's* entire program.

    Do not post binaries, HTML, or MIME
        clpmisc is a text only newsgroup. If you have images or binaries
        that explain your question, put them in a publically accessible
        place (like a Web server) and provide a pointer to that location. If
        you include code, cut and paste it directly in the message body.
        Don't attach anything to the message. Don't post vcards or HTML.
        Many people (and even some Usenet servers) will automatically filter
        out such messages. Many people will not be able to easily read your
        post. Plain text is something everyone can read.

  Social faux pas to avoid
    The first two below are symptoms of lots of FAQ asking here in clpmisc.
    It happens so often that folks will assume that it is happening yet
    again. If you have looked but not found, or found but didn't understand
    the docs, say so in your article.

    Asking a Frequently Asked Question
        It should be understood that you may have missed the applicable FAQ
        when you checked, which is not a big deal. But if the Frequently
        Asked Question is worded similar to your question, folks will assume
        that you did not look at all. Don't become indignant at pointers to
        the FAQ, particularly if it solves your problem.

    Asking a question easily answered by a cursory doc search
        If folks think you have not even tried the obvious step of reading
        the docs applicable to your problem, they are likely to become
        annoyed.

        If you are flamed for not checking when you *did* check, then just
        shrug it off (and take the answer that you got).

    Asking for emailed answers
        Emailed answers benefit one person. Posted answers benefit the
        entire community. If folks can take the time to answer your
        question, then you can take the time to go get the answer in the
        same place where you asked the question.

        It is OK to ask for a *copy* of the answer to be emailed, but many
        will ignore such requests anyway. If you munge your address, you
        should never expect (or ask) to get email in response to a Usenet
        post.

        Ask the question here, get the answer here (maybe).

    Beware of saying "doesn't work"
        This is a "red flag" phrase. If you find yourself writing that,
        pause and see if you can't describe what is not working without
        saying "doesn't work". That is, describe how it is not what you
        want.

    Sending a "stealth" Cc copy
        A "stealth Cc" is when you both email and post a reply without
        indicating *in the body* that you are doing so.

  Be extra cautious when you get upset
    Count to ten before composing a followup when you are upset
        This is recommended in all Usenet newsgroups. Here in clpmisc, most
        flaming sub-threads are not about any feature of Perl at all! They
        are most often for what was seen as a breach of netiquette. If you
        have lurked for a bit, then you will know what is expected and won't
        make such posts in the first place.

        But if you get upset, wait a while before writing your followup. I
        recommend waiting at least 30 minutes.

    Count to ten after composing and before posting when you are upset
        After you have written your followup, wait *another* 30 minutes
        before committing yourself by posting it. You cannot take it back
        once it has been said.

AUTHOR
    Tad McClellan <tadmc@augustmail.com> and many others on the
    comp.lang.perl.misc newsgroup.



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

Date: 04 May 2004 08:52:50 GMT
From: Heinrich.Mislik@univie.ac.at (Heinrich Mislik)
Subject: Re: Q on "use"
Message-Id: <409759e2$0$16036$3b214f66@usenet.univie.ac.at>

In article <c76r3k$6p9$1@reader2.panix.com>, socyl@987jk.com says...

Assuming that your package names have no :: and that your sub
get_available_services doesn't take any parameters, the following should work (untested):

  use strict;
  
  my $services;
  my @packages = qw(Foo Bar Baz);
  
  for my $package (@packages) {
    my @services;
    require "$package.pm";
    @services = $package->get_available_services;

    $services->{ "http://acmeServices.com/#${_}" } = $package
      for @services;
  }

-- 
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140



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

Date: Tue, 04 May 2004 09:28:22 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: sort numeric lists
Message-Id: <WmJlc.29551$I%1.1900387@attbi_s51>

Robin wrote:

>>What code?  And how about testing your code yourself?
> 
> The code below, it's a sort routine.

Code?  What code?  (Robin forgets to copy-and-paste yet again.)

> And your right, I should have referenced it.

Are you sure you're right?
("your right" = "my left", "your left" = "my right")


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

Date: 4 May 2004 00:39:02 -0700
From: uffesterner@spamhole.com (Rex Gustavus Adolphus)
Subject: Re: What happend to www.perldoc.com??
Message-Id: <c70a85ff.0405032339.332370d4@posting.google.com>

icefalcon777@yahoo.com (Geekatron) wrote:
> Try http://perldoc.com. You get a more useful message:
> 
> "The Perldoc website is in the process of moving to a new web
> server/web host. The website will be back online within the next few
> days. Sorry for the inconvience. "
> 
> --G

Thanks!

I must control my abstinence a few days more then!


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

Date: Tue, 04 May 2004 09:19:58 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: write while( length $name );
Message-Id: <1fJlc.20371$TD4.2887286@attbi_s01>

Harry DeLano wrote:

> I found this code in /usr/bin/dprofpp.  I am getting garbled output from 
>  dprofpp so I thought I'd try to debug it.  The code in the subject line 
> has me baffled.  Some dprofpp code excerpts:
>     
>     ...
>         $~ = 'STAT';
>     ...
>     format STAT =
>      ^>>>   ^>>>> ^>>>>> ^>>>>>   ^>>>>> ^>>>>>                   
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>     $pcnt, $secs, $csecs, $ncalls, $percall, $cpercall, $name
>     .
> 
> So how does this code not loop forever?

The answer is in "perldoc perlform".

                                                  Perl puts as much text as it
        can into the field, and then chops off the front of the string so that
        the next time the variable is referenced, more of the text can be
        printed.  (Yes, this means that the variable itself is altered during
        execution of the write() call, and is not returned.)

You might be interested in the message I posted to comp.lang.perl.misc
4/18/2004 1:33am (Message-ID: nntp:f3rgc.8641$hw5.7761@attbi_s53).

unix> cat temp
my $FO_UN = " @<<<<<<<<<<<<<    | ^<<<<<<<<<<<<<<<<<<<<<<<<<";

$name = 'John Doe';
$note = '123456789 abcdefghi ABCDEFGHI jklmnopqr JKLMNOPQR stu';
$psec .= swrite(<<"END", $name, $note);
$FO_UN
END

print qq/$psec\n/;
#---------------------------------------------------------------------------
sub swrite {
   my($format,$arg1,$arg2) = @_;
   $^A = "";
         print "before: arg2='$arg2'\n";
   formline($format, $arg1, $arg2);
         print "after:  arg2='$arg2'\n";
   substr($format,1,14) = ' ' x 14;      # Done with "@<<<<<<<<<<<<<" part
   formline($format, $arg2) while $arg2 ne "";   # Do multi-line
   return $^A;
}
unix> perl temp
before: arg2='123456789 abcdefghi ABCDEFGHI jklmnopqr JKLMNOPQR stu'
after:  arg2='ABCDEFGHI jklmnopqr JKLMNOPQR stu'
  John Doe          | 123456789 abcdefghi
                    | ABCDEFGHI jklmnopqr
                    | JKLMNOPQR stu

unix>

	-Joe

P.S. Please post to comp.lang.perl.misc next time, not comp.lang.perl


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

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


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