[16416] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3828 Volume: 9

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

Date: Thu, 27 Jul 2000 21:05:11 -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: <964757111-v9-i3828@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 27 Jul 2000     Volume: 9 Number: 3828

Today's topics:
    Re: Boost your bottom line <uri@sysarch.com>
    Re: Bowling for strings (was: shifting strings ) (Keith Calvert Ivey)
    Re: Bowling for strings (was: shifting strings ) <lauren_smith13@hotmail.com>
    Re: Callback in SNMP module <mcnuttj@nin.iats.missouri.edu>
    Re: Callback in SNMP module <mcnuttj@nin.iats.missouri.edu>
    Re: Delete records in 2 weeks time <jaurangNOjaSPAM@crosswinds.net.invalid>
    Re: Do I Need Chomp? <was Critiques, please> (Decklin Foster)
    Re: File path, Select value, Redirect Basic =?iso-8859- mandbinc@rocketmail.com
    Re: Generate XML then convert to HTML using XSLT in Per <ursted@my-deja.com>
    Re: Hash within an array problem <skv@iis.nsk.su>
        Help with SQL query in Perl script <msegulja@yahoo.com>
        Help: Date Match Problem in SQL/ DBD Oracle yudelin@my-deja.com
    Re: How to use "touch" in perl <mcnuttj@nin.iats.missouri.edu>
    Re: I need a magic spell! (Abigail)
    Re: Making and extracting from XML-like string (Mark W. Schumann)
        MTA/POP3 server in Perl <atrus@atrustrivalie.eu.org>
    Re: newb Q, Our perl guy left!! (Mark W. Schumann)
    Re: newb Q, Our perl guy left!! ()
    Re: newbie question, can a perl program run 24/7 (Decklin Foster)
    Re: newbie question, can a perl program run 24/7 drdementor@my-deja.com
    Re: newbie question, can a perl program run 24/7 drdementor@my-deja.com
    Re: OK, how do I put a variable in a regexp? <skv@iis.nsk.su>
    Re: Perl & MS Personal Web Srvr <ivoz@starmail.com>
    Re: plotting graph (Gwyn Judd)
    Re: Q: Perl & MS Personal Web Srvr <dburch@teleport.com>
    Re: WHOIS not standart query HELP!!! ilbot@my-deja.com
    Re: XSUB returning a LoL <dan@tuatha.sidhe.org>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 28 Jul 2000 03:03:12 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Boost your bottom line
Message-Id: <x7vgxr553l.fsf@home.sysarch.com>

>>>>> "m" == mugg  <mugg@kremjamy.mil> writes:
                                  ^^^

  m> Turn your computer into a large scale Usenet news posting machine.
  m> Capture a worldwide audience in an instant!

i wonder how the .us military will handle spammers who use or forge
their addresses. is 20 years of hard labor too much to ask for?

uri

<original headers>

From: mugg@kremjamy.mil
Subject: Boost your bottom line
Newsgroups: comp.lang.perl.misc
Date: 28 Jul 2000 00:02:41 GMT
Organization: LinkAGE Online a PSINet Company
Path: typhoon.ne.mediaone.net!chnws05.ne.mediaone.net!24.147.2.43!chnws02.mediaone.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.direct.ca!look.ca!news-out.nibble.net!news-in.nibble.net!feed.newsfeeds.com!newsfeeds.com!news.netfront.net!news.hk.linkage.net!not-for-mail
Lines: 50
Message-ID: <3sd5ia$ldu$0@news.hk.linkage.net>
NNTP-Posting-Host: 210.184.56.2
X-Trace: news.hk.linkage.net 964743646 25314 210.184.56.2 (28 Jul 2000 00:20:46 GMT)
X-Complaints-To: abuse@hk.linkage.net
NNTP-Posting-Date: 28 Jul 2000 00:20:46 GMT
Xref: chnws05.ne.mediaone.net comp.lang.perl.misc:258307

<snip>


-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 28 Jul 2000 00:38:14 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Bowling for strings (was: shifting strings )
Message-Id: <3983d5e2.6182414@news.newsguy.com>

"Lauren Smith" <lauren_smith13@hotmail.com> wrote:

>$str1 = 'abcd';
>$str2 = reverse join '', (map chop, split //, reverse $str1)[1..length
>$str1];
>
>I don't know why it gives me an uninitialized value warning, though.

