[16420] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3832 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 28 11:07:27 2000

Date: Fri, 28 Jul 2000 08: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)
Message-Id: <964796713-v9-i3832@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 28 Jul 2000     Volume: 9 Number: 3832

Today's topics:
        &func(), &func, or func()? <samara_biz@hotmail.com>
    Re: &func(), &func, or func()? (Anno Siegel)
    Re: An email problem <andre@UltraShell.Net>
    Re: An email problem <sariq@texas.net>
        Analog vs Cable connections (John Rae)
    Re: Delete records in 2 weeks time (Keith Calvert Ivey)
        How to trim strings? <akneller@gothambroadband.com>
    Re: Is this a bogus -w warning? <jbroz@transarc.com>
    Re: New Site: www.perlmodules.com <camerond@mail.uca.edu>
        newb q - help with write to file script pooh23@my-deja.com
    Re: newb Q, Our perl guy left!! <iltzu@sci.invalid>
    Re: newb Q, Our perl guy left!! <jtoy@tcgfinancial.com>
    Re: newb Q, Our perl guy left!! <jtoy@tcgfinancial.com>
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! <jtoy@tcgfinancial.com>
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! <hell@hell.com>
    Re: newb Q, Our perl guy left!! <hell@hell.com>
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! <toyboy@toy.eyep.net>
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! <toyboy@toy.eyep.net>
    Re: newb Q, Our perl guy left!! (Greg Bacon)
    Re: newb Q, Our perl guy left!! <toyboy@toy.eyep.net>
    Re: newb Q, Our perl guy left!! <toyboy@toy.eyep.net>
    Re: newb Q, Our perl guy left!! <toyboy@toy.eyep.net>
    Re: newbie question, can a perl program run 24/7 (Greg Bacon)
    Re: os type (Keith Calvert Ivey)
        Reference question (was Callback in SNMP module) <mcnuttj@nin.iats.missouri.edu>
    Re: regexp match inside a time interval ? <man@rila.bg>
        Secure Encapsulated one-time Login worc99@my-deja.com
    Re: Secure Encapsulated one-time Login <flavell@mail.cern.ch>
    Re: strict and subroutine variables <pdmos23@geocities.com>
    Re: To sys op - get me off your email list <gellyfish@gellyfish.com>
    Re: ttt <jimmy.lantz@ostas.lu.se>
    Re: When I use LIKE I get an error in ASP <hartleh1@westat.com>
        Wraping file with XML code <Sasa.Danicic@eurodyn.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 28 Jul 2000 09:18:45 -0400
From: "Alex T." <samara_biz@hotmail.com>
Subject: &func(), &func, or func()?
Message-Id: <39818835.CA156CAF@hotmail.com>

Hi,

I'm a little confused...  I've been learning Perl for about a month so
far. In my scripts if I needed to call a function I would just type
&function_name().

I saw in other scripts that some of them use &function_name and some
function_name().

Could anyone point out what the difference is to me? Or maybe point me
to a resource where I could find out more about it?

Thanks!

Alex



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

Date: 28 Jul 2000 14:16:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: &func(), &func, or func()?
Message-Id: <8ls4jn$7a5$1@lublin.zrz.tu-berlin.de>

Alex T. <samara_biz@hotmail.com> wrote in comp.lang.perl.misc:
>Hi,
>
>I'm a little confused...  I've been learning Perl for about a month so
>far. In my scripts if I needed to call a function I would just type
>&function_name().
>
>I saw in other scripts that some of them use &function_name and some
>function_name().
>
>Could anyone point out what the difference is to me? Or maybe point me
>to a resource where I could find out more about it?

Viewed superficially, they all do the same.  It has become customary
to leave off the ampersand.  For details on the differences (which
exist), see perldoc perlsub.

Anno


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

Date: Fri, 28 Jul 2000 13:23:00 GMT
From: Andre van Straaten <andre@UltraShell.Net>
Subject: Re: An email problem
Message-Id: <UOfg5.4454$%W6.167581@news-east.usenetserver.com>

There are enough Perl modules to do just this, the most common ones are
MIME::Lite, especially for binary attchment and the SMTP modules.

But a simple solution is to use mail or sendmail from inside
Perl. sendmail doesn't have to run as daemon, it must only be present on
the system.

