[24702] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6859 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 12 06:10:38 2004

Date: Thu, 12 Aug 2004 03:10:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 12 Aug 2004     Volume: 10 Number: 6859

Today's topics:
    Re: Perl PDF modules - help please <Andrew@DeFaria.com>
    Re: Perl PDF modules - help please <Andrew@DeFaria.com>
    Re: Perl PDF modules - help please <noreply@gunnar.cc>
    Re: Perl PDF modules - help please <matthew.garrish@sympatico.ca>
    Re: Perl PDF modules - help please <GeoffW@wordsmith.demon.co.uk>
    Re: Perl PDF modules - help please <eam@7ka.mipt.ru>
    Re: Perl PDF modules - help please <me@privacy.net>
    Re: Reading next line, finding missing number in sequen <bowsayge@nomail.afraid.org>
        Returned mail is causing script to crash <twoheads@NOSPAMtiscali.co.uk>
    Re: SSL Tunneling <matternc@comcast.net>
    Re: SSL Tunneling (Andy80)
    Re: SSL Tunneling <gnari@simnet.is>
        testing without shell access <news.groups@earthlink.net>
    Re: testing without shell access <noreply@gunnar.cc>
    Re: testing without shell access <nospam@bigpond.com>
    Re: testing without shell access <spamtrap@dot-app.org>
        what is the simplest way to send out email with SMTP au <networm8848@yahoo.com>
    Re: what is the simplest way to send out email with SMT <nospam@bigpond.com>
    Re: what is the simplest way to send out email with SMT <ThomasKratz@REMOVEwebCAPS.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 11 Aug 2004 18:17:45 -0700
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <a0d85$411ac4c4$43661972$27445@msgid.meganewsservers.com>

Gunnar Hjalmarsson wrote:

> Andrew DeFaria wrote:
>
>> Gunnar Hjalmarsson wrote:
>>
>>> By both multi-posting and failing to acknowledge this break of  the 
>>> netiquette, you have reduced the chances to get help.
>>
>> How petty!
>
> So?

Are you petty?

>> People make mistakes.
>
> Of course. And if followed by a simple "sorry, didn't know that" or 
> something to that effect, no sensible person would mind.

Maybe he thought it but neglected to type it because he thought it was 
obvious.

>> And sometimes people just don't agree with the convention. That does 
>> not make them unworthy of assistance.
>
> Deliberately breaking the netiquette does make the culprits unworthy 
> of assistance - in the eyes of many of those who whould have been 
> able  to assist.

I guess you are petty...

> This is Usenet. Learn to behave yourself here, or go elsewhere. ;-)

And closed minded...
-- 
One out of every three Americans is suffering from some form of mental 
illness. Think of two of your best friends. If they are OK, then it must 
be you.


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

Date: Wed, 11 Aug 2004 18:19:37 -0700
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <ac633$411ac534$43661972$27445@msgid.meganewsservers.com>

Brian McCauley wrote:

> To understand why this is not the case one needs to appreciate the 
> reasons behind the rules of netequette.  Most of rules of netiquette 
> that we bang on about here boil down to one simple convention: "the 
> time freely given to assist others should be valued and must not be 
> squandered"[1].

And some boil down to "That's the way we've always done it so we'll just 
keep doing it that way".
-- 
Why does mineral water that has trickled through mountains for centuries 
have a "use by" date?


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

Date: Thu, 12 Aug 2004 03:34:42 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2nvvssF5e1lqU1@uni-berlin.de>

Andrew DeFaria wrote:
> Gunnar Hjalmarsson wrote:
>> Deliberately breaking the netiquette does make the culprits
>> unworthy of assistance - in the eyes of many of those who whould
>> have been able  to assist.
> 
> I guess you are petty...
> 
>> This is Usenet. Learn to behave yourself here, or go elsewhere.
>> ;-)
> 
> And closed minded...

And you are apparently just another pitiful troll. Replying to you was
a pure waste of time.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 11 Aug 2004 22:24:21 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Perl PDF modules - help please
Message-Id: <oxASc.16091$a65.771402@news20.bellglobal.com>