Because the last element of the list has index length($str1) -
1, not length $str1.

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


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

Date: Thu, 27 Jul 2000 18:40:57 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Bowling for strings (was: shifting strings )
Message-Id: <8lqo9c$tco$1@brokaw.wa.com>


Keith Calvert Ivey <kcivey@cpcug.org> wrote in message
news:3983d5e2.6182414@news.newsguy.com...
> "Lauren Smith" <lauren_smith13@hotmail.com> wrote:
>
> >$str1 = 'abcd';
> >$str2 = reverse join '', (map chop, split //, reverse $str1)[1..length
> >$str1];
> >
> >I don't know why it gives me an uninitialized value warning, though.
>
> Because the last element of the list has index length($str1) -
> 1, not length $str1.

Heh heh...  I was hoping that comment got buried...

You are totally correct.

Thanks,

Lauren
--
print map{y/a-z//d;$x.="+ $_";chr (eval $x)}
'a74b43-c2de1-84f33g45hi1jk5-12-m3n13-82o48p21q13-r6-76s40t25uv2wx8-y6z13-81
' =~ /(.{3})/g




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

Date: 28 Jul 2000 01:33:05 GMT
From: Justin McNutt <mcnuttj@nin.iats.missouri.edu>
Subject: Re: Callback in SNMP module
Message-Id: <8lqnsh$vhp$1@dipsy.missouri.edu>

Peter J Scott <peter@psdt.com> wrote:
> In article <8li6kf$vb3$1@dipsy.missouri.edu>,
>  Justin McNutt <mcnuttj@nin.iats.missouri.edu> writes:
>>> Okay, I've looked all over the place (including 'perldoc SNMP' over and
>>> over) and I can't figure out how to do this.

> I haven't used the SNMP module, but maybe I can help with this bit:

>>My problem now seems to be understanding references (I think).

> You're doing pretty well if this is your first encounter with references.

>>So given this much, which part of the references to either @vb or the
>>data contained therein am I screwing up?  I'd like to be able to print
>>like this (or the correct equivalent):
>>
>>print "$vb[$x]->[$SNMP::Varbind::val_f] is the data returned.\n";

> Not quite: you just call the pre-defined method instead of pretending you know the object
> implementation:

> print $vb[$x]->val, " is the data returned.\n";

<nods>  Works, and is at least part of the problem.  I didn't know you can't do:

print "$vb[$x]->val is the data returned.\n";

The $vb[$x]->val part has to be outside the stringified part.  <shrug>  No big deal,
especially compared to how much *shorter* the code is that way.  Do you know how many
instances of "blah blah ->[$SNMP::Varbind::iid_f]" can be shortened now?  Cool...

I have only tested doing it this way in a trivial script, although the results suggest
that I am very, very close.  Lemme go modify the "real" one and see how it goes.

Thanks very much!

--J


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

Date: 28 Jul 2000 02:45:47 GMT
From: Justin McNutt <mcnuttj@nin.iats.missouri.edu>
Subject: Re: Callback in SNMP module
Message-Id: <8lqs4r$63s$1@dipsy.missouri.edu>

Okay, the problem has changed..

Consider the following snippet:

#!/usr/bin/perl

use SNMP;

$SNMP::use_sprint_value=1;
&SNMP::initMib();

$ip = $ARGV[0];
$comm = $ARGV[1];

for ( my $x = 0 ; $x < 255 ; $x++ ) {
        $fullip = $ip.'.'.$x;
        $sess[$x] = new SNMP::Session(DestHost => $fullip, 
		Community => $comm, 
		Retries => 1, 
		Timeout => 1000000);
        $mib = 'sysDescr';
        $vb[$x] = new SNMP::Varbind([$mib]);
        print "VB is ",$vb[$x]->[obj],".  SESS is ",$sess[$x]->{ErrorStr},".\n";
        $sess[$x]->getnext($vb[$x], [\&poller, $sess[$x], $x]);
}

SNMP::MainLoop(10);

for ( my $x = 0 ; $x < 255 ; $x++ ) {
        print $vb[$x]->val," is the value.\n";
}

print "Done.\n";

die "\n";

sub poller {
        if ( $_[0]->{ErrorNum} ) {
                print "Error was ",$_[0]->{ErrorStr},".\n";
        }
}

