[22782] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5003 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 18 21:05:45 2003

Date: Sun, 18 May 2003 18:05:14 -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           Sun, 18 May 2003     Volume: 10 Number: 5003

Today's topics:
        Error message with perl -MCPAN -e shell <waty-spam@powerup.com.au>
        How do I pop this? <mail@annuna.com>
    Re: How do I pop this? (Sam Holden)
    Re: multiple sort subroutine <none@none.net>
    Re: multiple sort subroutine <vilmos@vilmos.org>
        Need a Perl script (ping IP address) (dlcurrell)
    Re: Perl and MySQL <reply@newsgroup.invalid>
    Re: Perl debugger prompt question <<##>> <nospam-abuse@ilyaz.org>
    Re: PHP or Perl ? <no@spam.please>
    Re: PHP or Perl ? <no@spam.please>
    Re: PHP or Perl ? (maybe)
    Re: PHP or Perl ? <postmaster@localhost.localdomain>
    Re: PHP or Perl ? <no@spam.please>
    Re: PHP or Perl ? (Sam Holden)
    Re: PHP or Perl ? <sepp00@web.de>
    Re: PHP or Perl ? <webmaster@neverseenbefore.com>
        POD page break <robert.j.sipe@boeing.com>
    Re: POD page break <abigail@abigail.nl>
        Using Web services from Perl (Pierre-Philippe Ravier)
    Re: Using Web services from Perl (Sam Holden)
    Re: Why causes the "format error" when using Archive::Z (niudou)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 19 May 2003 10:17:56 +1000
From: "Alan" <waty-spam@powerup.com.au>
Subject: Error message with perl -MCPAN -e shell
Message-Id: <ExVxa.452$po1.31860@nnrp1.ozemail.com.au>

Hello,

I am new to CPAN so please forgive (possibly) the obvious question... When I
initially configured CPAN I must have done something wrong. I am trying to
reconfigure but when I enter:

perl -MCPAN -e shell

I get the message:

Use of uninitialized value at (eval 3) line 16, <TERMCAP> chunk 1.

There seems to be running another CPAN process (1142
). Contacting...
Other job not responding. Shall I overwrite the lockfile? (Y/N) [y]

If I select Yes or No nothing happens, even if I wait for a long period.

Thanks,

Alan




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

Date: Sun, 18 May 2003 18:41:29 -0500
From: Joe Creaney <mail@annuna.com>
Subject: How do I pop this?
Message-Id: <3EC81A29.8000901@annuna.com>

I am using a 2d array in an object with syntax like this:
$play->{bag}->[$drp][$loop+1]

My problem is that I want to pop off the last element in the array.
Is there any way I can do that?



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

Date: 18 May 2003 23:46:54 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: How do I pop this?
Message-Id: <slrnbcg6re.hsn.sholden@flexal.cs.usyd.edu.au>

On Sun, 18 May 2003 18:41:29 -0500, Joe Creaney <mail@annuna.com> wrote:
> I am using a 2d array in an object with syntax like this:
> $play->{bag}->[$drp][$loop+1]
> 
> My problem is that I want to pop off the last element in the array.
> Is there any way I can do that?

pop @{$play->{bag}[$drp]}

or

pop @{$play->{bag}[$drp][$loop+1]}

depending on what you mean...

-- 
Sam Holden



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

Date: Sun, 18 May 2003 19:51:44 -0000
From: Dave <none@none.net>
Subject: Re: multiple sort subroutine
Message-Id: <Xns937F82D686CD4nonenonenet@216.168.3.44>

tadmc@augustmail.com (Tad McClellan) wrote in 
news:slrnbcfgi9.rk3.tadmc@magna.augustmail.com:
> 
>    # untested, and likely to run very slowly
>    sub is_num { $_[0] =~ /^\d+$/ }
> 
>    sub seniority {
>        (is_num($a->{SALARY}) && is_num($b->{SALARY}))
>          ?  $a->{SALARY}     <=>  $b->{SALARY}
>          :  $a->{SALARY}     cmp  $b->{SALARY}
>        or (is_num($a->{AGE}) && is_num($b->{AGE}))
>          ?  $a->{AGE}     <=>  $b->{AGE}
>          :  $a->{AGE}     cmp  $b->{AGE}
> 
>        ...
>    }
> 

Thanks so much Tad. Worked perfectly.


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

