[8936] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2554 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 11 11:27:40 1998

Date: Mon, 11 May 98 07:01:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 11 May 1998     Volume: 8 Number: 2554

Today's topics:
    Re: (1) Esperanto: Ivy Kellerman-2 (Michael Rubenstein)
    Re: (1) Esperanto: Ivy Kellerman-2 <jmw@jmwa.demon.co.uk>
    Re: (1) Esperanto: Ivy Kellerman-4 <perlguy@inlink.com>
    Re: a header for `Mail me copies' or `Do not mail me co (John Moreno)
    Re: A regex teaser that ALMOST works! (Kevin Reid)
    Re: bug in win95 read/sysread? (Jeffrey R. Drumm)
    Re: Can i get help PLs? <quednauf@nortel.co.uk>
    Re: Can i get help PLs? <qdtcall@esb.ericsson.se>
        can't goto outside block (Frans Postma)
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) <ravn@imada.ou.dk>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) <ravn@imada.ou.dk>
    Re: email attachments ijg@csc.liv.ac.uk
    Re: email attachments <zenin@bawdycaste.org>
    Re: email attachments <Tony.Curtis+usenet@vcpc.univie.ac.at>
        guestbooks or boards scripts for Win NT <sid@swn.sni.be>
    Re: How old is Perl? <bgrosman@healey.com.au>
        Learning Perl! <charaf@writeme.com>
    Re: Learning Perl! (Tom Grydeland)
    Re: MODULE MANIA STRIKES (Was Re: What does this do?) (Tina Marie Holmboe)
        Oops, wrong address (was: Re: Can i get help PLs?) <quednauf@nortel.co.uk>
        Perl and PalmPilot (strange, I know) <quednauf@nortel.co.uk>
    Re: Perl and PalmPilot (strange, I know) <zenin@bawdycaste.org>
        Perl problem (A.H. Roberts)
        Printing through Perl <ismithr@info.curtin.edu.au>
    Re: QRe: == vs. eq (Tina Marie Holmboe)
    Re: RC1867 upload on NT problem <sla@opencon.ch>
    Re: running a perl script <webmaster@NOZPAMsearchpoint.com>
    Re: running a perl script <quednauf@nortel.co.uk>
    Re: Stripping HTML Tags from a file <jasmatt@es.co.nz>
    Re: substitution of text?? <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Symbolic References (Kevin Reid)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 11 May 1998 11:37:27 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: (1) Esperanto: Ivy Kellerman-2
Message-Id: <3558e2da.121385803@nntp.ix.netcom.com>

On 11 May 1998 02:04:00 GMT, mgjv@comdyn.com.au (Martien Verbruggen)
wrote:

>In article <6j5hkq$oj5$1@nnrp1.dejanews.com>,
>	nord@aol.com writes:
>
>> To: alt.usage.english, comp.lang.perl.misc, sci.lang.translation, sci.lang
>
>So... Why is c.l.p.m included in this? I mean.. What does the
>pronunciation of vowels in esperanto have to do with perl?

Someone probably did a scan for "esperanto" and found that the word
appears fairly frequently in this newsgroup.  Stay tuned for messages
about the capital of the state of Arizona :-)

--
Michael M Rubenstein


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

Date: Mon, 11 May 1998 07:08:49 +0100
From: John Woodgate <jmw@jmwa.demon.co.uk>
Subject: Re: (1) Esperanto: Ivy Kellerman-2
Message-Id: <ppt5HJAxXpV1Ewyd@jmwa.demon.co.uk>

In article <6j5mag$lri$4@comdyn.comdyn.com.au>, Martien Verbruggen
<mgjv@comdyn.com.au> writes
>In article <6j5hkq$oj5$1@nnrp1.dejanews.com>,
>       nord@aol.com writes:
>
>> To: alt.usage.english, comp.lang.perl.misc, sci.lang.translation, sci.lang
>
>So... Why is c.l.p.m included in this? I mean.. What does the
>pronunciation of vowels in esperanto have to do with perl?
>
>Martien