----End snippet----

All goes well until the line where 'getnext' is called.  Then I get the error:

Can't call method "getnext" on unblessed reference at [blah blah] line 17.

I have no real idea of what "bless" does (although I read the section in
'man perlfunc' on it), but I do know that the problem is with $sess[$x].  If
I try "bless $sess[$x]" on it, I get this:

Can't locate object method "getnext" via package "main" at [blah blah] line 18.

Tried one last thing.  The man entry for bless says that a CLASSNAME ought to
be specified, and that CLASSNAME is the name of a package.  So after poking
around in the code for SNMP.pm, I decide that:

	$this = $sess[$x];
	bless $this,SNMP::Session;

would be a good idea.

Wrong.  Segmentation fault.

I give up.  What am I getting wrong with $sess[$x]?

Thanks for the help so far!  This has been most educational.

--J



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

Date: Thu, 27 Jul 2000 18:51:31 -0700
From: Taurean <jaurangNOjaSPAM@crosswinds.net.invalid>
Subject: Re: Delete records in 2 weeks time
Message-Id: <0146ce5a.9abac41e@usw-ex0108-061.remarq.com>

Thanks trwww. But how do I extract the reference number and
then compare with time()? My record contains HTML tags and
is absorbed into this message. It won't should up here.
Basically, here is how it looks like (ignore the {}
brackets):

{HTML tags}Reference: 9xxxxxxxx{line break}{HTML tags}

The ref no is 9 characters long and starts with a 9. Any
ideas on how to do it?



* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Fri, 28 Jul 2000 02:31:15 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: Do I Need Chomp? <was Critiques, please>
Message-Id: <Tf6g5.7904$f_5.33245@news1.rdc1.ct.home.com>

BUCK NAKED1 <dennis100@webtv.net> writes:

> Thanks for the info Decklin and Bart. Now, I'm confused. Decklin
> says chomp is not needed and Bart says that it is. 

I'd go with Bart's answer, because he's considering the possibility
that you remove $num++ at some point in the future, which you may well
do (especially if you are cutting and pasting into a program which
serves some other purpose). I wasn't.

In the strict sense, chomp is not needed in your program (as best as I
can remember it from yesterday). But in general, you need to know when
to use it and when not to.

You shouldn't have to wonder about this if you understand what chomp
*does*. Between Bart's reply and `perldoc -f chomp` you should be able
to figure it out.

> a matter of taste or opinion... similar to those who contested
> Abigail's order of using print before truncate?

*blinks* hmm, off to Deja...

-- 
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)


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

Date: Fri, 28 Jul 2000 03:25:14 GMT
From: mandbinc@rocketmail.com
Subject: Re: File path, Select value, Redirect Basic =?iso-8859-1?Q?=3F=92s?=
Message-Id: <8lquen$lun$1@nnrp1.deja.com>

Hey, thanks for the encouragement.  I am a beginner Perl programmer and
don't know what to try (I posted the one thing I tried with respect to
grabbing the value in the <SELECT> HTML command, that being:
$value=param('select').  I've been searching the web and reading
discussions for the last week on how to do these things - no luck.

I'm not looking for a free script.  I am looking for a little advice,
maybe a command or snipet of code that will get me headed in the right
direction.

Hopefully not everyone responds the way you do.


In article <slrn8o0chb.61h.bernard.el-hagin@gdndev25.lido-tech>,
  bernard.el-hagin@lido-tech.net wrote:
> On Thu, 27 Jul 2000 12:24:54 GMT, mandbinc@rocketmail.com
> <mandbinc@rocketmail.com> wrote:
> >Is there something that I need to explain better?
>
> Yeah, you need to explain what you have tried already and what
problems
> you ran across when you did.
>
> >I'm pretty confident that these are basics issues for the expert Perl
> >programmers that visit this discussion....
>
> Which doesn't mean you'll get a working script for free just because
it
> would be easy for someone to provide you with one. It doesn't work
that
> way.
>
> Bernard
> --
> perl -le 'open(JustAnotherPerlHacker,"")or$_="B$!e$!r$!n$!a$!r$!d$!";
> print split/No such file or directory/;'
>


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


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