On my Web site (http://www.vanstraatensoft.com) are a few scripts, and
almost all use mail in some variant.

-- avs


James <jamesmckay@MailAndNews.com> wrote:
> Hi All,
>       I'm trying to implement a simple script to monitor error logs and mail 
> an administrator if an error occurs.  I've looked at several perl modules, 
> but 
> I can't seem to find one that does just this - they all seem to be for 
> running 
> an actual mail server.  Please can someone give me a simple example of how 
> to 
> do this??
> Thanks in advance.
> James


-- 

Andre van Straaten
http://www.vanstraatensoft.com
______________________________________________
flames please to /dev/null@vanstraatensoft.com



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

Date: Fri, 28 Jul 2000 09:49:32 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: An email problem
Message-Id: <39819D7C.8F5FE9AC@texas.net>

James wrote:
> 
> I'm trying to implement a simple script to monitor error logs and mail
> an administrator if an error occurs.

perldoc -q tail
perldoc -q mail

- Tom


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

Date: Fri, 28 Jul 2000 13:35:06 GMT
From: jcrae@bigpond.net.au (John Rae)
Subject: Analog vs Cable connections
Message-Id: <3981897d.1673740@news-server>

I suspect this is an ISP problem rather than a Perl problem (therefore
off-topic for which I apologise), but I have to start somewhere.

I have a perl script which gets some web pages (and does various other
things).  It has worked fine for a couple of years over analog dial up
lines, and via networks with ISDN links, on Win95, Win98 and WinNT.  I
recently got a cable connection (Telstra's Big Pond Advance service in
Australia, FWIW), and the script doesn't work on this service.  But it
still works on an analog modem dial up on the samePC.

Here's a snippet of code showing the problem:
==========================================
use IO::Socket;

$host = "www.apcmag.com";
$remote = IO::Socket::INET->new( Proto => "tcp",
	PeerAddr => $host,
	PeerPort => "http(80)",
	);

unless ($remote) {die "Cannot connect to http daemon on host"};
print "Connection made\n";
$remote->autoflush(1);
$getname = "/start/";
print "About to GET $getname\n";
print $remote "GET $getname HTTP/1.0\n\n";  #Hangs here 
while ( <$remote> ) {
	print;
}
=============================================
On cable, it prints the diagnostic line "About to GET.." etc, then
hangs.  It eventually exits, presumably on a time out.

Anyone have any experience of this problem?

Cheers
John Rae


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

Date: Fri, 28 Jul 2000 12:40:05 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Delete records in 2 weeks time
Message-Id: <39837eda.49444233@news.newsguy.com>

trwww@my-deja.com wrote:

>($records_seconds = $_) =~ s/.*Reference: (\d+).*/$1/;

Simpler:

 ($records_seconds) = /Reference: (\d+)/;

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Fri, 28 Jul 2000 14:09:43 GMT
From: Alex Kneller <akneller@gothambroadband.com>
Subject: How to trim strings?
Message-Id: <8ls472$g73$1@nnrp1.deja.com>

I need to trim a string of the last quote. Please, help.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 28 Jul 2000 14:13:14 +0100
From: "Joe_Broz@transarc.com" <jbroz@transarc.com>
Subject: Re: Is this a bogus -w warning?
Message-Id: <398186EA.AA1B61A2@transarc.com>

Robert Goff wrote:
> 
> I got a new -w warning today:
> 
> Found = in conditional, should be == at
> /home/httpd/mill/cgi-in/MLSOffer.pm line 306.
> 
> Here's the code:
> 
> if ( my $buyer_email = 'robert@goff.com' ) {
>    ... do stuff with $buyer_email...
> }
> 

When comparing strings shouldn't 'eq' be used? 

I may be wrong but isn't

if ( my $buyer_email = 'robert@goff.com' )

always true? $buyer_email is declared and then assigned the string
'robert@goff.com' on this line, no?


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

Date: Fri, 28 Jul 2000 09:57:13 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: New Site: www.perlmodules.com
Message-Id: <39819F49.2D64EFEA@mail.uca.edu>

James wrote:
> 
> www.perlmodules.com
> 
> Please note of a new up and coming
> centralized site for all info
> regarding Perl Modules.  Any suggestions for what
> you would like to see on this site would be helpful.
> 
> www.perlmodules.com

Great, a pointer to CPAN, and nothing but. I guess you get a fee for the
banner ad every time someone opens your page? What a scam, I hope for
your sake you quit before your advertisers start suing.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: Fri, 28 Jul 2000 13:57:45 GMT
From: pooh23@my-deja.com
Subject: newb q - help with write to file script
Message-Id: <8ls3gm$flm$1@nnrp1.deja.com>

Hello,
I'm trying to get data from a survey form and write to a file.  I'm
getting syntax error when I test it out on my computer at lines 8 and
18.  Could someone tell what syntaxical errors I may have?

CODE:

#!/usr/perl/bin -w
use strict;

$printmail = 'data/surveydata.dat';

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'})

foreach split(/&/, $buffer) {            #line 8
($name, $value) = split(/=/, $buffer);

#maybe call function here that will parse hexidecimal

open(FILE, ">>$printmail") or die "Can't open file";
print FILE "$name";
print FILE "\n";
print FILE "$value";
close(FILE);
}          #line 18

print "Content-type: text/html\n\n";
print "<html><head><title>Thank you</title></head>\n";
print "<body><h1>Thank you for completing our survey!!</h1>";
print "</body>";

Thanks.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 28 Jul 2000 13:19:55 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <964789927.20675@itz.pp.sci.fi>

In article <39818224.695F4C80@tcgfinancial.com>, jtoy wrote:
>Really?  Sympathy?  Yeah, I want to dump the code, but our website for the time
>being is not being hosted here because our T1 isn't coming until next month and

Wonderful!  That means this thread will hopefully die out next month
as the problem becomes academic.

And no, you're not going to get what you want from this newsgroup, not
even if you spend the whole month whining for it, so why not go pester
someone else?  This is not the newsgroup you're looking for.

*plonk*

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.




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

Date: Fri, 28 Jul 2000 09:50:15 -0400
From: jtoy <jtoy@tcgfinancial.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <39818F97.E828E8E6@tcgfinancial.com>

I haven't whined once, but if you'd like I can pretend for you and maybe make your
post make sense.  If people like you stop posting, then the thread will end much
earlier then expected, but I'm telling you now, I'm going to reply to every comment
I see on my thread.  It seems like every commented posted is an insult said for no
reason, so as long as people like you who just want to talk shit when there is a
real job  that needs to get done, well then by all means keep going.  Also my smart
friend, if you have followed the thread you could probably see that I'm probably not
looking for answer to my problem anymore(context clues!).  If I'm pestering you,
then DONT READ THE FUCKING THREAD.

Ilmari Karonen wrote:

> In article <39818224.695F4C80@tcgfinancial.com>, jtoy wrote:
> >Really?  Sympathy?  Yeah, I want to dump the code, but our website for the time
> >being is not being hosted here because our T1 isn't coming until next month and
>
> Wonderful!  That means this thread will hopefully die out next month
> as the problem becomes academic.
>
> And no, you're not going to get what you want from this newsgroup, not
> even if you spend the whole month whining for it, so why not go pester
> someone else?  This is not the newsgroup you're looking for.
>
> *plonk*
>
> --
> Ilmari Karonen - http://www.sci.fi/~iltzu/
> "The screwdriver *is* the portable method."  -- Abigail
> Please ignore Godzilla and its pseudonyms - do not feed the troll.

--
Jason Toy
toyboy@toy.eyep.net
jtoy@tcgfinancial.com
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 09:51:50 -0400
From: jtoy <jtoy@tcgfinancial.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <39818FF6.450F1F4B@tcgfinancial.com>

I agree 100% percent

Jeff Yoak wrote:

> [posted and emailed]
>
> In article <8lq7d9$5dl$1@nnrp1.deja.com>, rbfitzpa@my-deja.com wrote:
>
> > Greg, Did you have any friends when you were growing up? Or are you
> > trying to impress the people here that you know the answer but don't
> > want to share it?
> >
>
> Christ.  I've been on about a three year break from Usenet and I've
> decided to read again, maybe answer some questions and see what's going on
> generally.  Greg's is one of the names I remember from when I was around
> here last time.  And he was always helping people.  It is because of posts
> like this that I left in the first place.  Lazy bastards who don't want to
> learn or understand, but instead want free handouts.  And the apologists
> who criticize the people who generally have spent years helping and
> contributing to the community, but who don't want to do free consulting
> for people who won't be the better for it.  Maybe usenet is pointless.
> And yes, if I learned anything, it should have been that posts like this
> one I'm making now don't help.
>
> Cheers,
> Jeff

--
Jason Toy
toyboy@toy.eyep.net
jtoy@tcgfinancial.com
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 14:15:44 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so35cgnpo0b175@corp.supernews.com>

In article <8lq7d9$5dl$1@nnrp1.deja.com>,
     <rbfitzpa@my-deja.com> wrote:

: Did you have any friends when you were growing up?

Yes, and I still have plenty.

:                                                    Or are you trying to
: impress the people here that you know the answer but don't want to share
: it?

I seriously doubt that anyone can know the answer based on the original
post (because of statements like "I think this is where the error is").
This isn't a free debugging service.

Greg
-- 
Bluto: My advice to you is to start drinking heavily.
Otter: Better listen to him, Flounder. He's pre-med.


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

Date: Fri, 28 Jul 2000 10:51:42 -0400
From: jtoy <jtoy@tcgfinancial.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <39819DFE.CC6C0706@tcgfinancial.com>

but all my friends told me it was!!!! humph!!
If this is the case Greg, you must vow not to answer the rest of the 90%
similar posts.

Greg Bacon wrote:

> In article <8lq7d9$5dl$1@nnrp1.deja.com>,
>      <rbfitzpa@my-deja.com> wrote:
>
> : Did you have any friends when you were growing up?
>
> Yes, and I still have plenty.
>
> :                                                    Or are you trying to
> : impress the people here that you know the answer but don't want to share
> : it?
>
> I seriously doubt that anyone can know the answer based on the original
> post (because of statements like "I think this is where the error is").
> This isn't a free debugging service.
>



>
> Greg
> --
> Bluto: My advice to you is to start drinking heavily.
> Otter: Better listen to him, Flounder. He's pre-med.






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

Date: Fri, 28 Jul 2000 14:39:34 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so36p6q7o0b96@corp.supernews.com>

In article <3980A843.A784C9A6@tcgfinancial.com>,
    jtoy  <toyboy@toy.eyep.net> wrote:

: I think you are right, after reading all his other comments, I saw that he
: gave almost no answers to his 30 or so replys.

I have 843 articles (posted to comp.lang.perl.{misc,moderated}) in
deja.com's incomplete archive.  Perhaps you should take a closer look.

:                                                 Most answers consisted of
: "read the man pages" or "use perl".

I typically conclude posts with a pointer to the appropriate
documentation.  Learning to search the documentation for answers to
questions is much more valuable than begging for handouts on Usenet.

:                                      I don't know about you, but reading
: Linux man pages is like trying to sort through shit.  Although I read all
: the ObenBSD man pages.

Oh, I see; you're just an ignorant, jeopardist troll.  Go back under
your bridge.

Greg
-- 
In a literary light, if UNIX is the Great Novel, Perl is the Cliffs Notes.
    -- Thomas Scoville


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

Date: Fri, 28 Jul 2000 14:41:05 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so36s1luo0b28@corp.supernews.com>

In article <39818F97.E828E8E6@tcgfinancial.com>,
    jtoy  <toyboy@toy.eyep.net> wrote:

: I haven't whined once, [...]

Bullshit.  Your position amounts to "Why won't you just debug my program
for free?  Waaaaaaaah!"  That's whining.

Greg
-- 
A list is only as strong as its weakest link.
    -- Knuth


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

Date: Fri, 28 Jul 2000 11:00:43 -0400
From: python <hell@hell.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A01B.37805179@hell.com>

Jeopordist troll?  I only read through tyour posts from doing a search here, so
I came up with about 30-40.  Ohh, looks like Greg is getting mad and wants to
talk some more shit. Usenet is for chatting whether it be porn, help, or just
chat.  The point is, if you don't want to help, then don't.  And please don't
put be down, because you are hurting my feelings.  I still dont understand your
last comment.  I hate hacker wannabes that like to talk shit, if you use OBSD,
then I will give you respect, but I don't give respect to shit talking perl
users.  Anyway, there is no point in riting in this thread because all it is is
pointless shit talking, so please go crawl under your bridge you troll.  I would
say that perl are the page numbers if Unix is the Novel.

Greg Bacon wrote:

> In article <3980A843.A784C9A6@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : I think you are right, after reading all his other comments, I saw that he
> : gave almost no answers to his 30 or so replys.
>
> I have 843 articles (posted to comp.lang.perl.{misc,moderated}) in
> deja.com's incomplete archive.  Perhaps you should take a closer look.
>
> :                                                 Most answers consisted of
> : "read the man pages" or "use perl".
>
> I typically conclude posts with a pointer to the appropriate
> documentation.  Learning to search the documentation for answers to
> questions is much more valuable than begging for handouts on Usenet.
>
> :                                      I don't know about you, but reading
> : Linux man pages is like trying to sort through shit.  Although I read all
> : the ObenBSD man pages.
>
> Oh, I see; you're just an ignorant, jeopardist troll.  Go back under
> your bridge.
>
> Greg
> --
> In a literary light, if UNIX is the Great Novel, Perl is the Cliffs Notes.
>     -- Thomas Scoville

--
Jason Toy
toyboy@toy.eyep.net
jtoy@tcgfinancial.com
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 11:01:47 -0400
From: python <hell@hell.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A05A.9714384F@hell.com>

OK, sure, then you are...............I have nothing else better to do then
bitch and whine to others. Waaaah! thats whining too.

Greg Bacon wrote:

> In article <39818F97.E828E8E6@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : I haven't whined once, [...]
>
> Bullshit.  Your position amounts to "Why won't you just debug my program
> for free?  Waaaaaaaah!"  That's whining.
>
> Greg
> --
> A list is only as strong as its weakest link.
>     -- Knuth

--
Jason Toy
toyboy@toy.eyep.net
jtoy@tcgfinancial.com
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 14:50:09 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so37d1f5o0b92@corp.supernews.com>

In article <39819DFE.CC6C0706@tcgfinancial.com>,
    jtoy  <toyboy@toy.eyep.net> wrote:

: but all my friends told me it was!!!! humph!!

Didn't we already talk about argumentum ad populum?

: If this is the case Greg, you must vow not to answer the rest of the 90%
: similar posts.

If this group were to become a free debugging service, I can guarantee
you that I wouldn't be posting.

Greg
-- 
The magic words are squeamish ossifrage.


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

Date: Fri, 28 Jul 2000 11:08:57 -0400
From: jtoy <toyboy@toy.eyep.net>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A209.C9C9BB7A@toy.eyep.net>

Well, my actual thought was,  "If you guys have time and want to try to debug
this, then go ahead and help, I have no perl experience but my work is
requiring that I fix this for them."  And since I help others for free and
others help me with my python, C, and tcl problems, I thought that the perl
group would be able to help.  Especially since perl is open source too, but I
guess not, sorry for even bothering.  Obviously thats not what I want now( I
already know it ain't going to happen). All this trhead is now is
Philosophical BS that doesn't even make sense.

python wrote:

> OK, sure, then you are...............I have nothing else better to do then
> bitch and whine to others. Waaaah! thats whining too.
>
> Greg Bacon wrote:
>
> > In article <39818F97.E828E8E6@tcgfinancial.com>,
> >     jtoy  <toyboy@toy.eyep.net> wrote:
> >
> > : I haven't whined once, [...]
> >
> > Bullshit.  Your position amounts to "Why won't you just debug my program
> > for free?  Waaaaaaaah!"  That's whining.
> >
> > Greg
> > --
> > A list is only as strong as its weakest link.
> >     -- Knuth
>
> --
> Jason Toy
> toyboy@toy.eyep.net
> jtoy@tcgfinancial.com
> http://toy.eyep.net

--
Jason Toy
toyboy@toy.eyep.net
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 14:55:05 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so37m9dfo0b135@corp.supernews.com>

In article <3980A738.C45AD401@tcgfinancial.com>,
    jtoy  <toyboy@toy.eyep.net> wrote:

: You are right smartass, I don't have a clue, and as I expressed in my
: first post(did you read it?!?!??!?) I don't use perl, and I don't
: intend on using perl,

comp.lang.perl.misc is a discussion newsgroup for Perl programmers.  If
you aren't a Perl programmer and have no such aspiration, then you have
no business posting here.

Go away.

Greg
-- 
Petty laws breed great crimes.
    -- Ouida


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

Date: Fri, 28 Jul 2000 11:09:36 -0400
From: jtoy <toyboy@toy.eyep.net>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A230.3489DBE6@toy.eyep.net>

OK Greg, will you be happy if I say you win?

Greg Bacon wrote:

> In article <39819DFE.CC6C0706@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : but all my friends told me it was!!!! humph!!
>
> Didn't we already talk about argumentum ad populum?
>
> : If this is the case Greg, you must vow not to answer the rest of the 90%
> : similar posts.
>
> If this group were to become a free debugging service, I can guarantee
> you that I wouldn't be posting.
>
> Greg
> --
> The magic words are squeamish ossifrage.

--
Jason Toy
toyboy@toy.eyep.net
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 14:56:10 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <so37oafko0b127@corp.supernews.com>

In article <3980A8CB.7B2A86CD@tcgfinancial.com>,
    jtoy  <toyboy@toy.eyep.net> wrote:

: Oh and one more thing, I always try to read before I ask others.  95% of the
: stuff I do was self taught, but I am not going to waste my time learning how
: to do something in a language I don't even use.

Then please do us the courtesy of not begging for handouts in our
newsgroup.  Go to alt.sources.wanted or some other more appropriate
group.

Greg
-- 
Nothing defines humans better than their willingness to do irrational things
in the pursuit of phenominally unlikely payoffs. 
    -- Scott Adams


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

Date: Fri, 28 Jul 2000 11:11:32 -0400
From: jtoy <toyboy@toy.eyep.net>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A2A4.73450B1E@toy.eyep.net>

Oh, I didnt know that, can you please tell me where it says only for
developers?  I have business here if it has to do with perl son.

Greg Bacon wrote:

> In article <3980A738.C45AD401@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : You are right smartass, I don't have a clue, and as I expressed in my
> : first post(did you read it?!?!??!?) I don't use perl, and I don't
> : intend on using perl,
>
> comp.lang.perl.misc is a discussion newsgroup for Perl programmers.  If
> you aren't a Perl programmer and have no such aspiration, then you have
> no business posting here.
>
> Go away.
>
> Greg
> --
> Petty laws breed great crimes.
>     -- Ouida

--
Jason Toy
toyboy@toy.eyep.net
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 11:12:09 -0400
From: jtoy <toyboy@toy.eyep.net>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A2C9.E9B11197@toy.eyep.net>

If you weren't being an asshole, I guarantee I wouldn't be posting

Greg Bacon wrote:

> In article <39819DFE.CC6C0706@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : but all my friends told me it was!!!! humph!!
>
> Didn't we already talk about argumentum ad populum?
>
> : If this is the case Greg, you must vow not to answer the rest of the 90%
> : similar posts.
>
> If this group were to become a free debugging service, I can guarantee
> you that I wouldn't be posting.
>
> Greg
> --
> The magic words are squeamish ossifrage.

--
Jason Toy
toyboy@toy.eyep.net
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 11:13:37 -0400
From: jtoy <toyboy@toy.eyep.net>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <3981A321.F3E9BB5D@toy.eyep.net>

Damn Greg, are you going to reply to everythiung?  I have other stuff to do and
I'm syure you do too.  I'm not asking for a handout and as you can see from
following this thread, there is no talk about the first post, just stupid
comments.

Greg Bacon wrote:

> In article <3980A8CB.7B2A86CD@tcgfinancial.com>,
>     jtoy  <toyboy@toy.eyep.net> wrote:
>
> : Oh and one more thing, I always try to read before I ask others.  95% of the
> : stuff I do was self taught, but I am not going to waste my time learning how
> : to do something in a language I don't even use.
>
> Then please do us the courtesy of not begging for handouts in our
> newsgroup.  Go to alt.sources.wanted or some other more appropriate
> group.
>
> Greg
> --
> Nothing defines humans better than their willingness to do irrational things
> in the pursuit of phenominally unlikely payoffs.
>     -- Scott Adams

--
Jason Toy
toyboy@toy.eyep.net
http://toy.eyep.net




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

Date: Fri, 28 Jul 2000 15:02:20 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <so383ss9o0b116@corp.supernews.com>

In article <S96g5.7901$f_5.33245@news1.rdc1.ct.home.com>,
    Decklin Foster <decklin+usenet@red-bean.com> wrote:

: Greg Bacon <gbacon@HiWAAY.net> writes:
: 
: > : What's wrong with procmail?
: > 
: > Plenty. :-)
: 
: It's all about context... If you can educate the OP enough so that he
: starts complaining to me about procmail's problems, I will buy you a
: drink. ;-)

