[10732] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4331 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 1 10:07:26 1998

Date: Tue, 1 Dec 98 07:00:34 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 1 Dec 1998     Volume: 8 Number: 4331

Today's topics:
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: `Scripting languages' are marketing deceipts (was:  dturley@pobox.com
    Re: array value find and replace/update <richardsonja@logica.com>
    Re: array value find and replace/update dave@mag-sol.com
        Batch Mailing <anybody@ml.com>
    Re: Batch Mailing <richardsonja@logica.com>
    Re: Camel Book ronald_f@my-dejanews.com
    Re: CGI-Scripts (Nnickee)
    Re: Directory? ronald_f@my-dejanews.com
    Re: Efficiency of infinite loop and sleep (as a replace (Bradley K. Farrell)
    Re: field selection using "split" - question (Bart Lateur)
        Files > 2Gs and -s <cmihaly@fa.disney.com>
    Re: Files > 2Gs and -s <jhi@alpha.hut.fi>
        Filter to sort incoming mail? <modnar_q@yahoo.com>
    Re: Filter to sort incoming mail? (I R A Aggie)
        how to delete from /patt1/ to /patt2/ without including (Cesar Romani)
    Re: how to delete from /patt1/ to /patt2/ without inclu <jacklam@math.uio.no>
        ICQ online pager <NOSPAMeboo@bigfoot.com>
    Re: localtime () - perl's bug ? (Andrew M. Langmead)
    Re: Multiplayer Roleplaying Game, Web-Based, Written in (Noel Llopis)
    Re: Multiplayer Roleplaying Game, Web-Based, Written in wyndo@cxo.com
    Re: Multiplayer Roleplaying Game, Web-Based, Written in wyndo@cxo.com
        Need 5.003 source code for UNIX <Postmaster@moody.edu>
    Re: PERL & SNMP help please!! <conmara@tcon.net>
    Re: Perl and Cgi resources (Bradley K. Farrell)
    Re: Perl and mysql <fty@utk.edu>
        Perl compiler? (Can you get one?) <aidan@salvador.blackstar.co.uk>
    Re: Perl compiler? (Can you get one?) <knut@webcom.no>
        Q: regular expression problem <geert@hypervision.be>
    Re: Q: regular expression problem dave@mag-sol.com
    Re: Q: regular expression problem <jacklam@math.uio.no>
    Re: read html dave@mag-sol.com
    Re: seek, tell, offset question <conmara@tcon.net>
        Server dlls created with PerlCtrl from PRK for WIN32 -  <knut@webcom.no>
        Tool to build Perl-application <beekmans@iae.nl>
        Using PERLDOC  (Hawkwynd)
    Re: Using PERLDOC <Allan@due.net>
    Re: Y2K and Programmer Denial (I R A Aggie)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 01 Dec 1998 11:24:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage912511441.439@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 10 Sep 1998

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last major update of the Perl FAQ was in Summer of
1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://cpan.perl.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://cpan.perl.org/
    http://www.perl.com/CPAN/
    http://cpan.perl.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:

    setdir usenet-by-group/news.announce.newusers
    send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: Tue, 01 Dec 1998 13:18:53 GMT
From: dturley@pobox.com
Subject: Re: `Scripting languages' are marketing deceipts (was: Y2K and Programmer Denial)
Message-Id: <740qbj$avp$1@nnrp1.dejanews.com>

In article <73vg2h$ci5$1@csnews.cs.colorado.edu>,
  tchrist@mox.perl.com (Tom Christiansen) wrote:

> In comp.lang.perl.misc, finsol@ts.co.nz writes:
> : The distinctions between programming languages, scripting languages,
>
> There is no such distinction.  It is a myth.

Well said, thank you.

--
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 1 Dec 1998 12:39:42 -0000
From: "James Richardson" <richardsonja@logica.com>
Subject: Re: array value find and replace/update
Message-Id: <740o2i$dv2@romeo.logica.co.uk>