Date: Fri, 28 Jul 2000 03:05:53 GMT
From: Phil Ursted <ursted@my-deja.com>
Subject: Re: Generate XML then convert to HTML using XSLT in Perl
Message-Id: <8lqtaf$l4k$1@nnrp1.deja.com>




I took a brief look at this, but it seems to be geared towards more
static XML files which have stylesheets applied to them dynamically, or
pages with snippets of code (XSP with Perl) embedded in them.

What I was hoping to do was have the CGI generate the XML dynamically
based on user input to a form, then apply one of several XSL transforms
to the result to produce HTML. i.e. there is no pre-existing XML file,
just the CGI.

Is there a clean way to use AxKit from Apache::Registry, since they are
both based on mod_perl ? Or should I think about rewriting completely or
using something else?

In article <397D407D.3F66A9A4@sergeant.org>,
  Matt Sergeant <matt@sergeant.org> wrote:

>
> You need AxKit then, http://axkit.org/ - its entirely written in Perl
(with
> some compiled bits for speed).
>


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


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

Date: Tue, 25 Jul 2000 13:13:13 +0600
From: "Konstantin Stupnik" <skv@iis.nsk.su>
Subject: Re: Hash within an array problem
Message-Id: <8ljbta$2kt0$1@nl.novosoft.ru>

Hi!

> I am having a problem assigning information to an hash array withs
> belongs to a normal array.
>
> Example.
>
> #!/usr/bin/perl
>
> local @my_array=();
>
> assign();
> display();
>
> # assign data to my hashes
> sub assign
> {
>     for ($i=0; $i < 5; $i++)
>     {
>         $my_array[$i]={};
>
>         %my_hash=$my_array[$i];
>
>         $my_hash{index}="entry_$i";
>     }
>     print "@my_array\n";
> }
>
> # retrieve the data from the hashes and printout the result.
> sub display
> {
>     for ($i=0; $i < 5; $i++)
>     {
>         $my_hash=$my_array[$i];
>         print "Value of $i is $my_hash{index}\n";
>     }
> }
>
> The output will be:
>
> Value of 0 is entry_4
> Value of 1 is entry_4
> Value of 2 is entry_4
> Value of 3 is entry_4
> Value of 4 is entry_4
>
> Why is that?  Why isn't the output:
>
> Value of 0 is entry_0
> Value of 1 is entry_1
> Value of 2 is entry_2
> Value of 3 is entry_3
> Value of 4 is entry_4
>
> The following statement...
>
> print "@my_array\n";
>
> in the first subroutine, perl prints out five defferent references as
> such:
>
> HASH(0x7a938) HASH(0x7ab84) HASH(0x7ab90) HASH(0x7aba8) HASH(0x7abc0)
>
> Anyone understand what is happening.

First of all, I think you confusung hash and ref to hash.
{} is constructor of ref to hash.

There should be something like this:

foreach(0..4)
{
  my %hash;
  $hash{index}="entry_$_";
  $my_array[$i]=\%hash;
}

or probably

foreach(0..4)
{
  push @my_array,{index=>"entry_$_"};
}

And access hash ref with code like this:

forach(0..4)
{
  my $hashref=$my_array[$_];
  print "Value of $_ is $$hashref{index}\n";
}

--
Best regards,
      Konstantin.





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

Date: Wed, 26 Jul 2000 22:45:07 -0500
From: Michael Segulja <msegulja@yahoo.com>
Subject: Help with SQL query in Perl script
Message-Id: <397FB043.E383E116@yahoo.com>

I am learning Perl 5, and following along with a tutorial I found on the
Internet.  First, here's my setup... Mandrake Linux 7.1 server, Apache
Web Server, MySql database, and Perl 5.  Basically, the tutorial walks
through creating a simple MySql database called Clients, a MySql user I
named webdb, and a CGI script in Perl that will create a nice looking
form that, after entering certain criteria, will return a query from the
database.  My question is how do I test this to find out why it doesn't
work?  I know there are no typos, so I'm guessing it's probably some
setup problem.  When I load the form in my web browser, I just get a
blank screen.  I don't really know what to do to see what's happening
behind the scenes.  As far as I can tell, I'm not even getting an
attempted connection to the database, and I have no idea why.

I know this might sound like I'm fumbling in the dark, but it's quite a
lot to try to digest all at once, between getting Apache working like I
want it, Perl like I want it, and then setting up MySql.  Thank you in
advance for any help.