See Simon Cozens' article in the upcoming issue of TPJ.

Does that qualify me for a keg of Guinness? :-)

Greg
-- 
I went to a bookstore and asked the saleswoman, "Where's the self-help
section?"; She said if she told me, it would defeat the purpose.
    -- George Carlin


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

Date: Fri, 28 Jul 2000 13:13:25 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: os type
Message-Id: <39858695.51423436@news.newsguy.com>

bernard.el-hagin@lido-tech.net (Bernard El-Hagin) wrote:
>Paul Schwann <paul.schwann@systemonic.de> wrote:

>>is there a way to determine the os or at least the platform type within
>>a perl script? (like os == "WINDOWS", os == "UNIX", os == "SOLARIS"
>>etc.)
>
>perldoc perlvar

Paul might also want to read perlop to review the difference
between == and eq.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: 28 Jul 2000 14:25:31 GMT
From: Justin McNutt <mcnuttj@nin.iats.missouri.edu>
Subject: Reference question (was Callback in SNMP module)
Message-Id: <8ls54r$6ia$1@dipsy.missouri.edu>

Got another question w.r.t. refs that has sprung from the shorter
syntax I learned from the aforementioned thread.

When I do this:

#use strict;
use SNMP;
 ...
print "Received error $sess->{ErrorStr} querying ",$vb->[tag],".",$vb->[iid],".\n";