Vili wrote in message <3663c517.8333272@news.siol.net>...
>I would like to match a line in my data file and replace/update it
>with a new value...
>
>#@line = <FILE>
>
>@match = grep (/matchline/, @file);
>
>The line I would like to replace/update is now in @match so i can
>replace/update it... When that is done I would like to return it to
>the same place in @file... How do I do that?
>
>$file [Is it possible to get this number?] = "new value";
>
>Any suggestions?
>--
>Vili
><mailto:vili.ga.ga@altavista.net>


Assuming your file is not fixed-length records, then you would re write the
file. (Or use in-place edit mode , if its a simple thing... check man
perlrun)

James





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

Date: Tue, 01 Dec 1998 13:59:49 GMT
From: dave@mag-sol.com
Subject: Re: array value find and replace/update
Message-Id: <740soc$cvk$1@nnrp1.dejanews.com>

In article <3663c517.8333272@news.siol.net>,
  vili.ga.ga@altavista.net wrote:
> I would like to match a line in my data file and replace/update it
> with a new value...
>
> #@line = <FILE>
>
> @match = grep (/matchline/, @file);
>
> The line I would like to replace/update is now in @match so i can
> replace/update it... When that is done I would like to return it to
> the same place in @file... How do I do that?
>
> $file [Is it possible to get this number?] = "new value";
>
> Any suggestions?

Presumably you've looked at perlfaq and the answer to the question "How do I
change one line in a file/delete a line in a file/insert a line in the middle
of a file/append to the beginning of a file?" didn't impress you for some
reason.

Perhaps if you told us what was preventing you from using the advice given
there, we could help you come up with alternative strategies.

Dave...

--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 1 Dec 1998 11:11:03 GMT
From: "Merrill Lynch" <anybody@ml.com>
Subject: Batch Mailing
Message-Id: <01be1d19$ab1ac9c0$f0aed083@zuriw14956>

To the network and mail deamons among you.

Anyone got a clue how I can send an email to someone, and when they open
the thing, I get an email back.

The tricky part to this is that it has to be enbedded into a program
that sends several of these mails (batch mode).

Any one know of any program such as the above that I can call from a perl
script with command line args??

Any ideas people???

I have heard that there is such a function in MS exchange that allows
you to specify that when the mail is read you get a mail back, and this can
be done using VB scripting, but how do I call a VB script with arguments
from UNIX??

I have never used VB script, and thus would love it if there is a similar
module in perl that does what I need, if anyone knows of such a thing,
please can you let me know, as I will be enternally grateful.



All help appreciative. please replay to tootedom@exchange.ch.ml.com


Thanks Dom



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

Date: Tue, 1 Dec 1998 12:38:06 -0000
From: "James Richardson" <richardsonja@logica.com>
Subject: Re: Batch Mailing
Message-Id: <740nvh$dud@romeo.logica.co.uk>


Merrill Lynch wrote in message <01be1d19$ab1ac9c0$f0aed083@zuriw14956>...
>To the network and mail deamons among you.
>
>Anyone got a clue how I can send an email to someone, and when they open
>the thing, I get an email back.
>

 No, you can't do this, as the action on opening the message is entirely
client dependant. No dounbt you could write some sneaky VB script program,
but it wouldn't work on anything other then M$ machines. How to do that
wouln't be talked about on this group.

Batch mailing (hopefully not used for spam purposes!) could easily be
achieved with perl... Check the MIME and Mailtools modules....

James





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

Date: Tue, 01 Dec 1998 11:42:54 GMT
From: ronald_f@my-dejanews.com
Subject: Re: Camel Book
Message-Id: <740knt$6rg$1@nnrp1.dejanews.com>

In article <740boj$t8b@gd2inews.swissptt.ch>,
  <luoni@gol.com> wrote:
> The 2nd edition of the Camel Book is from October 1996. Is there a 3rd
> edition in the pipeline?

This would rather surprise me. After all, the 2nd ed. is based on Perl 5.003,
so it would not make much sense making an update again.

BTW: Did you have a look at http://www.oreilly.com/catalog/pperl2/