"cftygv" <cftygv@btinternet.com> wrote in message
news:411A5DA0.184E66C1@btinternet.com...
>
> > The OP had multi-posted; I cross-posted in an attempt to call people's
> > attention to it in both groups, and possibly prevent that somebody
> > made efforts to help in one group while unaware of that aspect(s)
> > being covered in the other group. AFAIK, that reason for posting is
> > not covered in any "school of thought".
>
> http://www.cybernothing.org/faqs/net-abuse-faq.html#2.3

And some people consider it rude to chop the attribution lines from
postings.

I personally have no problem with cross-posting if it's on-topic to *all*
the groups (i.e., asking a Perl question in clpm, alt.perl, etc.). At least
then the responses are available in all the groups' archives. Cross-posting
becomes a nuisance, however, when it's used for trolling or throwing a wide
net because a person hasn't done their homework.

Matt




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

Date: Thu, 12 Aug 2004 06:28:22 +0100
From: Geoff Wilkins <GeoffW@wordsmith.demon.co.uk>
Subject: Re: Perl PDF modules - help please
Message-Id: <UdWB0hF2$vGBFwdc@wordsmith.demon.co.uk>

Thanks for your help, Bill - and I'm happy to have given the rest of you 
something to occupy your time with. Bye for now.

In message <WksSc.11352$nx2.6129@newsread2.news.atl.earthlink.net>, Bill 
Segraves <segraves_f13@mindspring.com> writes
>"Geoff Wilkins" <GeoffW@wordsmith.demon.co.uk> wrote in message
>news:hzEsfRF8GhGBFwZB@wordsmith.demon.co.uk...
>> Hi all.
>>
>> I'm trying to write a script which will insert text into a PDF template
>> file and output a new PDF file.
>>
>> I can do this with PDF:Reuse - but I have to specify the co-ordinates
>> for where the text should appear.  What I want, instead, is to be able
>> to replace "place-holders" in the template file with the text.
>>
>> Can any one suggest a Perl PDF module which will help with this?  Or any
>> other way of doing it?
>
>In the "Or any other way ..." category:
>
>1. Use Acrobat's Form Tool to add form fields to your PDF file in the places
>where you'd like the text to appear.
>2. Using Acrobat, add "action" buttons to your form, e.g., Clear Form,
>Submit Form Data, Import Form Data.
>3. By any means you wish, e.g., a Perl script, generate an FDF (Forms Data
>Format) file with the text you wish to place in the corresponding form
>fields of your PDF file.
>4. Use the Import Form Data button in 2 above to import the FDF file's form
>data into your PDF.
>
>You need the full distribution of Acrobat to create fillable forms. Acrobat
>Reader is sufficient for forms that are already fillable.
>
>See http://segraves.tripod.com/index3.htm for samples of how this is done.
>To see the format of an FDF file, submit a blank form to the HTML version of
>the sample form, save the returned data as a text file, and open said file
>in your favorite text editor.
>
>Although no modules at all are required to do this (generation of an FDF
>file), note that you'll find CGI.pm to be useful. With Perl and CGI.pm, you
>should be able to write a script to generate FDF files in about six lines of
>code.
>
>--
>Bill Segraves
>
>

-- 
Best wishes,

Geoff Wilkins
GeoffW@wordsmith.demon.co.uk


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

Date: Thu, 12 Aug 2004 10:28:23 +0300
From: "Eugene Mikheyev" <eam@7ka.mipt.ru>
Subject: Re: Perl PDF modules - help please
Message-Id: <cff68e$2h9$1@news.univ.kiev.ua>

> And you are apparently just another pitiful troll. Replying to you was
> a pure waste of time.
But you did that. So you do have a time to waste, don't you? :)




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

Date: Thu, 12 Aug 2004 20:58:11 +1200
From: "Tintin" <me@privacy.net>
Subject: Re: Perl PDF modules - help please
Message-Id: <2o0pp5F5jdf8U1@uni-berlin.de>