I get:

Unquoted string "tag" may clash with future reserved word at [blah].pm line 34.
Unquoted string "iid" may clash with future reserved word at [blah].pm line 34.

If I uncomment 'use strict;' it won't compile at all.

In other modules where I have used such variables, I have always done:

$vb->[$SNMP::Varbind::tag_f]

or circumvented the entire problem like this:

$var = $sess->getnext($vb); # $var = $vb->[val_f] after this.

Ideas?

My thanks for the help I have gotten so far.  I feel I'm close to fully
grasping refs in perl (I created my first sub that uses "\%thishash" correctly
today!  Woo hoo!) and your advice has helped significantly.

--J


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

Date: Fri, 28 Jul 2000 14:09:13 GMT
From: Margarit Nickolov <man@rila.bg>
Subject: Re: regexp match inside a time interval ?
Message-Id: <8ls464$g6q$1@nnrp1.deja.com>

In article <MPG.13ea329f29f83e0e98abf5@nntp.hpl.hp.com>,
  Larry Rosler <lr@hpl.hp.com> wrote:
> In article <8lootb$20c$1@nnrp1.deja.com> on Thu, 27 Jul 2000 07:38:19
> GMT, man@rila.bg <man@rila.bg> says...
> > Hello All, need a help, question follows:
> >   I want if some regexp has not matched for a specified time(1-2
secs),
> > then the match statement should be interrupted(some flag set) and
> > script continues the statement after regexp match.
> >
> > example of what I need:
> >
> > if( m/complex regexp over huge string(file)/ ) {
> >   #ok
> > }
> >
> > if( $failure_flag ) { # if failure, then flag is set
> >   #failure
> > }
>
> perlfaq8: "How do I timeout a slow event?"