Date: 18 May 2003 17:43:39 -0700
From: Vilmos Soti <vilmos@vilmos.org>
Subject: Re: multiple sort subroutine
Message-Id: <87iss7bwas.fsf@localhost.localdomain>

tadmc@augustmail.com (Tad McClellan) writes:

>>     $a->{"$sort1"}  <=>  $b->{"$sort1"}
> 
> A useless use of double quotes:
> 
>    $a->{$sort1}  <=>  $b->{$sort1}

Could you elaborate why the double quotes are useless there? I
also don't use double quotes in such circumstances, but I saw way
too many codes that do use them and sometimes I felt that I am
the one who is wrong.

I would be happy to have an expert and authorative answer to this
question.

Thanks, Vilmos


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

Date: 18 May 2003 13:11:46 -0700
From: dlcurrell@yahoo.com (dlcurrell)
Subject: Need a Perl script (ping IP address)
Message-Id: <1338087e.0305181211.fad192d@posting.google.com>

I need a perl script before I have the luxury of learning perl - I
hope someone can help me and I thank you. Here's the situation:

My organization uses Tivoli Storage Manager as backup software. We
also use a TSM monitoring tool called Servergraph. Servergraph can
trigger an action based on what it sees in the TSM Activity log. I
would like to stop remote clients from backing up over the WAN by
pinging the IP address when a session is started with the server and
if the ping exceeds 20ms, instruct Servergraph to kill the session.
One major problem is that I don't know how to isolate the IP address
string from the message.

Everytime a session is commenced, a message is generated in the TSM
Activity log that is in this format:

ANR0406I Session session number started for node node name (client
platform) (communication method communication address).

An example:

05-05-2003 10:26:32 ANR0406I Session 245362 started for node
ESTAPPLS0009804(WinNT) (Tcp/Ip 10.176.3.31 (43321)).


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

Date: Sun, 18 May 2003 20:52:49 +0200
From: Prodigy <reply@newsgroup.invalid>
Subject: Re: Perl and MySQL
Message-Id: <ba8kn5$7jt$1@beast.euro.net>

Prodigy wrote:

> I want Perl to connect to a MySQL database, get some data from it, handle
> the data (do some things with it), and after these actions, store the data
> back in the database.

Thank you all for the responses. I took a look at CPAN, and found the
Net::MySQL module with UNIX socket support, which seems to fit exactly for
what I need. Furthermore, the CPAN page contains excellent support for the
use of the module, which doesn't need more than a little perl and SQL
knowledge. Anyone who wants to do the same as I do, take a look at
Net::MySQL. Once again, thank you for the feedback.

 - Prodigy


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

Date: Sun, 18 May 2003 21:22:05 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Perl debugger prompt question <<##>>
Message-Id: <ba8tht$1gk7$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Robert
<robert.j.sipe@boeing.com>], who wrote in article <HF1DqK.2M@news.boeing.com>:
> I was in the debuger single stepping my program.  At one point I was
> attempting to preview the value of some variables in a sub.  I observed the
> debug prompt change from:
> 
> DB<17> yaddie yaddie
> DB<18> yaddah yaddah
> 
> to
> 
> DB<<19>>  yaddie yaddah
> 
> and retain the <<##>> as the line numbers incremented.
> 
> What do the double chevrons indicate?

recursive debugging.  Debugger is debugging the code eval()ed from the
debugger command line.  Try

   DB<2> s Term::ReadLine->new('foo')

Or maybe it is a bug.  ;-)

Hope this helps,
Ilya



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

Date: Sun, 18 May 2003 19:40:24 GMT
From: "Anonymous Joe" <no@spam.please>
Subject: Re: PHP or Perl ?
Message-Id: <IkRxa.21530$rt6.8058@sccrnsc02>

"steve" <NOSPAMstoianstoian@hotmail.com> wrote in message
news:ba8c0d$1lu$1@ctb-nnrp2.saix.net...
> > > How would you advice someone who wants to start learning a
> programmign
> > > language for developping websites ?
> > > learning PHP or Perl ?
> >
> > PHP is yummy and easy.
> >
> > perl is soooo 1990s
> >
> > <runs for cover/>
>
> what about ASP
>
>

bah




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

Date: Sun, 18 May 2003 19:40:04 GMT
From: "Anonymous Joe" <no@spam.please>
Subject: Re: PHP or Perl ?
Message-Id: <okRxa.884884$3D1.504866@sccrnsc01>