"Andrew DeFaria" <Andrew@DeFaria.com> wrote in message
news:ac633$411ac534$43661972$27445@msgid.meganewsservers.com...
> Brian McCauley wrote:
>
> > To understand why this is not the case one needs to appreciate the
> > reasons behind the rules of netequette.  Most of rules of netiquette
> > that we bang on about here boil down to one simple convention: "the
> > time freely given to assist others should be valued and must not be
> > squandered"[1].
>
> And some boil down to "That's the way we've always done it so we'll just
> keep doing it that way".

And the reason they keep doing it that way, is that it is reasonable,
sensible and it makes things fairer and easier.




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

Date: Thu, 12 Aug 2004 05:39:01 GMT
From: bowsayge <bowsayge@nomail.afraid.org>
Subject: Re: Reading next line, finding missing number in sequence
Message-Id: <VnDSc.22162$Jp6.18186@newsread3.news.atl.earthlink.net>

Pea said to us:

> Thank you, Brian.  I used your suggestion and modification and it
> worked well, except when there were two numbers in a row missing.  
[...]

As a learning experience, Bowsayge created a program that seems
to be able to list the missing numbers from a range:

#!/usr/bin/perl
use strict;
use warnings;

chomp (my @numbers = <DATA>);
s/\D+//g for (@numbers);
@numbers = sort { $a <=> $b } @numbers;
my ($min, $max) = ($numbers[0], $numbers[$#numbers]);
my %hash = map +($_, 1), @numbers;
my @missing = grep !defined($hash{$_}), ($min..$max);
       
printf "%-20s %s\n", 'numbers', 'missing';
printf "%-20s %s\n", "@numbers", "@missing";
       
__DATA__
1
6
2e
5
what9fun
7

-- 
my (@str) = split //,'rroeiaptbJeleuwhet sn.n  ';
my (@ndx, @arr) = qw(15 11 7 23 22 5 13 8 21 0 19 16 14 
1 20 9 10 3 4 2 6 24 18 12 17);
$arr[$ndx[$_]] = $str[$_] for (@ndx); print @arr, "\n";



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

Date: Thu, 12 Aug 2004 10:40:46 +0100
From: Two Heads <twoheads@NOSPAMtiscali.co.uk>
Subject: Returned mail is causing script to crash
Message-Id: <vfdmh0lvbobs2g3pfdl1ta6fpglpknu1ms@4ax.com>

Hi, 

I apologise if this is not strictly a Perl question but I am not sure
where else to post this. 

One of my scripts sends an automated email to the customer. However if
the email address is no longer valid the server(?) seems to return a
message to the script informing it that the mail attempt failed and a
copy of the mail is held in a certain folder. 

However the script is not expecting this message and the message seems
to want to print itself to the screen causing the script to fail. The
code for the mail routine is as follows;

open(MAIL, "|$sendmailLoc $tenantMail")|| die "Cant send mail!\n";
print MAIL "Subject: Rent Account Arrears Warning\n";
print MAIL "From: $clientTitle\n";
print MAIL "Message from $clientTitle\n
	For the attention of: $tenant\n\n";
print MAIL "$arrsMessage\n\n";
print MAIL "Account balance $curr_bal\n";
close (MAIL);

Is there a way I can catch the error message so that I can forward it
elsewhere?

Thanks for your interest,
Mark


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

Date: Wed, 11 Aug 2004 22:01:12 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: SSL Tunneling
Message-Id: <T8mdnQCBv9L1UofcRVn-hg@comcast.com>

Tim Hammerquist wrote:

> Andy80 <a.scolari@ticino.com> wrote:
>>  I've to write a proxy perl script for the following purpose:
>>  
>>  
>>                         _____________a single PC______________
>>                        | _________                   _______  |
>>  --------------------> | |        | --------------> |       | |
>>  --- SSL traffic ----> | |My proxy| -- plain -----> |daemon | |
>>  --------------------> | |_(perl)_| -- traffic ---> |_______| |
>>                        |______________________________________|
>>  
>>  
>>  I've to "convert" SSL traffic into plain traffic and send it on the
>>  same machine but on another port. Is that possible??
> 
> Why can't you use openssh?
> 
Maybe he can't get the plaintext source to feed into the SSH tunnel.  Say, 
he wants to access an https web site, but decrypt it with perl and then
pass it along as plaintext http to his browser.
-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: 12 Aug 2004 00:09:19 -0700
From: a.scolari@ticino.com (Andy80)
Subject: Re: SSL Tunneling
Message-Id: <3d283031.0408112309.79e54da3@posting.google.com>

Chris Mattern <matternc@comcast.net> wrote in message news:<T8mdnQCBv9L1UofcRVn-hg@comcast.com>...
> Maybe he can't get the plaintext source to feed into the SSH tunnel.  Say, 
> he wants to access an https web site, but decrypt it with perl and then
> pass it along as plaintext http to his browser.

Yes you're right! Is that possible in perl? Or I've to use OpenSSL?

Thanks,

Andy


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

Date: Thu, 12 Aug 2004 09:31:16 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: SSL Tunneling
Message-Id: <cffd94$1b9$1@news.simnet.is>

"Andy80" <a.scolari@ticino.com> wrote in message
news:3d283031.0408112309.79e54da3@posting.google.com...
> Chris Mattern <matternc@comcast.net> wrote in message
news:<T8mdnQCBv9L1UofcRVn-hg@comcast.com>...
> > Maybe he can't get the plaintext source to feed into the SSH tunnel.
Say,
> > he wants to access an https web site, but decrypt it with perl and then
> > pass it along as plaintext http to his browser.
>
> Yes you're right! Is that possible in perl? Or I've to use OpenSSL?

But this is totally different from the diagram that you showed us
in your original post.

if you want a proxy that accepts http requests and translates them into
https, then yes, you can do it in perl (AND will need OpenSSL).
the real question is, is it really worth the trouble?

what is your real purpose? why can't your browser access directly
the https web site?

gnari





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

Date: Thu, 12 Aug 2004 07:04:22 GMT
From: "Dan" <news.groups@earthlink.net>
Subject: testing without shell access
Message-Id: <WDESc.13851$nx2.11441@newsread2.news.atl.earthlink.net>

Hi,

A perspective client wants me to develop their website, but wants to use a
particular web hosting service.

The probelm is that the hosting service provides no shell access, so I have
no way to test and debug the Perl scripts once I've uploaded them to the
hosting service.

The service is running Perl 5.6 and Apache 1.3.28 under Lynux. My PC is
running Windows 98 Second Edition. The service they want to use will cost
about one third the monthly cost of the hosting service I've used for my
other clients.

Can anyone suggest how I can solve the testing/ debugging problem?

Thanks,
Dan
news.groups@earthlink.net




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

Date: Thu, 12 Aug 2004 09:26:04 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: testing without shell access
Message-Id: <2o0kg3F5jd4vU1@uni-berlin.de>

Dan wrote:
> The probelm is that the hosting service provides no shell access,
> so I have no way to test and debug the Perl scripts once I've
> uploaded them to the hosting service.
> 
> The service is running Perl 5.6 and Apache 1.3.28 under Lynux. My
> PC is running Windows 98 Second Edition.

<snip>

> Can anyone suggest how I can solve the testing/ debugging problem?

If you haven't already, install Perl + Apache on your PC. The most
convenient way to do so is to install this package:
http://www.indigostar.com/indigoperl.htm

Do the principal testing and debugging locally before uploading.

Then, include this line:

     use CGI::Carp 'fatalsToBrowser'

in the beginning of the Perl scripts. It will have fatal errors
printed to the screen.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Thu, 12 Aug 2004 18:11:47 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: testing without shell access
Message-Id: <2o0n25F5gtqdU1@uni-berlin.de>

Dan wrote:

> Hi,
> 
> A perspective client wants me to develop their website, but wants to use a
> particular web hosting service.
> 
> The probelm is that the hosting service provides no shell access, so I
> have no way to test and debug the Perl scripts once I've uploaded them to
> the hosting service.
> 

Ditch the client or hosting service.

Developinmg Perl on unix/linux without shell access is laughable.

gtoomey


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

Date: Thu, 12 Aug 2004 04:50:30 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: testing without shell access
Message-Id: <QPudnUL1q4vKsobcRVn-ug@adelphia.com>

Dan wrote:

> The probelm is that the hosting service provides no shell access, so I have
> no way to test and debug the Perl scripts once I've uploaded them to the
> hosting service.

Doing development, testing, and debugging on a live production server 
isn't a good idea anyway. The scripts should be tested and debugged 
before you upload them.

> The service is running Perl 5.6 and Apache 1.3.28 under Lynux.

Ouch. Their Apache isn't too horribly out of date - but that Perl is 
*ancient*. You should ask them if they'll update to something from this 
millennium. (That's only a slight exaggeration - 5.6 was released in 
March 2000, which *barely* qualifies it as being from this millennium.)

> Can anyone suggest how I can solve the testing/ debugging problem?

Your best bet is to install Linux and Apache on your PC, mirroring the 
server environment as closely as you can. If you're not up to that, your 
second-best bet is to install Apache and Perl under Windows.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Wed, 11 Aug 2004 21:36:36 -0700
From: "networm" <networm8848@yahoo.com>
Subject: what is the simplest way to send out email with SMTP authentication
Message-Id: <cfes4j$56u$1@news.Stanford.EDU>

Hi all,

In Linux/Unix I can have as simple as a command "mail"  to send out an
email...

In Matlab I can use "sendmail" to send out an email with or without an
attachment.

I also know that in Java and Perl there are also simple ways of sending out
email...

But what if a) the SMTP server needs authentication, like Yahoo SMTP, and
even b)my school email system, needs to first SSH log onto the server, then
send email from the server...