Ronald
--
Ronald Fischer <ronald_f@my-dejanews.com>
http://ourworld.compuserve.com/homepages/ronald_fischer/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 14:38:20 GMT
From: nnickee@nnickee.com (Nnickee)
Subject: Re: CGI-Scripts
Message-Id: <3666feb7.89420012@news.centuryinter.net>

On Mon, 30 Nov 1998 19:19:52 GMT, emailken@yahoo.com (Kenneth) wrote:

>Ooooo,

>        I've encountered several free servers which allows CGI services.
>1. Korean based  http://free.xtel.com/
>2. Hong Kong Cybercity http://www.cybercity.hko.net/ or the Freenations
>3. SDF Lonestar Public server. http://sdf.lonestar.org/

>Kenneth

Add prohosting to your list (no affiliation, just one of the many
sources of free web space I've tried) - http://free.prohosting.com

Nnickee



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

Date: Tue, 01 Dec 1998 11:21:24 GMT
From: ronald_f@my-dejanews.com
To: luoni@gol.com
Subject: Re: Directory?
Message-Id: <740jf9$5v1$1@nnrp1.dejanews.com>

(this message mailed and posted)

In article <73u2id$o29@gd2inews.swissptt.ch>,
  <luoni@gol.com> wrote:
> Has anybody encountered the problem that Perl considers something not to be
> a directory, although it is one? I check with
>
>     if (-d $name) {...}
>
> but the result of the test is just wrong (not: false).

Maybe you've got some control characters in the directory name that you can't
see? Does $name maybe have a trailing \n? If you are on Unix, try doing a
   system(qq(ls -ld "$name"))
and check the output. Also inspect length($name) to see if this makes sense.

Ronald
--
Ronald Fischer <ronald_f@my-dejanews.com>
http://ourworld.compuserve.com/homepages/ronald_fischer/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 10:46:29 GMT
From: bradley@iinet.net.au (Bradley K. Farrell)
Subject: Re: Efficiency of infinite loop and sleep (as a replacement for cron/at)
Message-Id: <3663bcef.13704303@news.m.iinet.net.au>

Many thanks to Andrew and Larry for your helpful responses. I can now
approach my ISP confident in the knowledge that my script won't trash
their servers.

I do apologize for my delay in responding - when Larry suggested that
I try to get info on CPU times, I kinda froze. Me thinks i'd better
have a look at the Benchmark module :)

Thanks again for detailed and prompt responses to my first c.l.p.m.
question.
-- 
Bradley K. Farrell
bradley@iinet.net.au


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

Date: Tue, 01 Dec 1998 11:54:46 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: field selection using "split" - question
Message-Id: <3666d6c7.14600273@news.skynet.be>

Jonathan Cook wrote:

>Does anyone know a more elegant way of selecting the last field from
>an arbitrary length string like this:
>
>$str = "/dir1/dir2/filename";
>$file = $@tmp_array = split(m:/:, $str); 
>$last_field = $tmp_array[$#tmp_array]; # $last_field = "filename"

	($last_field = $str)=~ s|.*/||;

	Bart.


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

Date: Mon, 30 Nov 1998 14:32:34 -0800
From: Chris Mihaly <cmihaly@fa.disney.com>
Subject: Files > 2Gs and -s
Message-Id: <36631D02.505ED02B@fa.disney.com>


	The -s "file" appears to not handle files greater than 2 Gigs.  We
build Perl under IRIX 6.2.  The result of the -s "file" gives back a
truncated value.  IRIX has both a stat and stat64 functions, the latter
deals with files > 2Gs.  I assume that Perl internally is using the stat
function.  Is there a way around this?  

	Thanks
	  Chris

-- 
Christopher Mihaly 		Email: cmihaly@fa.disney.com   
Walt Disney Feature Animation   Phone: (818) 526-3231 
500 S. Buena Vista St. 		Fax:   (818) 526-3319
Burbank, CA 91521-8950


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

Date: 01 Dec 1998 16:22:54 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
To: cmihaly@fa.disney.com
Subject: Re: Files > 2Gs and -s
Message-Id: <oeevhjwndq9.fsf@alpha.hut.fi>


Chris Mihaly <cmihaly@fa.disney.com> writes:

> 	The -s "file" appears to not handle files greater than 2 Gigs.  We
> build Perl under IRIX 6.2.  The result of the -s "file" gives back a
> truncated value.  IRIX has both a stat and stat64 functions, the latter
> deals with files > 2Gs.  I assume that Perl internally is using the stat

Now I know how big at least the next Disney movie is. :-)