"Dieter D'Hoker" <webmaster@neverseenbefore.com> wrote in message
news:3ec6c663$0$49117$e4fe514c@news.xs4all.nl...
> How would you advice someone who wants to start learning a programmign
> language for developping websites ?
> learning PHP or Perl ?
>
> Or maybe somethign else like Coldfusion , or java servlets , Python ?
>
> and why ?
>
>
> -- 
> Dieter D'Hoker
> http://dieter.dhoker.com/
> news:free.nl.dieter.dhoker & news:alt.nl.fan.dieter.dhoker
> Tetrinet SeRVer : TSRV.COM

PHP, best.




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

Date: Sun, 18 May 2003 20:58:45 +0100
From: Jacqui or (maybe) Pete <porjes@spamcop.net>
Subject: Re: PHP or Perl ?
Message-Id: <MPG.1931e7b278c14ea0989a48@news.CIS.DFN.DE>

In article <3ec6c663$0$49117$e4fe514c@news.xs4all.nl>, 
webmaster@neverseenbefore.com says...
> How would you advice someone who wants to start learning a programmign
> language for developping websites ?
> learning PHP or Perl ?

PHP is easier to learn. 

As far as developing websites is concerned, there's nothing you can do 
in one language that you can't do in the other.

Personally, I love perl.
-- 
Your site's most important visitors are completely blind, 
totally deaf, and use browsers you've never seen. 


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

Date: Sun, 18 May 2003 22:52:52 +0100
From: bengee <postmaster@localhost.localdomain>
Subject: Re: PHP or Perl ?
Message-Id: <nkTxa.21055$9C6.1085496@wards.force9.net>

Sebastian Hungerecker wrote:
> Perl is not primarily a language for developing websites and for questions
> about perl for website developing this is the wrong newsgroup. @topic: php
> is IMHO easier for website developing than cgi/perl (or cgi in general for
> that matter)

What about Perl ASP then?

Ben



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

Date: Sun, 18 May 2003 22:14:02 GMT
From: "Anonymous Joe" <no@spam.please>
Subject: Re: PHP or Perl ?
Message-Id: <KATxa.894060$F1.111534@sccrnsc04>

"bengee" <postmaster@localhost.localdomain> wrote in message
news:nkTxa.21055$9C6.1085496@wards.force9.net...
> Sebastian Hungerecker wrote:
> > Perl is not primarily a language for developing websites and for
questions
> > about perl for website developing this is the wrong newsgroup. @topic:
php
> > is IMHO easier for website developing than cgi/perl (or cgi in general
for
> > that matter)
>
> What about Perl ASP then?
>
> Ben
>

Yeah, what about that?

Me thinks they are two seperate things there....not one thing called "PERL
ASP"

ASP is Microsoft's own bullshit to combat the widespread usage of free
languages.




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

Date: 18 May 2003 22:31:11 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: PHP or Perl ?
Message-Id: <slrnbcg2de.h0c.sholden@flexal.cs.usyd.edu.au>

On Sun, 18 May 2003 22:14:02 GMT, Anonymous Joe <no@spam.please> wrote:
> "bengee" <postmaster@localhost.localdomain> wrote in message
> news:nkTxa.21055$9C6.1085496@wards.force9.net...
>> Sebastian Hungerecker wrote:
>> > Perl is not primarily a language for developing websites and for
> questions
>> > about perl for website developing this is the wrong newsgroup. @topic:
> php
>> > is IMHO easier for website developing than cgi/perl (or cgi in general
> for
>> > that matter)
>>
>> What about Perl ASP then?
>>
>> Ben
>>
> 
> Yeah, what about that?
> 
> Me thinks they are two seperate things there....not one thing called "PERL
> ASP"
> 
> ASP is Microsoft's own bullshit to combat the widespread usage of free
> languages.

Maybe you should read up on what ASP actually is before ranting about it.

ASP is the is a language independant 'technology'. It is no more a
language than CGI is.

VBScript is probably the most popular language to use with ASP, however,
you can also use JScript, PerlScript, VB.Net and so on.

Perlscript has the advantage of actually being Perl (whereas VBScript
is merely a subset of VB).

-- 
Sam Holden



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

Date: Mon, 19 May 2003 00:55:19 +0200
From: Sebastian Hungerecker <sepp00@web.de>
Subject: Re: PHP or Perl ?
Message-Id: <20030519005519.78a32685.sepp00@web.de>