Michael





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

Date: Fri, 28 Jul 2000 02:32:55 GMT
From: yudelin@my-deja.com
Subject: Help: Date Match Problem in SQL/ DBD Oracle
Message-Id: <8lqrcn$jqk$1@nnrp1.deja.com>

Hi,

It seems that Oracle date functions may screw up the query when I run
it in Perl. A simple query like this:

Select table1.compid
	from table1, table2
	where table1.id=table2.id
	and table1.status in (350,360)
	and table1.date1=to_date(sysdate+7)
	and table2.item='scs12'

This query run well in Oracle SQL Worksheet. But when I run it in Perl
it couldn't get data for me (same problem when I replaced sysdate+7
with a Perl-generated date). The problem was in  " table1.date1=to_date
(sysdate+7)". When I used "table1.date1 < to_date(sysdate+7)" it worked
fine. It was also fine when I only selected data from one table. For
example I can run this in Perl:
Select compid
	from table1
	where status in (350,360)
	and date1=to_date(sysdate+7)

Basically the problem came out when I joined two tables and tried to
include a date match: " date1 = to_date ...". I had same problem when I
changed to compare characters (e.g., using to_char to compare '03-AUG-
00' = '03-AUG-00'). But this kind of query also worked in Oracle SQL
worksheet.

I don't know if this is a problems in PERL DBI and DBD ORacle. Anybody
had similar experience? Any solutions?

Thank you.

Yude
email: ylin@tradeloop.com / yudelin@go.com


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


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

Date: 28 Jul 2000 03:10:23 GMT
From: Justin McNutt <mcnuttj@nin.iats.missouri.edu>
Subject: Re: How to use "touch" in perl
Message-Id: <8lqtiv$7fp$1@dipsy.missouri.edu>

Larry Rosler <lr@hpl.hp.com> wrote:
> In article <so17jvgb3j124@corp.supernews.com> on Thu, 27 Jul 2000 
> 20:41:35 GMT, Greg Bacon <gbacon@HiWAAY.net> says...
>> In article <1eeg96o.10h3f3e1uhjkxsN%otto.wyss@bluewin.ch>,
>>     Otto Wyss <otto.wyss@bluewin.ch> wrote:
>> 
>> : I'd like to set the modification time of files to the value of a
>> : reference file. While in a shell I could use touch, i.e.
>> : 
>> :         touch -r foo bar
>> : 
>> : How can I accomplish this in perl? It seems I'm to stupid to figure out
>> : how to call touch in perl or to find the right built-in function.
>> 
>> Read at the documentation for the system() operator in the perlfunc
>> manpage.

> If each of the files already exists, then the utime() function is better 
> than going to an external command.  You also need the times of the 
> reference file in epoch seconds (as returned by stat()).

> perldoc -f utime
> perldoc -f stat

Actually, I intended to attack this problem in one of my scripts later, but
since it has already come up...

Suppose the file does not already exist.  Will this work?

open DUMMY,">>file";
close DUMMY;

 ...and *then* do the utime() trick mentioned in the man pages?

My purpose, for instance, is to create a zero-byte file, change its
permissions to rw-rw-rw-, and then use it as a target for a TFTP upload
(tftpd insists that anonymous uploads be sent to a world-writable file).

Right now, I'm just using the backticks.  I then check that the file was
actually created with:

stat "file";
if ( -e _ ) {
	chmod 0666,"file";
} else {
	print "Foo!\n";
	die "\n";
}

--J


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

Date: 27 Jul 2000 21:41:28 EDT
From: abigail@foad.org (Abigail)
Subject: Re: I need a magic spell!
Message-Id: <slrn8o1p5v.vcg.abigail@alexandra.foad.org>

Kevin (dotel@nf.sympatico.ca) wrote on MMDXXIII September MCMXCIII in
<URL:news:3980ccd8.0@209.128.1.3>:
\\ Does anyone have an easy and exact perl script to clone the contents of one
\\ directory to another?

Didn't someone ask exactly the same question this week?

The answer is: tar.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


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

Date: 27 Jul 2000 21:28:44 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Making and extracting from XML-like string
Message-Id: <8lqnkc$faj@junior.apk.net>

In article <8lph2d$8h9$1@eastnews1.east.sun.com>,
Nobody <nobody@contract.East.Sun.COM> wrote:
>In article <8ln5ol$1bu@junior.apk.net>,
>Mark W. Schumann <catfood@apk.net> wrote:
>>In article <397F05B8.49DF4BE5@eurodyn.com>,
>
><SNIP/>
>
>>>On the other way, I've need to extract field_1, field_2,...,
>>>student_name, professor_name, school_name from already crated XML-like
>>>string.
>>
>>I would start by downloading and reading the documentation for
>>Bundle::XML from CPAN.
>
>I agree.  The XML modules should handle that nicely.  Or, if it's not
>too large of a parsing job, just write your own.  I did that a couple of
>years ago (wasn't aware of the XML mods, if they were even available yet).
>Just write a simple regex to look for <tag> and recursively parse until 
>that tag is closed.  Kind of quick and dirty, and I'm sure the modules 
>handle it much more cleanly :-)

The thing about using regexes is that you'll have to deal with
funkiness like:

   <address type=email>
   Fred & Barney@stonehenge.com <a couple of great guys>
   </address>

or

   <formulation>
   if x < y and y > 0 but z < 1 if and only if y > 1, then who knows?
   </formulation>

Reinventing the proverbial wheel is full of pitfalls.  Just ask anyone
who writes CGI scripts without using CGI.pm.



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

Date: Thu, 27 Jul 2000 19:53:50 -0700
From: Yann Ramin <atrus@atrustrivalie.eu.org>
Subject: MTA/POP3 server in Perl
Message-Id: <3980F5BE.173C740C@atrustrivalie.eu.org>

Hi,

Does anyone think a good high performance (not so restricvely licensed)
qmail like MTA is possible in Perl?  Am I just crazy?  For the public
vote.

Yann
-- 

--------------------------------------------------------------------
Yann Ramin			atrus@atrustrivalie.eu.org
Atrus Trivalie Productions	www.redshift.com/~yramin
Monterey High IT		www.montereyhigh.com
ICQ 				46805627
AIM				oddatrus
Marina, CA

IRM Developer                   Network Toaster Developer
SNTS Developer                  KLevel Developer

(yes, this .signature is way too big)

"All cats die.  Socrates is dead.  Therefore Socrates is a cat."
	- The Logician

		THE STORY OF CREATION

In the beginning there was data.  The data was without form and null,
and darkness was upon the face of the console; and the Spirit of IBM
was moving over the face of the market.  And DEC said, "Let there be
registers"; and there were registers.  And DEC saw that they carried;
and DEC seperated the data from the instructions.  DEC called the data
Stack, and the instructions they called Code.  And there was evening
and there was a maorning, one interrupt...
		-- Rico Tudor

William Safire's Rules for Writers:

Remembe


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

Date: 27 Jul 2000 21:32:25 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <8lqnr9$gbo@junior.apk.net>

In article <3980B1AB.6DBC99F2@tcgfinancial.com>,
jtoy  <toyboy@toy.eyep.net> wrote:
>Oh and why would I hire someone if I'm only 18 and probably make more than you
>doing programming and network communications?

This is one good reason to pursue a liberal arts education.  With any
exposure to economics, you'd know the answer already.  Look up
"comparative advantage" in any basic econ textbook.

I'm not flaming you.  This is a serious answer to the question I'm
quoting.



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

Date: Fri, 28 Jul 2000 03:50:38 GMT
From: sjs@yorku.ca ()
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <slrn8o20nv.2fd.sjs@john.sympatico.ca>

Greg Bacon <gbacon@HiWAAY.net> wrote:
>jtoy  <toyboy@toy.eyep.net> wrote:
>: Greg Bacon wrote:
 
>: > comp.lang.perl.misc isn't a helpdesk.  You should hire a consultant.

>: Man, suck my dick

>Hmm..
>
>    % grep -i fellatio ~/ratecard | wc -l
>             0

<pedantic>
	You've got a Useless Use Of WC there (at least if you use 
	the GNU grep).