> function.  Is there a way around this?  

Kinda-sorta-notforthefaintofheart-extremelyunsupportedandexperimnetal.

Get the developer version (5.005_54 being the latest) and
Configure -Duse64bits.  No, I am not guaranteeing that it will work
for IRIX -s. In fact, I am not guaranteeing that it won't crash and
burn your machines and/or data.  But I am very interested in hearing
how it fares.  If it doesn't work, I can try to do something about that.

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: 1 Dec 1998 13:41:30 GMT
From: QM<modnar_q@yahoo.com>
Subject: Filter to sort incoming mail?
Message-Id: <740rma$mms$2@bignews.shef.ac.uk>


Hi, I'd like to know if there are filters available which can autosort my
incoming mail according to source address, into different folders. I'm using
unix. I guess what I need is a perl script and a "pipe" in my .forward. Any
ideas or suggestions?

Thanks.



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

Date: Tue, 01 Dec 1998 09:13:45 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Filter to sort incoming mail?
Message-Id: <fl_aggie-0112980913450001@aggie.coaps.fsu.edu>

In article <740rma$mms$2@bignews.shef.ac.uk>, QM<modnar_q@yahoo.com> wrote:

+ Hi, I'd like to know if there are filters available which can autosort my
+ incoming mail according to source address, into different folders. I'm using
+ unix. I guess what I need is a perl script and a "pipe" in my .forward. Any
+ ideas or suggestions?

mailagent

James


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

Date: 1 Dec 1998 12:43:02 GMT
From: romani_c@bigfoot.com (Cesar Romani)
Subject: how to delete from /patt1/ to /patt2/ without including the lines?
Message-Id: <slrn767p2m.lss.romani_c@rzaix06.rrz.uni-hamburg.de>

I want to delete from /patt1/ to /patt2/ without including those lines,
I know, it exists an easy solution if one deletes from /patt1/ to /patt2/
including the lines containing the patterns: 
perl -ni -e 'print unless /patt1/ .. /patt2/' file
How can I do that without including the lines.
Many thanks in advance.

__
Cesar Romani
Hamburg, Germany


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

Date: Tue, 01 Dec 1998 14:59:08 +0100
From: Peter John Acklam <jacklam@math.uio.no>
Subject: Re: how to delete from /patt1/ to /patt2/ without including the lines?
Message-Id: <3663F62C.EDA26134@math.uio.no>

Cesar Romani wrote:
> 
> I want to delete from /patt1/ to /patt2/ without including those
> lines, I know, it exists an easy solution if one deletes from /patt1/
> to /patt2/ including the lines containing the patterns:
> perl -ni -e 'print unless /patt1/ .. /patt2/' file
> How can I do that without including the lines.

Maybe not the most efficient way since the regexes are evaluated
twice, but it does the job

perl -ni -e 'print if ! ( /patt1/ .. /patt2/ ) || /patt1/ || /patt2/' file

You can find more about logical operators in

   perldoc perlop

Peter
-- 
Peter J. Acklam - jacklam@math.uio.no - http://www.math.uio.no/~jacklam



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

Date: Tue, 1 Dec 1998 21:38:25 +0800
From: "Eric B" <NOSPAMeboo@bigfoot.com>
Subject: ICQ online pager
Message-Id: <740rh8$bnp$1@mango.singnet.com.sg>

Hi all,
I need to write a Perl program that will check the icq status of some
contacts and if they are online, the program will send an email to my
Telecom and page me. The email part is ok.

The problem is how do I get the program to check the icq status of my
friends? This program is going to reside on a server with a permanent
connection to the Internet.

Any help or comments will be most welcome.

Regards,

Eric.

PS: To email me, kindly remove NOSPAM from my email address.




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