I have already tried this, but when control is returned from alarm-sub,
macthing the pattern continues(control is not passed on the statement
after, what I really need). May be I miss something, here is example of
the code, which does NOT work:

package filters::lib::Weather_generic;

use strict;
use vars qw/$errstr/;

sub fetch {
    undef $errstr;
    my $url = shift;
    local $_ = shift; # content of HTML-page
    my %result = ();
    my $host;

    local $SIG{ALRM} = sub { $errstr = "Can not parse
'$url'(timeouted)\n";
warn "caught ALRM:$errstr";  return (); };
    alarm 1; # if not matched for that time, probably will never match.

    # $1 - city, $2 - img_src, $3 - img_alt(cloudy...), $4 - curr_temp
    $url =~ m|^(http://)?[^/]+|; # only host is not stripped
    $host = $&;

  if(
m/<p>\s*(\d+)\s*<\/p>.*?<font\s+face=.*?>\s*<b>\s*([^,]+).*?<img\s+src="([^"]
+).*?<font face=.*?>\s*<b>\s*([^<]*).*?Current Temp:\s*<b>([.\d]+)/ios ) { 
%result = ('zip' => $1, 'city' => $2, 'img_src' => "$host$3", 'img_alt' =>
$4, 'curr_temp' => $5); } else {  $errstr = "Can not parse '$url'\n";  return
(); }#if match	alarm 0;  return () if defined $errstr; #alarm is caught 
return %result; }#fetch