</pedantic>

% grep -ic fellatio ~/resume
0

(Whew!  Glad that came out zero...)

Steve


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

Date: Fri, 28 Jul 2000 02:24:50 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <S96g5.7901$f_5.33245@news1.rdc1.ct.home.com>

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. ;-)

-- 
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)


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

Date: Fri, 28 Jul 2000 02:56:49 GMT
From: drdementor@my-deja.com
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <8lqspg$koi$1@nnrp1.deja.com>

In article <B31g5.7403$f_5.31774@news1.rdc1.ct.home.com>,
  decklin+usenet@red-bean.com (Decklin Foster) wrote:
> drdementor@my-deja.com <drdementor@my-deja.com> writes:
>
> > i need to read the incomming mail,,, by code alreay in existance or
> > whatever, the easiest way.....
> >
> > process the information and generate a unike responce, then mail it
> > back to the user. I also want to have a delay so that the user
thinks a
> > real tech support represenative helped them...
>
> What's wrong with procmail?
>

investigating proc mail.... looks like big system i need to learn,
might be faster to write code myself, if i can use procmail to open a
mail and i pasre the body of the mail myself and genreate a custom
responce with artificial inteligence, if promail is that flexable then
i man use it, I am researching it now, im a c++ coder new to perl,
learning thigns fast though thank to everyones help thanks...