Date: Tue, 1 Dec 1998 14:45:05 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: localtime () - perl's bug ?
Message-Id: <F3AJn5.2qo@world.std.com>

Jarkko Hietaniemi <jhi@alpha.hut.fi> writes:


>If you count ANSI C time_t as "everything"...but the "seconds since"
>is not universally counted from 00:00:00 1970-01-01.  VMS uses some
>random-looking-date in 1858 (*) and AFAIK MacOS uses the 1900.

>(*) it's not random, it's actually good astronomical math.

The mac uses 1904, not 1900. It avoided another leap year exception
for 1900.

-- 
Andrew Langmead


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

Date: Tue, 1 Dec 1998 09:01:08 -0500
From: llopis@zonker.ecs.umass.edu (Noel Llopis)
Subject: Re: Multiplayer Roleplaying Game, Web-Based, Written in Perl.
Message-Id: <MPG.10cdc0aa13c8d8bd9896fe@news.oit.umass.edu>

In article <73vilp$6m4$1@reader1.reader.news.ozemail.net>, 
hotstone@ozemail.com.au says...
> How does "public play" equate to "you have to pay to use this beta"?
> If anything, the statement "we will open BLAH to the public tomorrow"
> implies to me you won't have to pay, more than it implies that you will. :)

That's exactly my complaint. If you go look at their web site you'll
see in small print that you're supposed to pay for the service, even
during the Beta stage (oh, yeah, you get a whole wapping free week).
I thought that the post was misleading that's all.

I wish them good luck finding beta testers. If I want to pay for
a Beta product, I'll go by Electronic Boutique and buy a game from
the new releases shelf :-b At least I get a box with it :)


--Noel



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

Date: Tue, 01 Dec 1998 14:29:54 GMT
From: wyndo@cxo.com
Subject: Re: Multiplayer Roleplaying Game, Web-Based, Written in Perl.
Message-Id: <740uge$efs$1@nnrp1.dejanews.com>


> I meant the paying, not the Beta. It was an ambiguous sentence though,
> so I deserve that :)

You do *NOT* have to pay. We're interested in getting feedback and bug
reports. Signing up does not cost *anything*. There are plenty of problems
that can be reported in the trial week, and we're looking for these. I think
you misunderstood and thought that you have to pay money to beta test this
game. This is not the case.

Mike.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 14:27:01 GMT
From: wyndo@cxo.com
Subject: Re: Multiplayer Roleplaying Game, Web-Based, Written in Perl.
Message-Id: <740ub2$eeo$1@nnrp1.dejanews.com>


> How does "public play" equate to "you have to pay to use this beta"?
> If anything, the statement "we will open BLAH to the public tomorrow"
> implies to me you won't have to pay, more than it implies that you will. :)

You don't have to pay to use this beta. You only have to pay to subscribe.
Sorry if that was unclear.

Mike.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 07:45:48 -0600
From: Mail Server Administrator <Postmaster@moody.edu>
Subject: Need 5.003 source code for UNIX
Message-Id: <3663F30C.CF50EDA6@moody.edu>

Where can I get Perl 5.003 source code for UNIX?



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

Date: Tue, 01 Dec 1998 07:16:37 -0500
From: Ken McNamara <conmara@tcon.net>
Subject: Re: PERL & SNMP help please!!
Message-Id: <3663DE24.997D43A5@tcon.net>

Somckit -

Seems odd that the walk doesn't see the other interfaces.  I've generally
found that if walk doesn't see it (assuming the start is at the top of the
tree) then the OID isn't there.  But since you're reading the OID with
SunNet it must be there.

Anyway, this is probably the wrong group to post your query.  Since the
problem is really an SNMP problem.

I'd suggest:

http://www.ece.ucdavis.edu/ucd-snmp

and a mailing list

ucd-snmp@ece.ucdavis.edu

KenMc

Somckit Khemmanivanh wrote:

> I am trying to use the SNMP_Session module. What I need to do is query a
> Synoptics 3000 hub to get the count
> of IfInOctets that the hub has seen on each of its ports.  This
> Synoptics hub has 4 slots, with each slot having a variable number of
> ports ( physical plugs for 10baseT cable).  I used Mike Mitchell's
> SNMP_util module's snmpwalk subroutine to query the hub's interfaces,
> but the snmpwalk routine thinks that there is only one interface on the
> hub.
>
> I am really new to SNMP, so could some please give me some guidance on
> how I could query each slot, then each port on the slot for the
> IfInOctets OID
>
> I know this can be done because we are currently using Sun Netmanager to
> query for these values. We want to move off of the SuNNet software onto
> PERL.
>
>





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

Date: Tue, 01 Dec 1998 12:26:27 GMT
From: bradley@iinet.net.au (Bradley K. Farrell)
Subject: Re: Perl and Cgi resources
Message-Id: <3664d109.18850612@news.m.iinet.net.au>

Mike Moore <mikem@interlog.com> wrote:
>Could someone recommend a tutorial or resources
>for a programming moron like myself to learn
>perl and cgi
If you haven't done so already:
1. Read the FAQ
2. Check out www.perl.com

HTH
-- 
Bradley K. Farrell
bradley@iinet.net.au


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

Date: Tue, 01 Dec 1998 09:16:15 -0500
From: Jay Flaherty <fty@utk.edu>
Subject: Re: Perl and mysql
Message-Id: <3663FA2F.5542BB2@utk.edu>

Kim Long wrote:
> 
> Can anyone give me a starting place query mysql with a perl script.
> 
> Kim

http://www.turbolift.com/mysql


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

Date: 1 Dec 1998 11:23:01 GMT
From: Aidan Rogers <aidan@salvador.blackstar.co.uk>
Subject: Perl compiler? (Can you get one?)
Message-Id: <740jil$3sl$1@nclient3-gui.server.ntli.net>

After all these replies, I have a related question. Is it possible to get a
compiler for Perl? It's all very well having a script that will run fine on
any system that has Perl installed on it, but is it possible to compile to
a binary executable?

Aidan


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

Date: Tue, 1 Dec 1998 15:29:06 +0100
From: "Knut Brobakken" <knut@webcom.no>
Subject: Re: Perl compiler? (Can you get one?)
Message-Id: <3663fd8d.0@d2o202.telia.com>

Aidan Rogers wrote in message =
<740jil$3sl$1@nclient3-gui.server.ntli.net>...
>After all these replies, I have a related question. Is it possible to =
get a
>compiler for Perl? It's all very well having a script that will run =
fine on
>any system that has Perl installed on it, but is it possible to compile =
to
>a binary executable?

Yes indeedy, it is possible to compile Perl scripts to free-standing =
exe-files , at least if you use perl2exe (evaluation version at =
http://www.demobuilder.com) and Perl for Win32.

But to REALLY unleash the power of Perl, you should consider getting the =
Perl Resource Kit From O'Reilly (ISBN 1-56592-409-6). It includes lots =
and lots of utilities, tips and documentation (among these one =
registered version of Perl2Exe!), and costs only $149.

I'm using it, and it's marvellous! Hopefully, you're using Perl for =
Win32, because if not, it's not much good.......

Also check out http://www.activestate.com for the latest news on  =
ActivePerl and related tools.


Knut :-)





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

Date: 1 Dec 1998 11:49:50 GMT
From: "Geert Broeders" <geert@hypervision.be>
Subject: Q: regular expression problem
Message-Id: <01be1d20$bbdc79a0$ed0a00c3@butthead.hypervision.be>

Hi all,


I have data like this:

foo bar foo bar foo abc bar foo bar

In the example a space equals an arbitrary collection of chars not
containing 'foo', 'bar' or 'abc'.
The number of 'foo's and 'bar's before and after 'abc' is arbitrary too.

As a result I need the string with 'foo' and 'bar' closest around 'abc'.
i.e. 'foo abc bar'. (the spaces being the characters between 'foo', 'abc'
and 'bar')


Thanks in Advance,
Geert



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

Date: Tue, 01 Dec 1998 13:36:59 GMT
From: dave@mag-sol.com
Subject: Re: Q: regular expression problem
Message-Id: <740rdp$buq$1@nnrp1.dejanews.com>