1;


                     best regards, margarit nickolov.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 28 Jul 2000 13:37:37 GMT
From: worc99@my-deja.com
Subject: Secure Encapsulated one-time Login
Message-Id: <8ls2b0$eoh$1@nnrp1.deja.com>

Hello,

I am trying to provide an encapsulated login for 3 web based systems.
You can log into each one of them with the same user and pass as the
others.  I wish to provide one log in page, where you choose which one
you want to login to.  I have done this.  Also, within any of them, I
want to be able to click a link and autologin to one of the others, to
start using that.  I am trying to use cookies for this.  I write their
username and password to a cookie at the initial login.  The values in
this cookie will be encoded by javascript methods in a seperate
javascript source file.  I need to know if this is secure.  Provided
they have cookie support and it is turned on, will this work alright?
I am deleting the cookie when the log out, as well as having it expire
after a certain time period in case they don't log out.  Is encoding
the password in the cookie enough?  I have no access ot the login
scheme itself for these services, so I can't change anything there.  Is
their a better way I can do logins securely using cgi or something?
Cookies seems to be the way where the clear text password is
transferred the least.  It is only transferred right at login, which I
do not control.  Any ideas?

Jonathan


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 28 Jul 2000 16:02:40 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Secure Encapsulated one-time Login
Message-Id: <Pine.GHP.4.21.0007281601170.17525-100000@hpplus03.cern.ch>