Jim



> --
> There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
> are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)
>


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


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

Date: Fri, 28 Jul 2000 03:06:22 GMT
From: drdementor@my-deja.com
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <8lqtbc$l4s$1@nnrp1.deja.com>

In article <964724392.18672@itz.pp.sci.fi>,
  Ilmari Karonen <usenet11165@itz.pp.sci.fi> wrote:
> In article <8lps3n$s1s$1@nnrp1.deja.com>, drdementor@my-deja.com
wrote:
> >process the information and generate a unike responce, then mail it
> >back to the user. I also want to have a delay so that the user
thinks a
> >real tech support represenative helped them...
>
> You mean sort of like Tom Phoenix?
>

who or what is tom phoenix?
i looked it up on the web and just found stuff about lists or check
sums or permutations... im not sure what you were refering to....

Jim



> --
> 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.
>
>


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


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

Date: Mon, 24 Jul 2000 20:19:50 +0600
From: "Konstantin Stupnik" <skv@iis.nsk.su>
Subject: Re: OK, how do I put a variable in a regexp?
Message-Id: <8lhfpc$2lb2$1@nl.novosoft.ru>

"Johannes Pauli" <pauli@physik.uni-erlangen.de> wrote in message
news:397C3AAD.2570E5C8@physik.uni-erlangen.de...
> Hi Eric, I guess the last print should have been
> print "$1<br>"
> But nevertheless I guess the real problem in your posting is how to
> expand a variable in a regex.
> Well as it is not a string it does not expand on its own. So have to
> copnostract a string containing your search request and eval this.
> This would read like:
>
> eval('$a =~ /^'.$i.':(.*)\t(.*)/');
What about to quotemeta it? :)


> Best wishes and FF
> Johannes
>
> Eric Selin wrote:
>
> > This works:
> > $a =~ /14:(.*)\t(.*)/;
> > print "$1<br>";
> >
> > But not this:
> > $i = 14;
> > $a =~ /^$i:(.*)\t(.*)/;
> > print "$i<br>";
> > }
>
--
Best regards,
      Konstantin.





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

Date: Fri, 28 Jul 2000 06:59:30 +0300
From: "Ivo Zdravkov" <ivoz@starmail.com>
Subject: Re: Perl & MS Personal Web Srvr
Message-Id: <398105eb_1@news.nwlink.com>

Maybe you can find something useful on www.activestate.com

"Daniel M. Farrell" <dfarrell@informix.com> wrote in message
news:3980CA9E.BD7FC881@informix.com...
>
>    Hey ..
>
>    Re: Running Perl in Web like environment on
>    stand alone Win 95 PC.
>
>    Got Perl for Win 95 installed and running.
>    (Can "perl filename.cgi" from the DOS prompt
>    all day long.)
>
>    Eventual goal was to get to the point that I
>    could test all of my HTML and Perl CGI
>    scripts from my Win 95 PC.
>
>    I have Microsoft Peronal Web Server (PWS)
>    installed on my Win 95 PC. PWS came with
>    Microsoft Front Page version 3.0.2.926. Personal
>    Web Server seems to work fine. I have HTML
>    forms and graphics being served.
>
>    Question:  Is it possible to execute Perl CGI scripts
>    in this type of environment ? Is anyone else doing
>    this ?
>
>    Some of the PWS docs mention that CGI scripts are
>    supported. In some areas the doc specifically mentions
>    (only) Active-X type script configuration.
>




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