The clown who is spamming the stuff doesn't know that Perl is a computer
programming language, that's all.
-- 
Regards, John Woodgate, Phone +44 (0)1268 747839 Fax +44 (0)1268 777124. 
OOO - Own Opinions Only. You can fool all of the people some of the time, but 
you can't please some of the people any of the time.


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

Date: Mon, 11 May 1998 11:53:12 GMT
From: Brent Michalski <perlguy@inlink.com>
To: nord@aol.com
Subject: Re: (1) Esperanto: Ivy Kellerman-4
Message-Id: <3556E6A8.9D1E23E2@inlink.com>

Why is this moron wasting our bandwidth?


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

Date: Mon, 11 May 1998 13:59:23 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: a header for `Mail me copies' or `Do not mail me copies'
Message-Id: <1d8uz42.179bwk8bqtimsN@roxboro0-002.dyn.interpath.net>

In news.software.readers John Stanley <stanley@skyking.OCE.ORST.EDU>
wrote:

> Russell Schulz  <Russell_Schulz@locutus.ofB.ORG> wrote:
> 
> >> Please provide an RFC reference that defines this header for news.
> >
> >I can't.
> 
> Then we won't jump up and down expecting it to have any value.

Then I suppose the programs[1] that use it and their users don't exist.

[1] -  slrn, Gnus, MacSOUP, rnr, NewsReader.Com, NewsWatcher,
MT-NewsWatcher -- and that's only of the ones that *I* know about.

-- 
John Moreno


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

Date: Mon, 11 May 1998 09:33:27 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: A regex teaser that ALMOST works!
Message-Id: <1d8qfn9.a5169u13x1kf4N@slip166-72-108-154.ny.us.ibm.net>

Greg Bacon <gbacon@cs.uah.edu> wrote:

> These sorts of problems make me miss C's pointers to char.  I wish Perl
> had an efficient way of stepping a pointer down a string.

#!perl -w

package CharPtr;

use overload 
  '+=' => \&addptr,
  '-=' => \&subptr,
  '""' => \&getptr,
;

sub new ($$) {
  my ($class, $str) = @_;

  bless {str => $str, posi => 0}, $class;
}

sub addptr {
  my ($self, $add) = @_;
  $self->{posi} += $add;
}

sub subptr {
  my ($self, $add) = @_;
  $self->{posi} -= $add;
}

sub getptr {
  my $self = shift;
  return substr($self->{str}, $self->{posi}, 1);
}

package main;

$string = "This _isn't_ a test.";

$sptr = new CharPtr $string;

for ($i = 0; $i < length($string); $i++) {
  print "-$sptr-\n";
  $sptr++;
}

__END__

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: Mon, 11 May 1998 11:30:54 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: bug in win95 read/sysread?
Message-Id: <3556e0d9.231758701@news.mmc.org>

[posted and mailed]

On Mon, 11 May 1998 01:03:42 GMT, Trevor Cordes <trevor@cyberspc.mb.ca> wrote:

>Is there a bug in the read/sysread functions on the Win95 ports
>of perl?  I've tried both binary distributions and they both
>fail on the following code that works great on my UNIX systems.
>
>  open(FILE,"<$file")   or die;
>  seek(FILE,24998,0)    or die;
>  read(FILE,$c[0],1)    or die;
>  read(FILE,$in,50000)  or die;
>  $s0=unpack("%32C*",$in)%32767;
>  read(FILE,$c[1],1)    or die;
>
>The 2nd read usually fails (yes the file is long enough for
>such a read, like 2MB).  If I catch & print out the return
>value of the second read, it usually returns a value of 18.
>Even if I change it to read 20 bytes instead of 50000 it
>still returns 18.
>
>If I change all the seeks & reads to their sys- counterparts
>it still gives the exact same errors.
>
>What the heck is going on here?  It works great on my AIX
>systems.

I suspect that the differentiation between "text" and "binary" files on M$
systems may be your culprit. Check out binmode() in your Perl documentation.

-- 
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group
                                                            drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me


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

Date: Mon, 11 May 1998 10:28:58 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Re: Can i get help PLs?
Message-Id: <3556C4D9.DB803836@nortel.co.uk>

manish@plexustech.net wrote:

> Hi there!!
>
> i am just a beginner in perl programming...
> I was trying this script which will take message and attachments from a user
> and will mail to several persons..now rest all is fine but i am not getting
> how to attach different MIME types to my mail??
>
> Can i attach files of different types to my mail using Perl Script??

Yes, you should be able to. I would use e.g. the MIME::Lite Module. I use it in
an example showed on my webpage( http://www.surrey.ac.uk/perl/perl.htm ). On
that page there is also a relevant link to the CPAN storage place in England.
MIME::Lite is indeed quite a lightweight, but I find it very funky to create
mails with that module.

--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________





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

Date: 11 May 1998 13:52:54 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Can i get help PLs?
Message-Id: <iswwbtxbvt.fsf@godzilla.kiere.ericsson.se>

manish@plexustech.net writes:

> Can i attach files of different types to my mail using Perl Script??

Yes. You do it the same way you'd do it in C och COBOL, only you write 
the code in Perl instead (translation: that is not a Perl question).
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Mon, 11 May 1998 11:36:21 GMT
From: fpostma@xs4all.nl (Frans Postma)
Subject: can't goto outside block
Message-Id: <3556e0ce.252494187@hdxf08.telecom.ptt.nl>

Hi,

Part of my perl-code:
==
     alarm 10; local $SIG{'ALRM'}=sub{goto TO};
      if (connect(S,$paddr)) {
        alarm 0;
        select S; $|=1; select STDOUT;
        return *S;
      }
      elsif ($::opt_log) { print STDERR "$0: connect(): $!\n" };
TO:
      sleep $time_between;
==

The goto is giving me problems. When actually called it complains
about "can't goto outside block". I do NOT jump outside a block, I
merely skip some lines.

Unless the sub{} calls itself a block as well, but then alarm and
signal handling would be quite difficult. AFAIK this worked nicely up
to 5.004_01 so who/why broke it in 04 ??

Any work arounds? I only want to prevent a hanging programming on the
connect() call.

(and rolling back 5.004_04 to 5.004_01 is a not an option with several
hunderd servers :-(

Frans Postma
---
my opinions are mine, all mine...and you can't have them, nyah,
nyah...


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

Date: Mon, 11 May 1998 13:38:36 +0200
From: Thorbjoern Ravn Andersen <ravn@imada.ou.dk>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <3556E33C.15FB@imada.ou.dk>

Chris Nandor wrote:


> Since when does CPAN not have keyword searching??
> 
>     http://theory.uwinnipeg.ca/SFgate/WAIT4CPAN.html
>     http://theory.uwinnipeg.ca/search/cpan-search.html

Is this accessible from anywhere inside CPAN?

--
  Thorbjxrn Ravn Andersen               "...and...Tubular Bells!"
  http://www.mip.ou.dk/~ravn/
  <<Replies get spamfiltered.  See URL for fast reply-address>>


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

Date: Mon, 11 May 1998 13:51:45 +0200
From: Thorbjoern Ravn Andersen <ravn@imada.ou.dk>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <3556E651.59E2@imada.ou.dk>

Randal Schwartz wrote:


>     SYNOPSIS
>            perl -MCPAN -e shell
>            > wq au=wall
>            > wr 3
>            > wd 3
>            > wl 20
>            > wh
>            > wh wq

Well aware that I might be flamed into oblivion, I would like to state
that I find the CPAN module very unintuitive to use (the above excerpt
should at least give a hint why), even though that it undoubtedly has
enormeous power for the initiated.

We are not all jet fighter pilots :-)

--
  Thorbjxrn Ravn Andersen               "...and...Tubular Bells!"
  http://www.mip.ou.dk/~ravn/
  <<Replies get spamfiltered.  See URL for fast reply-address>>


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

Date: Mon, 11 May 1998 08:51:42 GMT
From: ijg@csc.liv.ac.uk
Subject: Re: email attachments
Message-Id: <6j6e6u$q8u$1@nnrp1.dejanews.com>

In article <35491FB1.DCAB663@imedianet.com>,
  Rob Lowe <rob@imedianet.com> wrote:
>
> how do I include an attachment to an email using the standard
> open(MAIL, "| /usr/sbin/sendmail -t");
> print MAIL "..";  etc.,
> format
>
>
There seems to be some confusion here (I am confused any way).

I have to write an email prog for work and I am using Perl. Lots of nice
people have written scripts to talk to POP3 servers and SMTP servers which
I intended to use.

The first prototype used Net::SMTP but our local friendly sys admin said this
was a bad idea and to use sendmail instead. He quoted the reason/excuse was
sendmail will que your request if there is a heavy load or a problem SMTP
just drops it and if something is wrong it never gets sent. (this is probably
greatly simplified).

So which is right? I don't like not having arguements for and against things
at my disposal.

While I am writing this a thought occurs to me, would it be possible to check
systems to see if either sendmail/SMTP was available an duse the appropriate
one. I will probably hunt down the answer myself eventually but I am asking
here somewhat rehtorically to see if there is any middle ground both sides
can agree on.

Ian J Garlick

ijg@csc.liv.ac.uk

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 11 May 1998 10:03:51 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: email attachments
Message-Id: <894881478.602678@thrush.omix.com>

ijg@csc.liv.ac.uk wrote:
: The first prototype used Net::SMTP but our local friendly sys admin said this
: was a bad idea and to use sendmail instead. He quoted the reason/excuse was
: sendmail will que your request if there is a heavy load or a problem SMTP
: just drops it and if something is wrong it never gets sent. (this is probably
: greatly simplified).
:
: So which is right? I don't like not having arguements for and against things
: at my disposal.

	Your admin is quite right and yes, you've greatly simplified the
	reasons.

	A few of us have been umm... "debating" this topic in the later
	parts of the "Ever Wonder Why Not Everyone Uses Modules?" thread. 
	You might want to check it out.  I'll probably boil it down into
	a page at some point soon called, "Net::SMTP use considered
	harmful" so we don't have to go through such crud that oftin.

: While I am writing this a thought occurs to me, would it be possible to check
: systems to see if either sendmail/SMTP was available an duse the appropriate
: one. I will probably hunt down the answer myself eventually but I am asking
: here somewhat rehtorically to see if there is any middle ground both sides
: can agree on.

	Yes, vary easily.  Test for sendmail first.  If you can't find it,
	fall back to SMTP.  But *always* use sendmail whenever you can.

	## Sendmail should be in /usr/lib or /usr/sbin.  If it's anywere
	## else the sysadmin should have symlink it.
	my $sendmail = '';
	if (-x '/usr/lib/sendmail') {
	    $sendmail = '/usr/lib/sendmail';
	} elsif (-x '/usr/sbin/sendmail') {
	    $sendmail = '/usr/sbin/sendmail';
	}

	## Did we find it?
	if ($sendmail) {
	    ...$sendmail stuff...
	} else {
	    ## Nope, darn.  Well, cross your fingers and hope for the best...
	    ...Net::SMTP stuff...
	}

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 11 May 1998 14:49:53 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
To: ijg@csc.liv.ac.uk
Subject: Re: email attachments
Message-Id: <7xk97totu6.fsf@beavis.vcpc.univie.ac.at>

Re: email attachments, ijg <ijg@csc.liv.ac.uk> said:

ijg> The first prototype used Net::SMTP but our local
ijg> friendly sys admin said this was a bad idea and to use
ijg> sendmail instead. He quoted the reason/excuse was
ijg> sendmail will que your request if there is a heavy load
ijg> or a problem SMTP just drops it and if something is
ijg> wrong it never gets sent. (this is probably greatly
ijg> simplified).

ijg> So which is right? I don't like not having arguements
ijg> for and against things at my disposal.

Depends on what your criteria for "right" are...

IMHO, I would go for the sendmail/MTA approach because it's
an abstraction layer away from the socket stuff.  The port
25 communication is part of the problem, not part of the
solution.  But I guess there may well be arguments the other
way too...

ijg> it be possible to check systems to see if either
ijg> sendmail/SMTP was available an duse the appropriate
ijg> one.

Mail::Send should do what you want.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Mon, 11 May 1998 15:53:30 +0200
From: "Siegfried Delwiche" <sid@swn.sni.be>
Subject: guestbooks or boards scripts for Win NT
Message-Id: <6j6vst$a2p$1@horus.mch.sni.de>

Hi

I am looking for guestbooks or boards scripts running with perl on win NT.
I am looking for really running scripts. I do not care about security since
they will be run on the intranet by honest guys.
Actually, I am tired of searching on the Internet so if someone has accurate
links, I will be happy.

Siegfried
sid@swn.sni.be




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

Date: Mon, 11 May 1998 20:34:11 +1000
From: Benjamin Grosman <bgrosman@healey.com.au>
To: Tkil <tkil@scrye.com>
Subject: Re: How old is Perl?
Message-Id: <3556D423.3D54108E@healey.com.au>

> Perl turned 10 last year:
> 
>    http://www.perl.com/971220.html
> 
> with December 18th, 1987 being pegged as the official birthday.

And for every year, Tkil has been using it ... well, almost. He can tell
stories of walking 90 miles a day butt naked through neck-deep snow to
get to an old dec vt100 terminal... no, wait, that's a bit too old. But
nevermind :-)

Difference is, Tkil's due for a walking stick, while Perl's busy
conquering the world :-)