In article <01be1d20$bbdc79a0$ed0a00c3@butthead.hypervision.be>,
  "Geert Broeders" <geert@hypervision.be> wrote:
> Hi all,
>
> I have data like this:
>
> foo bar foo bar foo abc bar foo bar
>
> In the example a space equals an arbitrary collection of chars not
> containing 'foo', 'bar' or 'abc'.
> The number of 'foo's and 'bar's before and after 'abc' is arbitrary too.
>
> As a result I need the string with 'foo' and 'bar' closest around 'abc'.
> i.e. 'foo abc bar'. (the spaces being the characters between 'foo', 'abc'
> and 'bar')

Why don't you post what you've already tried and what it's doing (or not
doing) so we can help you understand your mistakes.

 ...or do you just expect a free handout?

Dave...

--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 14:48:19 +0100
From: Peter John Acklam <jacklam@math.uio.no>
Subject: Re: Q: regular expression problem
Message-Id: <3663F3A3.2ECF8FA3@math.uio.no>

Geert Broeders wrote:
> 
> I have data like this:
> 
> foo bar foo bar foo abc bar foo bar
> 
> (...)

How about something like

$str = 'foo bar foo bar foo abc bar foo bar';
@parts = split /(foo|bar|abc)/, $str;
for ( $i=2 ; $i<@parts-2 ; $i++ ) {
   if ( $parts[$i] eq 'abc' ) {
        $joined = join "", @parts[ $i-2 .. $i+2 ];
        print $joined, "\n";    # Or whatever you want to do with it.
   }
}

Peter
-- 
Peter J. Acklam - jacklam@math.uio.no - http://www.math.uio.no/~jacklam




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

Date: Tue, 01 Dec 1998 13:02:54 GMT
From: dave@mag-sol.com
Subject: Re: read html
Message-Id: <740pdo$acs$1@nnrp1.dejanews.com>

In article <36625A21.E742B02B@compusnet.com>,
  "Bill G." <roxanne@compusnet.com> wrote:
> I'm a beginner with Perl and I'm trying to write cgi that will read the
> html page at a given URL,
> parse it and then send it to a requester as an HTML document. The part I
> don't understand
> how to do is to read in the HTML from a specified URL. If anyone could
> give me a hint, I
> would certainly appreciate it. This is probably an easy thing to do, if
> you know how.

You need the LWP module bundle. Get it from CPAN <http://www.perl.com/CPAN/>.

hth,

Dave...

--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 01 Dec 1998 07:37:15 -0500
From: Ken McNamara <conmara@tcon.net>
Subject: Re: seek, tell, offset question
Message-Id: <3663E2FB.3C345FB0@tcon.net>

asheik -

I tried what you wrote and couldn't get it to work.

But this does:

open infile
while (!eof(infile)) {
    $readline = <infile>
    if($readline =~ /^1130/) { $toggle = 1; }
    if($toggle) { print $readline; }
}

Don't seek, don't tell.  Since once the entry is found and toggle is on - then
all the other lines print.

KenMc

> i have a monthly log
> file in which some data follows the date.
> i want to seek to a particular date
> and print everything "after" that date.
> this is what i've tried:
>
> open the
> file
> if (/^1130) { $filePosition = tell;}
> print $filePosition;
> seek($filename, $filePosition,0);
> print the rest of the file
>





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

Date: Tue, 1 Dec 1998 15:21:40 +0100
From: "Knut Brobakken" <knut@webcom.no>
Subject: Server dlls created with PerlCtrl from PRK for WIN32 - Memory leak
Message-Id: <3663fbce.0@d2o202.telia.com>

I've written a simple test dll using PerlCtrl from Perl Resource Kit for =
Win32.

It uses LWP:Simple, and has one property (a string containing an URL) =
and one
method (GetUrl, which uses LWP to get the response and return it)

The dll compiled fine, and I'm able to use it in Active Server Pages =
with Server.CreateObject(mycomponentname)