Date: Fri, 28 Jul 2000 03:48:31 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: plotting graph
Message-Id: <slrn8o20mg.12i.tjla@thislove.dyndns.org>

I was shocked! How could Abigail <abigail@foad.org>
say such a terrible thing:
>print v74.117.115.116.32;
>print v97.110.111.116.104.101.114.32;
>print v80.101.114.108.32;
>print v72.97.99.107.101.114.10;

What is this thing? I have no idea where in the documentation it would
be and I've never seen anything like it. Anyone?

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
A rock pile ceases to be a rock pile the moment a single 
man contemplates it, bearing within him the image of a cathedral.
		-- Antoine de Saint-Exupery


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

Date: Thu, 27 Jul 2000 19:28:20 -0700
From: Dan Burch <dburch@teleport.com>
Subject: Re: Q: Perl & MS Personal Web Srvr
Message-Id: <3980EFC4.C56F1971@teleport.com>



"Daniel M. Farrell" wrote:
> 
>    Hey ..
> 
>    Re: Running Perl in Web like environment on
>    stand alone Win 95 PC.

Not really a perl question, but...Get Apache(for free at
http://www.apache.org/) and you can run it in a more web like
enviroment.
> 
>    Got Perl for Win 95 installed and running.
>    (Can "perl filename.cgi" from the DOS prompt
>    all day long.)
>
Yeh! You're halfway there.
 
>    Eventual goal was to get to the point that I
>    could test all of my HTML and Perl CGI
>    scripts from my Win 95 PC.
> 

With Apache web server you can do that.


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

Date: Fri, 28 Jul 2000 01:31:03 GMT
From: ilbot@my-deja.com
Subject: Re: WHOIS not standart query HELP!!!
Message-Id: <8lqnoo$hdp$1@nnrp1.deja.com>

NO, i'm trying to build my own WHOIS page and it works but it returns
some info only in case i supply $CheckingName as a DOMAIN NAME
BUT i need to get the list of domain mnames that are belong to some
person so what kind of query should i send to whois server?

i just can't find the documentation about whois server's query format

Any ideas???

 the example

#!/usr/bin/perl -w
use CGI;
$box = new CGI;
use IO::Socket;
print $box->header(-type=>'text/html');
print $box->start_html('WHOIS Socket TEST SCRIPT ');
	print $box->startform('POST','./socket_whois.pl');
	print $box->textfield(-name=>'CheckingName',
			      -size=>50,
	                      -maxlength=>50,
			      -rows=>1);
	print $box->submit(-name=>'Submit_Button',
	             -value=>'Get Info');
	print $box->endform;
	 if ( $box->param('Submit_Button') eq 'Get Info' )
	{
		$CheckingName = $box->param('CheckingName');
		$serv         = 'whois.internic.net';
		$remote = IO::Socket::INET->new
			(
				Timeout  => 60,
				PeerAddr => $serv,
				PeerPort =>  43
			)
		or die "Can't connect to $serv:43 : $@ <br>\n";
 		if (defined $remote and ($@ eq ''))
			{
				print $remote "$CheckingName\r\n";
				@result = <$remote>;
				close $remote;
			}
			else
			{
				@result = ("FATAL: $@");
			}
			print @result;
	}
print $box->end_html;



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


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

Date: Fri, 28 Jul 2000 01:48:19 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: XSUB returning a LoL
Message-Id: <DD5g5.7896$f_5.33007@news1.rdc1.ct.home.com>

Alex Graf <alex.graf@.....ec.gc.ca> wrote:

> Hello all,

> Can someone please help me understand how to return an array with
> RETVAL from an XSUB.

You can't--you can only return a single scalar with RETVAL. If you want to
return a bunch of things, push 'em on the stack with XPUSHs. (Or PUSHs and
EXTEND, but I prefer XPUSHs just for sheer laziness reasons) In this case
you'll be XPUSHing the references to top level arrays.

Don't forget, with XSUBs that you're managing the return stack in (which
you are, in this case) need to use PPCODE: instead of CODE:

					Dan


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

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


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