On Sun, 18 May 2003 22:14:02 GMT
"Anonymous Joe" <no@spam.please> wrote:
> Me thinks they are two seperate things there....not one thing called "PERL
> ASP"
AFAIK ASP is Microsoft's alternative to CGI, so when there is CGI/perl there
also should be ASP/perl. But I don't use Microsoft-Products at all, so this
doesn't really matter to me *g*


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

Date: Mon, 19 May 2003 01:32:29 +0200
From: "Dieter D'Hoker" <webmaster@neverseenbefore.com>
Subject: Re: PHP or Perl ?
Message-Id: <ba956j$prq3p$1@ID-155251.news.dfncis.de>

"Dieter D'Hoker" <webmaster@neverseenbefore.com> wrote in message
news:3ec6c663$0$49117$e4fe514c@news.xs4all.nl...
> How would you advice someone who wants to start learning a programmign
> language for developping websites ?
> learning PHP or Perl ?
>
> Or maybe somethign else like Coldfusion , or java servlets , Python ?
>
> and why ?

Want I didn't hear yet is the support on webservers ,
and the future of the language ,
if you are looking for hosting ,
has it a geater chance of supporting PHP/perl ...
And what do you think hosts will support in the future ?

Is it true that Perl is an old language , was popular , is popular ,  but is
a little bit dying now ?


-- 
Dieter D'Hoker
http://dieter.dhoker.com/
news:free.nl.dieter.dhoker & news:alt.nl.fan.dieter.dhoker
Tetrinet SeRVer : TSRV.COM




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

Date: Sun, 18 May 2003 18:14:26 GMT
From: "Robert" <robert.j.sipe@boeing.com>
Subject: POD page break
Message-Id: <HF3HC0.MB1@news.boeing.com>

Is there a method of inserting a page break in a POD?




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

Date: 18 May 2003 22:03:24 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: POD page break
Message-Id: <slrnbcg0pc.kuj.abigail@alexandra.abigail.nl>

Robert (robert.j.sipe@boeing.com) wrote on MMMDXLVII September MCMXCIII
in <URL:news:HF3HC0.MB1@news.boeing.com>:
::  Is there a method of inserting a page break in a POD?


Not in general. But for specific targets, you could do something like:

=for LaTeX \newpage


Abigail
-- 
sub J::FETCH{Just   }$_.='print+"@{[map';sub J::TIESCALAR{bless\my$J,J}
sub A::FETCH{Another}$_.='{tie my($x),$';sub A::TIESCALAR{bless\my$A,A}
sub P::FETCH{Perl   }$_.='_;$x}qw/J A P';sub P::TIESCALAR{bless\my$P,P}
sub H::FETCH{Hacker }$_.=' H/]}\n"';eval;sub H::TIESCALAR{bless\my$H,H}


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

Date: 18 May 2003 13:18:32 -0700
From: ppravier@hotmail.com (Pierre-Philippe Ravier)
Subject: Using Web services from Perl
Message-Id: <153eb4a6.0305181218.3c9a2c55@posting.google.com>

Hi,

I would like to know how can I use Web-Services from Perl ? The
Web-Service exposes its functions with the SOAP protocol over HTTP.
I have seen in some messages here that some SOAP modules exist for
Perl, which makes me hope all these things are possible.

Thanks.


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

Date: 18 May 2003 20:28:05 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Using Web services from Perl
Message-Id: <slrnbcfr6l.foq.sholden@flexal.cs.usyd.edu.au>

On 18 May 2003 13:18:32 -0700,
	Pierre-Philippe Ravier <ppravier@hotmail.com> wrote:
> Hi,
> 
> I would like to know how can I use Web-Services from Perl ? The
> Web-Service exposes its functions with the SOAP protocol over HTTP.
> I have seen in some messages here that some SOAP modules exist for
> Perl, which makes me hope all these things are possible.

If googling for "perl SOAP" didn't explain the answer to you, nothing
I could write would.


-- 
Sam Holden



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

Date: 18 May 2003 17:58:15 -0700
From: niudou@hotmail.com (niudou)
Subject: Re: Why causes the "format error" when using Archive::Zip?
Message-Id: <324590c7.0305181658.3a547388@posting.google.com>

Thanks, Rob!

But what's your meaning for "the valid zip file"? Is there any
standard? After reading the source code of zip.pm, I think if I want
to unzip a zip file by Archive::Zip, I should firstly zip a file or
files into a "valid" zip file also by Archive::Zip. My understanding
is right?


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

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.  

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 5003
***************************************


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