Ben


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

Date: Mon, 11 May 1998 13:42:46 +0200
From: "Jalal Charaf" <charaf@writeme.com>
Subject: Learning Perl!
Message-Id: <6j6ooj$ful$1@smilodon.ecp.fr>

 Hello everybody,
 Does anyone know where I can learn Perl for CGI prgramming. I am a beginer
and would like to know how we create counters (what does the perl script
source look like?) on Web pages and how can I create a search engine on a
local Web page. I would be pleased if you could give the URL of a good
tutorial for that.
 Thanks.




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

Date: 11 May 1998 13:31:49 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Learning Perl!
Message-Id: <slrn6ldve4.k53.Tom.Grydeland@mitra.phys.uit.no>

On Mon, 11 May 1998 13:42:46 +0200,
Jalal Charaf <charaf@writeme.com> wrote:
>  Hello everybody,
>  Does anyone know where I can learn Perl for CGI prgramming. I am a beginer
> and would like to know how we create counters (what does the perl script
> source look like?) on Web pages and how can I create a search engine on a
> local Web page. I would be pleased if you could give the URL of a good
> tutorial for that.


Some questions are asked more often than others.  These are called
"Frequently Asked Questions", abbreviated FAQ.

In many cases, to avoid answering the same questions over and over,
some helpful soul compiles a list of such questions with authoritative
answers.  It is commonly considered a minimum effort to search for such
a list and consult it before posting your problem to the newsgroup
-- especially if you're a beginner, since your problem is then even less
likely to be new. -- 