But when I run a "torture test" of it and try looping a thousand times =
or so, creating, using and destorying the object instance inside the =
loop, it is obvious that the dll leaks memory, because
the memory bar in Task Manager jumps from about 30 Mb to 140Mb, and =
refuses to go down,
unless I reboot the server.

Is it possible to avoid this memory leak in dll's created with PerlCtrl?

If not, are there other ways to create leak-free dlls with Perl?

Knut Brobakken
knut@webcom.no





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

Date: Tue, 01 Dec 1998 12:22:44 +0100
From: Marcel Beekmans <beekmans@iae.nl>
Subject: Tool to build Perl-application
Message-Id: <3663D184.499DD61C@iae.nl>

Hello,

I'm buidling my Perl-applications in Perl Builder from SolutionSoft,
it's an easy tool to build en debug Perl-scripts. But it doesn't always
work very well. For example it doesn't understand something like this:

print <<END_of_Start
 ...
 ...
 ...
END_of_Start

Which tools should work better?

Greetings,

Marcel Beekmans




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

Date: Tue, 01 Dec 1998 11:51:05 GMT
From: hawkwynd@adelphia.net (Hawkwynd)
Subject: Using PERLDOC 
Message-Id: <3663d826.30963067@nntp.buf.adelphia.net>

At the command line in Windows 98, when I run 	c:\>perldoc -f print 
I get the following error message, or report:

No documentation found for "perlfunc".

perllocal.pod is located in the C:\Perl\5.005\lib\MSWin32-x86-object directory as well as:
POSIX.pod
lwpcook.pod

The PATH statement is correct. Am I missing something in my perl installation? Otherwise,
all scripts run fine. 

Thanks in advance.

-------------------------------
Hawkwynd's Web Server
All this stuff from a 486!
http://hawkwynd.tzo.com
-------------------------------


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

Date: Tue, 1 Dec 1998 07:37:21 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Using PERLDOC
Message-Id: <740neh$n79$1@camel25.mindspring.com>

Hawkwynd wrote in message <3663d826.30963067@nntp.buf.adelphia.net>...
>At the command line in Windows 98, when I run c:\>perldoc -f print
>I get the following error message, or report:
>No documentation found for "perlfunc".
>perllocal.pod is located in the C:\Perl\5.005\lib\MSWin32-x86-object
directory as well as:
>POSIX.pod
>lwpcook.pod
>
>The PATH statement is correct. Am I missing something in my perl
installation? Otherwise,
>all scripts run fine.
>Thanks in advance.


It is my understanding that ActiveState decided not to include the pod files
with their distribution.  There is a pod subdirectory, but it only includes
HTML files.  I solved this problem by obtaining a copy of the missing pod
files and placing them in the pod directory.  It seems really odd to me that
ActiveState includes perldoc.bat but not the pod files themseleves.

AmD

[posted and mailed]




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

Date: Tue, 01 Dec 1998 09:26:05 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Y2K and Programmer Denial
Message-Id: <fl_aggie-0112980926050001@aggie.coaps.fsu.edu>

In article <73v7lr$20v$1@nnrp1.dejanews.com>, finsol@ts.co.nz wrote:

+ In article <73urot$g1a$1@marina.cinenet.net>,
+   cberry@cinenet.net (Craig Berry) wrote:
+ > finsol@ts.co.nz wrote:

+ > It is very difficult to take anything else you say seriously when your
+ > list of 'programming languages' --
+ >
+ > : programming languages such as Perl, MacPerl, C, C++, Java,
+ > : Javascript, CGI, MVS and CICS.
+ >
+ > -- consists of two variants of the same language, two languages that share
+ > the same time-handling underpinnings, two other languages, and then -- the
+ > kicker -- an interface specification and two operating systems.

+ I was writing for both a technical and non-technical audience. For the
+ purposes of the article, there is no necessity to make the distinctions you
+ mention.

It doesn't give you any credibility with the technincal audience, does
it?

+ It does not improve meaning, it just adds unnecessary jargon.
+ Technical people may dearly love to use jargon to show how very clever they
+ are, but does not always assist in the understanding of the subject matter.

Ok, then, write a program in CGI.
 
James


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4331
**************************************

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