Are there any simple ways of sending out email for the above two cases?

Thanks a lot




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

Date: Thu, 12 Aug 2004 16:46:44 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: what is the simplest way to send out email with SMTP authentication
Message-Id: <2o0i2nF5f20pU1@uni-berlin.de>

networm wrote:

> Hi all,
> 
> In Linux/Unix I can have as simple as a command "mail"  to send out an
> email...
> 
> In Matlab I can use "sendmail" to send out an email with or without an
> attachment.
> 
> I also know that in Java and Perl there are also simple ways of sending
> out email...
> 
> But what if a) the SMTP server needs authentication, like Yahoo SMTP, and
> even b)my school email system, needs to first SSH log onto the server,
> then send email from the server...
> 
> Are there any simple ways of sending out email for the above two cases?
> 
> Thanks a lot

I'm not quite sure what you are trying to do.

If you send email via Perl from Linux/unix, mail transfer agents like
sendmail & postfix assume any logged in user (or process) can send mail.


You need authentication when you send email via programs like
Outlook/Evolution. 

gtoomey


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

Date: Thu, 12 Aug 2004 10:43:50 +0200
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: what is the simplest way to send out email with SMTP authentication
Message-Id: <411b2dc4$0$14530$bb690d87@news.main-rheiner.de>

networm wrote:
> Hi all,
> 
> In Linux/Unix I can have as simple as a command "mail"  to send out an
> email...
> 
> In Matlab I can use "sendmail" to send out an email with or without an
> attachment.
> 
> I also know that in Java and Perl there are also simple ways of sending out
> email...
> 
> But what if a) the SMTP server needs authentication, like Yahoo SMTP, and
> even b)my school email system, needs to first SSH log onto the server, then
> send email from the server...
> 
> Are there any simple ways of sending out email for the above two cases?

Have a look at the module Mail::Sender available on CPAN.

Thomas

-- 
open STDIN,"<&DATA";$=+=14;$%=50;while($_=(seek( #J~.> a>n~>>e~.......>r.
STDIN,$:*$=+$,+$%,0),getc)){/\./&&last;/\w| /&&( #.u.t.^..oP..r.>h>a~.e..
print,$_=$~);/~/&&++$:;/\^/&&--$:;/>/&&++$,;/</  #.>s^~h<t< ..~. ...c.^..
&&--$,;$:%=4;$,%=23;$~=$_;++$i==1?++$,:_;}__END__#....>>e>r^..>l^...>k^..


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

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


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6859
***************************************


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