With your copy of perl, you should have received extensive
documentation, and the Perl FAQ is part of this documentation.

A search for the word "cgi" in the headlines of the FAQ pages gives
only six hits:

perlfaq3.pod: =head2 How can I generate simple menus without using CGI or Tk?
perlfaq3.pod: =head2 How can I make my CGI script more efficient?
perlfaq3.pod: =head2 Where can I learn about CGI or Web programming in Perl?
perlfaq9.pod: =head2 My CGI script runs from the command line but not
	    the browser.  Can you help me fix it?
perlfaq9.pod: =head2 How do I make sure users can't enter values into a
	    form that cause my CGI script to do bad things?
perlfaq9.pod: =head2 How do I decode a CGI form?


The third of those hits seem appropriate to your question.

For CGI-related questions, you should also try

    http://reference.perl.com/query.cgi?cgi
    http://www.cgi-resources.com
    http://language.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
    http://language.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
    http://language.perl.com/CPAN/doc/FAQs/cgi/www-security-faq.html

(Please note that comp.lang.perl.misc is a CGI-free zone.  Thank you.)


>  Thanks.


-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
      - Do radioactive cats have 18 half-lives? -


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

Date: 11 May 1998 11:16:45 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: MODULE MANIA STRIKES (Was Re: What does this do?)
Message-Id: <6j6mmt$g7r$1@news1.sol.no>

In article <3554AD55.2849@juicepigs.com>,
	Bob Trieger <sowmaster@juicepigs.com> writes:

> Using modules is the easiest way to accomplish anything in perl. As the
> newbies learn what the modules do and how to use them, they can then
> start looking at how they work.

  Using modules _may_ be the easiest way to get a particular task done when
using Perl, but "reading the fucking source" is *far* from being the best way
of teaching any newcomer to Perl the language.

  The original poster asked a question which, on the surface, seemed to be
related to the read() routine. The first reply - on this newsserver atleast
was a reference to the Camel. VERY good reply; and as the Camel is a fairly
good book, a very good reply as far as teaching goes.

  Telling a student to read the *source* to learn something *isn't* very
clever; it isn't even *smart*. I'd go as far as claim it is directly
abusive - and reminds me of the old "The best way to learn HTML is to look
at the source of webpages!"

  Right. And learn all the mistakes. Note before blowing up that I do *not*
claim there are mistakes in CGI.pm, but it is a *product*. Teaching mechanics
by showing people one specific car isn't a good idea *until they've learned
the basics*.

  The use of CGI.pm as a tool to accomplish a task is excellent advice. The
use of CGI.pm as teaching material is exactly the opposite.

  The poster wanted to learn about read(). Teach him about read().



> everytime you write a new script? Because somebody has already done the
> work for uyou, that's why. And that is just what all the modules do, the
> work for you.

  Exactly. So perhaps one should give a person a hammer and tell him that
he'll learn how to use it whilst building his own house.

-- 
  Tina Marie Holmboe                
  Application Developer (Geeks'R'Us)         [tina@tech.scandinaviaonline.se]
  Scandinavia Online AB Development Dept.    (+46) 08 587 81000 (switchboard)
                                             (+46) 08 587 81189 (direct)


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

Date: Mon, 11 May 1998 10:35:03 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Oops, wrong address (was: Re: Can i get help PLs?)
Message-Id: <3556C647.ED27EB10@nortel.co.uk>

Frank L. Quednau wrote:

> manish@plexustech.net wrote:
>
> > Hi there!!
> >
> > Can i attach files of different types to my mail using Perl Script??
>
> Yes, you should be able to. I would use e.g. the MIME::Lite Module. I use it in
> an example showed on my webpage