On Fri, 28 Jul 2000 worc99@my-deja.com wrote:

> I am trying to provide an encapsulated login for 3 web based systems.

You also seem to be trying for the Guinness record in multiposting.





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

Date: Fri, 28 Jul 2000 14:30:43 GMT
From: Pasquale <pdmos23@geocities.com>
Subject: Re: strict and subroutine variables
Message-Id: <39819ADF.5336C83E@geocities.com>

Let me re-word the question.  How do I get the value of a declared variable in
one subroutine passed to another subroutine?


nobull@mail.com wrote:

> Pasquale <pdmos23@geocities.com> writes:
>
> > I have some code(below) in a subroutine, that assigns a number.  I need
> > that number/variable to be passed to another subroutine further down for
> > use.  I read strict, subroutine & variable articles, but they don't seem
> > to have what I'm asking (or I don't see it).
>
> The code you quote seems to be unrelated to what you are talking about here.
> I suspect you are asking a question that doesn't exist.
>
> >  The closest I've come,
> > with the code below, is the number is incremented by 2, i.e.: 2, 4, 6,
> > etc.,  not by one.  Why?
>
> Most likely you are calling sub Number twice.
>
> Please post a small self contained bit of code (_not_ a fragment) that
> illustrates your problem - I suspect the problem is not in the
> fragment you posted.
>
> >  However, the number is displayed.
> > I was finished my scripts, but after reading what some of you had to say
> > about "use strict" and how it is an important part of a script, I added
> > it in.
> > If there are any suggestions or articles I can read, please advise.
>
> See FAQ: "I still don't get locking.  I just want to increment the
> number in the file.  How can I do this?"
>
> See also the module File::CounterFile.
>
> Not that either of these actually address your question - they address
> other bugs in your code.
>
> --
>      \\   ( )
>   .  _\\__[oo
>  .__/  \\ /\@
>  .  l___\\
>   # ll  l\\
>  ###LL  LL\\



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

Date: Fri, 28 Jul 2000 13:58:25 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: To sys op - get me off your email list
Message-Id: <5kgg5.2$82.55@news.dircon.co.uk>

On Wed, 26 Jul 2000 20:19:18 -0800, Gerald Newton Wrote:
> For months I have been getting perl messages asking questions about perl
> coming from this news group.  It is my understanding that recent federal
> regulations will allow me to sue on this.  I do not want any email about
> perl from this news group.


Wahaay - He's back.


/J\


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

Date: Fri, 28 Jul 2000 16:06:33 +0200
From: Jimmy Lantz <jimmy.lantz@ostas.lu.se>
Subject: Re: ttt
Message-Id: <3981936A.98824067@ostas.lu.se>

Œ* Œ* Œ*£°
ttt”– **¥“‚Àº?

Xin Li wrote:
> 
> ttt


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

Date: Fri, 28 Jul 2000 10:53:56 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: When I use LIKE I get an error in ASP
Message-Id: <39819E84.6280D4AF@westat.com>


Anthony Roberts-West wrote:
> 
> I am currently learning how to use ASP and Access.
> 
> What am I doing wrong?

Asking a totally non-Perl related question in a Perl newsgroup.

Henry Hartley


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

Date: Fri, 28 Jul 2000 17:59:20 +0300
From: Sasa Danicic <Sasa.Danicic@eurodyn.com>
Subject: Wraping file with XML code
Message-Id: <39819FC8.CC279424@eurodyn.com>

I've need to wrap a binary file with a portion of XML-like code.
XML-like code is something so called "an envelope".

How can I wrap a binary file with an envelope, in fact how can I read
the file first and at last add some XML-ish string at the beggining of
the file?

Type of file is not important: DOC, PDF, PostScript, JPG, HTML, ...

Sasa


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

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 V9 Issue 3832
**************************************


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