> ( http://www.surrey.ac.uk/~me51fq/perl/perl.htm ). -- Yeah, that's better. i
> hate Mondays



> ____________________________________________________________
> Frank Quednau
> http://www.surrey.ac.uk/~me51fq
> ________________________________________________



--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________





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

Date: Mon, 11 May 1998 10:40:39 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Perl and PalmPilot (strange, I know)
Message-Id: <3556C796.27FAD6DD@nortel.co.uk>

Hi there,
I couldn't resist the temptation of spending money on a wonderful
little gadget, a PalmPilot!
Are there any things which have to do with Perl and run on a
PalmPilot? Is there anything for Perl which helps it talking to a
PalmPilot? If not, would there be interest in some Perl related
tools for the PalmPilot? Maybe some extremely lightweight Perl,
and if so, what possibilities should it have?


--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________





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

Date: 11 May 1998 10:15:35 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl and PalmPilot (strange, I know)
Message-Id: <894882183.62285@thrush.omix.com>

Frank L. Quednau <quednauf@nortel.co.uk> wrote:
: Are there any things which have to do with Perl and run on a
: PalmPilot? Is there anything for Perl which helps it talking to a
: PalmPilot?
	>snip<

	Yep.  At your local CPAN:

	CPAN/authors/id/JWIEGLEY/Pilot-0.4.tar.gz

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Mon, 11 May 1998 14:04:57 +0100 (BST)
From: CBS5AHR@leeds.ac.uk (A.H. Roberts)
Subject: Perl problem
Message-Id: <6j6t2f$gnc_001@leeds.ac.uk>

I have just recently started to learn Perl, and have come across a problem
with something I am trying to do.

Basically I wrote a program to take 3 numbers to <STDIN> ($a, $b and $c), 
then have a symbol typed in and called $function - the sybmol being 
+, -, * or /.

Then the program uses if, elsif and else to either add, subtract, multiply or
divide depending on $function e.g.

if ($function = "+"> 
{
$ans = $a + $b + $c
}

The answer was then printed to a new line.

What I am TRYING to do is have $function do this:

$ans = $a $function $b $function $c 

and give an answer depending on which operator $function was.

However, as it records $function as a string not an operator it don't work.

IS there a way of doing this?


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

Date: Mon, 11 May 1998 17:23:39 +0800
From: Ray Smith <ismithr@info.curtin.edu.au>
Subject: Printing through Perl
Message-Id: <3556C39B.41C6@info.curtin.edu.au>

Hi all,

I have written a perl program that produces a table in HTML from a
database.  I would like to be able to print out (hard copy) this table
from within a perl script - not through a web browser, and be able to
format it so that it will fit on to a single page.  I have no idea how
to go about this, I assume that I'll have to something using
postscript.  Can any one help??  I'm using Perl version 5.004_04 built
for IP32-irix.

Thanks for your time.

Ray.

--
Ray Smith
Department of Physiotherapy
Curtin University of Technology
Selby St Shenton Park 6008 Aust.
Ph: 	+61 8 9266 3667
Fax: 	+61 8 9266 3636
Email: 	ray@guardian.curtin.edu.au
--


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

Date: 11 May 1998 13:18:16 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: QRe: == vs. eq
Message-Id: <6j6tqo$ho0$1@news1.sol.no>

In article <zpgpo3eo.fsf@mailhost.panix.com>,
	Jonathan Feinberg <jdf@pobox.com> writes:

>> Well no, no warning but the default is 76 so Outlook users are unlikely to
>> change it since they are unsophisticated users by definition.  Which
>> programs offer such warnings?
> 
> Emacs gnus, and Gravity (to name two that I've used).

  knews can be added to that list.

-- 
  Tina Marie Holmboe                
  Application Developer (Geeks'R'Us)         [tina@tech.scandinaviaonline.se]
  Scandinavia Online AB Development Dept.    (+46) 08 587 81000 (switchboard)
                                             (+46) 08 587 81189 (direct)


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

Date: Mon, 11 May 1998 11:50:17 +0100
From: Martin Schlatter <sla@opencon.ch>
To: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: RC1867 upload on NT problem
Message-Id: <3556D7E8.70354140@opencon.ch>

Sorry about that, but I had different version of this
code and I compared it with other upload scripts that
I found on the net, and I just wanted to know if
someone else faced the same problems.

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

$BUF_SIZE=2048;

# get the CONTENT_LENGTH
local($content_length) = $ENV{CONTENT_LENGTH};
xDebug("content_length=$content_length");

# open a temprary file
if (! open(TMPFILE,">$TEMPFILE")) {
    xFatal("open of tempfile ($TEMPFILE) failed (write)");
}

local($buffer);
local($len);
local($bytesread) = 0;
#while ($bytesread < $content_length) {
#    local($len) = sysread(STDIN,$buffer,$BUF_SIZE);
while ($len = sysread(STDIN,$buffer,$BUF_SIZE)) {
    xDebug("len=$len");
    syswrite(TMPFILE,$buffer,$len);
    $bytesread += $len;
    xDebug("bytesread=$bytesread");
}
close(TEMPFILE);

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

As you can see I have two versions, one which loops until
sysread retuns false and one which compares the number of
bytes read with the content_length. And again both versions
runs fine on Linux with the Apache webserver.

Martin



Eric Bohlman wrote:

> Martin Schlatter <sla@opencon.ch> wrote:
> : I've written a upload cgi sript which reads the number of bytes
> : in CONTENT_LENGTH from stdin. This perl cgi runs fine
> : on linux but on NT4.0 it starts reading but after a while the
> : sysread call blocks and the script never returns. I even can't
> : end the perl task with the task-manager! Does anyone know
> : about a upload cgi script which also runs on NT?
>
> Please don't take this as a flame, but...
>
> Ask yourself, honestly, how you'd expect anyone to figure out why your
> code is misbehaving if they don't know what that code *is*.  All you've
> given us to go on is that the code contains a call to sysread somewhere.
> You haven't told us what context that call occurs in, which is pretty
> essential information for anyone trying to debug your code.  AFAIK, none
> of the people who frequent this group are telepaths.
>
> If the script is short, post the whole thing.  If it's long, isolate the
> section where there are problems and post that section.



--
Martin Schlatter, Oberdorfstr. 31, 8187 Weiach, Phone: +411 8858181
Open Connect AG, Technoparkstrasse 1, 8805 Zurich, Switzerland
Mail: sla@opencon.ch Web: http://www.opencon.ch Phone: +411 4403670




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

Date: Mon, 11 May 1998 02:11:27 -0700
From: "Ken" <webmaster@NOZPAMsearchpoint.com>
Subject: Re: running a perl script
Message-Id: <6j6fc5$l9f$1@ha2.rdc1.bc.wave.home.com>

Click on a .pl file somewhere, then hold the shift key and Right click on
it. Select "open with" and browse to the perl program and select it, choose
"always open with".


>From now on you just double click to run .pl files.

Ken


Jason Kronemeyer wrote in message <3556B368.8B3DBA82@aloha.net>...
>Just installed perl for win32.  In order to run a script I have to type
>"perl script.pl" -- is there a way to run the same script without typing
>"perl" and just entering "script.pl" like you would a normal
>executable?  I know that I can do this on a unix system.
>
>Thanks




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

Date: Mon, 11 May 1998 10:32:56 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Re: running a perl script
Message-Id: <3556C5C8.BB0225F6@nortel.co.uk>

Jason Kronemeyer wrote:

> Just installed perl for win32.  In order to run a script I have to type
> "perl script.pl" -- is there a way to run the same script without typing
> "perl" and just entering "script.pl" like you would a normal
> executable?  I know that I can do this on a unix system.

Are you using WinNT or 95? On NT I know that if .pl is an extension known
to the file system and the default (double click) action is to run the
script, it should be possible to simply type in script.pl in your console.
The system then uses the default action to do whatever. I don't know if the
same applies to  Win95, though, but I'd guess ... no, I won't guess, it's
Monday, it'll be wrong!


--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________





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

Date: Mon, 11 May 1998 23:57:41 +1200
From: Matt McKenzie <jasmatt@es.co.nz>
Subject: Re: Stripping HTML Tags from a file
Message-Id: <3556E7B4.148476B3@es.co.nz>

Well..I finally figured out the problem...perfaq9's example will only
work with 5.001 but craps out with 5.004 returning ("regexp *+ operand
could be empty").

So instead of    -     s/<(?:[^>'"]*|(['"]).*?\1)*>//gs
we need to be using   -   s/<(?:[^>'"]+|(['"]).*?\1)*>//gs

although I think these regexes can be a bit greedy.
Tad McClellan wrote:

> Tad McClellan (tadmc@flash.net) wrote:
>
> : $page =~ s/<(?:[^>'"]*|(['"]).*?\1)*>//gs;
>
> : @array = split /\n/;
>
> Uh, sorry.
>
> make that:
>
> @array = split /\n/, $page;  #   ;-)
>
> --
>     Tad McClellan                          SGML Consulting
>     tadmc@metronet.com                     Perl programming
>     Fort Worth, Texas





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

Date: 11 May 1998 14:22:27 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: substitution of text??
Message-Id: <7xlns9ov3w.fsf@beavis.vcpc.univie.ac.at>

Re: substitution of text??, Andrew <andrew@iaccess.com.au>
said:

Andrew> hey, is there a way in perl to substitute a large
Andrew> number of spaces in a text file with just one space?

         s/\s+/ /g;

  $ perldoc perlre

Andrew> i tried it with sed, but that didn't work.

You can do it with sed too, although the regexp syntax is
not as extended.


-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Mon, 11 May 1998 09:33:31 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Symbolic References
Message-Id: <1d8qfqe.8bgqoz1xnmu1bN@slip166-72-108-154.ny.us.ibm.net>

Aaron Kushner <akushner@lebeaux.cup.hp.com> wrote:

> So what is the best/approved way of setting a variable in a perl program
> and accessing it in all of the modules. For example, if I set DEBUG=1 in
> the main program, how should the modules access DEBUG?

IMHO, the main program should set DEBUG in each of the modules.

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.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 2554
**************************************

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