[24699] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6856 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 11 14:10:51 2004

Date: Wed, 11 Aug 2004 11:10:15 -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           Wed, 11 Aug 2004     Volume: 10 Number: 6856

Today's topics:
    Re: Perl PDF modules - help please <GeoffW@wordsmith.demon.co.uk>
    Re: Perl PDF modules - help please <sholden@flexal.cs.usyd.edu.au>
    Re: Perl PDF modules - help please <noreply@gunnar.cc>
    Re: Perl PDF modules - help please <Andrew@DeFaria.com>
    Re: Perl PDF modules - help please <noreply@gunnar.cc>
    Re: Perl PDF modules - help please <peter@semantico.com>
    Re: Perl PDF modules - help please <segraves_f13@mindspring.com>
    Re: Perl PDF modules - help please <nobull@mail.com>
    Re: Perl PDF modules - help please <cftygv@btinternet.com>
    Re: Perl PDF modules - help please <noreply@gunnar.cc>
    Re: Perl PDF modules - help please <cftygv@btinternet.com>
    Re: Perl PDF modules - help please <noreply@gunnar.cc>
    Re: Perl PDF modules - help please <cftygv@btinternet.com>
    Re: Reading next line, finding missing number in sequen <abodeman@yahoo.com>
    Re: Reading next line, finding missing number in sequen (Pea)
        Reset <> without having it fail once? (Hunter Johnson)
    Re: Reset <> without having it fail once? <pinyaj@rpi.edu>
    Re: Reset <> without having it fail once? (Greg Bacon)
        SSL Tunneling (Andy80)
    Re: Statistics for comp.lang.perl.misc <matthew.garrish@sympatico.ca>
    Re: Statistics for comp.lang.perl.misc <mr@sandman.net>
        Totally inappropriate subject lines <Joe.Smith@inwap.com>
    Re: Validating email addresses <1usa@llenroc.ude.invalid>
    Re: Validating email addresses <peter@semantico.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 11 Aug 2004 15:17:59 +0100
From: Geoff Wilkins <GeoffW@wordsmith.demon.co.uk>
Subject: Re: Perl PDF modules - help please
Message-Id: <EDelz3JXqiGBFwuM@wordsmith.demon.co.uk>

In message <2nui85F4th3dU1@uni-berlin.de>, Gunnar Hjalmarsson 
<noreply@gunnar.cc> writes
>Geoff Wilkins wrote:
>> Hi all.
>
>Do not multi-post!
>
>http://www.uwasa.fi/~ts/http/crospost.html

Thanks Gunnar.  I hope someone else can be more helpful.

-- 
Best wishes,

Geoff Wilkins
GeoffW@wordsmith.demon.co.uk


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

Date: 11 Aug 2004 14:23:53 GMT
From: Sam Holden <sholden@flexal.cs.usyd.edu.au>
Subject: Re: Perl PDF modules - help please
Message-Id: <slrnchkavp.vfp.sholden@flexal.cs.usyd.edu.au>

["Followup-To:" header set to comp.lang.perl.misc.]
On Wed, 11 Aug 2004 15:17:59 +0100,
	Geoff Wilkins <GeoffW@wordsmith.demon.co.uk> wrote:
> In message <2nui85F4th3dU1@uni-berlin.de>, Gunnar Hjalmarsson 
><noreply@gunnar.cc> writes
>>Geoff Wilkins wrote:
>>> Hi all.
>>
>>Do not multi-post!
>>
>>http://www.uwasa.fi/~ts/http/crospost.html
>
> Thanks Gunnar.  I hope someone else can be more helpful.

After that reply I very much doubt it...

-- 
Sam Holden


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

Date: Wed, 11 Aug 2004 16:27:17 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2nuooiF51m9fU1@uni-berlin.de>

Geoff Wilkins wrote:
> Gunnar Hjalmarsson writes:
>> Do not multi-post!
>>
>> http://www.uwasa.fi/~ts/http/crospost.html
> 
> Thanks Gunnar.  I hope someone else can be more helpful.

By both multi-posting and failing to acknowledge this break of the 
netiquette, you have reduced the chances to get help.

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


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

Date: Wed, 11 Aug 2004 08:18:09 -0700
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <1920a$411a384d$43661972$31434@msgid.meganewsservers.com>

Gunnar Hjalmarsson wrote:

> Geoff Wilkins wrote:
>
>> Gunnar Hjalmarsson writes:
>>
>>> Do not multi-post!
>>>
>>> http://www.uwasa.fi/~ts/http/crospost.html
>>
>> Thanks Gunnar.  I hope someone else can be more helpful.
>
> By both multi-posting and failing to acknowledge this break of the 
> netiquette, you have reduced the chances to get help.

How petty! People make mistakes. And sometimes people just don't agree 
with the convention. That does not make them unworthy of assistance.

-- 
Puritanism: The haunting fear that someone, somewhere may be happy.


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

Date: Wed, 11 Aug 2004 18:15:13 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2nuv32F51ngqU1@uni-berlin.de>

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?

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

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

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

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


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

Date: Wed, 11 Aug 2004 17:20:14 +0100
From: Peter Hickman <peter@semantico.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <411a4740$0$29592$afc38c87@news.easynet.co.uk>

Andrew DeFaria wrote:
> How petty! People make mistakes. And sometimes people just don't agree 
> with the convention. That does not make them unworthy of assistance. 

If you want people to help you then it behoves you to 'fit in', so to speak.

Think of it as the price of other peoples time and effort that you are asking for.


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

Date: Wed, 11 Aug 2004 17:04:54 GMT
From: "Bill Segraves" <segraves_f13@mindspring.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <WksSc.11352$nx2.6129@newsread2.news.atl.earthlink.net>

"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




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

Date: Wed, 11 Aug 2004 18:11:03 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <cfdjnp$o6i$1@sun3.bham.ac.uk>



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

To someone who doesn't understand netiquette Gunnar's statement may 
still sound like "those who whould have been able to assist" are being 
petty.

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

Once one realises this fact it's a fairly reasonable step to conclude 
that people who "just don't agree with the convention" are indeed 
unworthy of assistance.

[1] If you do not understand how multi-posting squanders this time then 
please see the document Gunnar mentioned previously in this thread.

http://www.uwasa.fi/~ts/http/crospost.html



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

Date: Wed, 11 Aug 2004 17:23:34 +0000 (UTC)
From: cftygv <cftygv@btinternet.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <411A55EC.77F0291@btinternet.com>

Gunnar Hjalmarsson wrote:
> 
> Geoff Wilkins wrote:
> > Hi all.
> 
> Do not multi-post!

A pity you didn't heed your own advice!


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

Date: Wed, 11 Aug 2004 19:26:12 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2nv38aF510ojU1@uni-berlin.de>

cftygv wrote:
> Gunnar Hjalmarsson wrote:
>>Do not multi-post!
> 
> A pity you didn't heed your own advice!

A pity you didn't read the document to which I provided a link. If you 
had, you would have learned to distinguish between cross-posting and 
multi-posting, and you wouldn't have made a fool of yourself by 
posting that comment.

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


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

Date: Wed, 11 Aug 2004 17:36:20 +0000 (UTC)
From: cftygv <cftygv@btinternet.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <411A58E7.FF09E569@btinternet.com>

Gunnar Hjalmarsson wrote:
> 
> cftygv wrote:
> > Gunnar Hjalmarsson wrote:
> >>Do not multi-post!
> >
> > A pity you didn't heed your own advice!
> 
> A pity you didn't read the document to which I provided a link. If you
> had, you would have learned to distinguish between cross-posting and
> multi-posting, and you wouldn't have made a fool of yourself by
> posting that comment.

And some schools of thought say you shouldn't crosspost either but if
you really feel the need to then set followups to one group.


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

Date: Wed, 11 Aug 2004 19:50:53 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2nv4mjF529jjU1@uni-berlin.de>

cftygv wrote:
> Gunnar Hjalmarsson wrote:
>> cftygv wrote:
>>> A pity you didn't heed your own advice!
>> 
>> A pity you didn't read the document to which I provided a link.
>> If you had, you would have learned to distinguish between
>> cross-posting and multi-posting, and you wouldn't have made a
>> fool of yourself by posting that comment.
> 
> And some schools of thought say you shouldn't crosspost either but
> if you really feel the need to then set followups to one group.

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

Sure, if I had anticipated this long discussion, I would have set
follow-up to one group.

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


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

Date: Wed, 11 Aug 2004 17:56:25 +0000 (UTC)
From: cftygv <cftygv@btinternet.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <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


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

Date: Wed, 11 Aug 2004 08:33:36 -0500
From: "Brian Kell" <abodeman@yahoo.com>
Subject: Re: Reading next line, finding missing number in sequence
Message-Id: <opscklaaipz772u5@pc0938>

On Wed, 11 Aug 2004 00:18:05 -0500, Andrew Palmer <andrewpalmer@email.com>  
wrote:

> "Brian Kell" <abodeman@yahoo.com> wrote in message
> news:opscjh0fq0z772u5@pc0938...
>> On Tue, 10 Aug 2004 16:14:50 -0700, Jim Gibson  
>> <jgibson@mail.arc.nasa.gov>
>> wrote:
>>
>> > my $expected = 1;
>> > while(<FILE>) {
>> >   if( $_ != $expected ) {
>> >     print MISSING "Missing ...";
>> >   }
>> >   $expected = $_ + 1;
>> > }
>>
>> But consider this file:
>>
>> 1
>> 2
>> 3
>> 5
>> 6
>> 7
>> 9
>> 10
>>
>> This script will print:
>>
>> Missing 4...
>> Missing 5...
>> Missing 6...
>> Missing 7...
>> Missing 8...
>>
>
> Hmm... I get only:
>
> Missing 4
> Missing 8
>
> which is correct, isn't it?

Yeah, I guess you're right. Apparently when I looked at that code  
yesterday I thought I saw
     $expected++;
instead of
     $expected = $_ + 1;

So never mind. :)

Brian

-- 
($a='%Q$yW0se3%qhggfIi')=~s,([f-y]),qq;"\\c$1";,ege,@l=unpack'a5a5a*',$a;for$i(
@l){$$i.=sprintf"%lx",$_ for  
unpack'C*',$i;push@n,$$i;}$"=',',$_="\c`",$p=eval"
pack'VVN',@n",@b=unpack'C12',$p;$m=4054314,$a=96;(++$a,$m>>=1)&1?s@$@chr$a-!($a
%6-4)*32@e:$;while$m;@z=split m  
&&;for$j(@b){print$z[$j&15|($j>>=4,0)]for+z,j;}


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

Date: 11 Aug 2004 07:40:42 -0700
From: taralish@yahoo.com (Pea)
Subject: Re: Reading next line, finding missing number in sequence
Message-Id: <f4bfa101.0408110640.2527ff61@posting.google.com>

Thank you, Brian.  I used your suggestion and modification and it
worked well, except when there were two numbers in a row missing.  For
example, if I had
1
2
5
6
7

It would list 3 as the missing number but not 4.  I can work with this
though.  Thanks a bunch.

Tara

> "Brian Kell" <abodeman@yahoo.com> wrote in message
> news:opscjh0fq0z772u5@pc0938...
> > I modified it thus:
> 
> my $expected = 1;
> while(<DATA>) {
>   if( $_ != $expected ) {
>     print "Missing $expected\n";
>   }
>  $expected = $_ + 1;
> }
> 
> __DATA__
> 1
> 2
> 3
> 5
> 6
> 7
> 9
> 10
> 
> > Brian


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

Date: 11 Aug 2004 07:51:54 -0700
From: hunter@hunterandlori.com (Hunter Johnson)
Subject: Reset <> without having it fail once?
Message-Id: <19afcf24.0408110651.2be939b0@posting.google.com>

I've got a filter written that needs to read into the target files
(logs) for some additional information (finding a person's numeric ID
by the name passed in) and then pull the records from the logs
matching that additional information.  This can include records
earlier in the file than the record that let me match up the name to
the ID.

What I've done is close(ARGV) so that my first while(<>) fails, assign
the (saved-off) parameters back to ARGV and then start a second
while(<>) loop.  If I just "last" out of the first loop and reassign
@ARGV, it finished processing the file it was in the middle of.

Is there a way to reset the <> without forcing the failure by closing
it first?

Hunter
--
http://www.hunterandlori.com


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

Date: Wed, 11 Aug 2004 12:05:01 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: Reset <> without having it fail once?
Message-Id: <Pine.SGI.3.96.1040811120216.30304D-100000@vcmr-64.server.rpi.edu>

On 11 Aug 2004, Hunter Johnson wrote:

>What I've done is close(ARGV) so that my first while(<>) fails, assign
>the (saved-off) parameters back to ARGV and then start a second
>while(<>) loop.  If I just "last" out of the first loop and reassign
>@ARGV, it finished processing the file it was in the middle of.

I believe that's because you haven't changed the filehandle ARGV, which is
actually what is being read from.

>Is there a way to reset the <> without forcing the failure by closing
>it first?

Can you show your code so I can get a better understanding of what it is
you're doing now?

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
RPI Corporation Secretary   %  have long ago been overpaid?
http://japhy.perlmonk.org/  %  
http://www.perlmonks.org/   %    -- Meister Eckhart





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

Date: Wed, 11 Aug 2004 16:24:39 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: Reset <> without having it fail once?
Message-Id: <10hki27spuag523@corp.supernews.com>

In article <19afcf24.0408110651.2be939b0@posting.google.com>,
    Hunter Johnson <hunter@hunterandlori.com> wrote:

: I've got a filter written that needs to read into the target files
: (logs) for some additional information (finding a person's numeric ID
: by the name passed in) and then pull the records from the logs
: matching that additional information.  This can include records
: earlier in the file than the record that let me match up the name to
: the ID.

Are these large logs?  Can you store the records and then search for the
interesting bits in a second pass?

: What I've done is close(ARGV) so that my first while(<>) fails, assign
: the (saved-off) parameters back to ARGV and then start a second
: while(<>) loop.  If I just "last" out of the first loop and reassign
: @ARGV, it finished processing the file it was in the middle of.
: 
: Is there a way to reset the <> without forcing the failure by closing
: it first?

It's a bigger-hammer approach, but here's another way:

    $ cat try
    #! /usr/local/bin/perl

    use warnings;
    use strict;

    my @copy = @ARGV;
    my $remember;

    eval {
        while (<>) {
            if (/f5/) {
                chomp;
                $remember = $_;
                close ARGV;  # to get $. right
                die "OKAY";
            }
        }
    };

    die "$0: $@\n" unless $@ =~ /\bOKAY\b/;

    @ARGV = @copy;
    while (<>) {
        chomp;

        print "$0: $ARGV:$.: ", ($_ eq $remember ? "eq" : "ne"), "\n";
    }
    continue {
        close ARGV if eof;
    }

    $ for i in 1 2 3 4 5; do echo f$i >f$i; done

    $ ./try f?
    ./try: f1:1: ne
    ./try: f2:1: ne
    ./try: f3:1: ne
    ./try: f4:1: ne
    ./try: f5:1: eq

Hope this helps,
Greg
-- 
War is no longer merely a crime; it is an absurdity.  It is no longer
merely immoral and cruel; it is stupid.  It is no longer merely murder
on a large scale; it is suicide and voluntary ruin.
    -- Frederic Passy


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

Date: 11 Aug 2004 11:03:42 -0700
From: a.scolari@ticino.com (Andy80)
Subject: SSL Tunneling
Message-Id: <3d283031.0408111003.e18a85f@posting.google.com>

Hi everybody!

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

Thanks for the time,

bye

Andy


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

Date: Wed, 11 Aug 2004 09:57:13 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <TApSc.14577$a65.667739@news20.bellglobal.com>


"Sandman" <mr@sandman.net> wrote in message
news:mr-A231F6.12355611082004@individual.net...
> In article <_CeSc.20342$Mq1.956850@news20.bellglobal.com>, "Matt
> Garrish" <matthew.garrish@sympatico.ca> wrote:
>
> >
> > You're getting ridiculed because you seem to think that an automated
> > statistic generator is a person.
>
> So basically, I'm being trolled for no reason at all since I don't think
that
> at all. The automated poster does have Gregs name on it, and most people
here
> surely highlights replies to their own posts?
>

Of course it has his name on it, you foolish little bird. How else would he
post them? The point being made to you is that talking to the output of a
script is not nearly as effective as emailing the person directly.
(Especially so because you're post was completely irrelevant to any
discussion in this newsgroup.)

> > Live with it and move on. It's what
> > you get for talking to the ether like it's a person.
>
> Ironically, Greg answered - color you surprised. :-D
>

Putting aside that there's nothing ironic about it, why would I be
surprised? I don't recall anyone telling you there was no chance of a
response. What you were told is that you broke a number of usenetiquette
rules in starting this "thread", and that it's a pretty foolish way to get
someone's attention. As I said before, live with it and move on.

Matt




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

Date: Wed, 11 Aug 2004 16:48:30 +0200
From: Sandman <mr@sandman.net>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <mr-E3C2E7.16483011082004@individual.net>

In article <TApSc.14577$a65.667739@news20.bellglobal.com>, "Matt
Garrish" <matthew.garrish@sympatico.ca> wrote:

>>> You're getting ridiculed because you seem to think that an automated
>>> statistic generator is a person.
>> 
>> So basically, I'm being trolled for no reason at all since I don't
>> think that at all. The automated poster does have Gregs name on it,
>> and most people here surely highlights replies to their own posts?
> 
> Of course it has his name on it, you foolish little bird.

*plonk*

-- 
Sandman[.net]


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

Date: Wed, 11 Aug 2004 17:34:33 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Totally inappropriate subject lines
Message-Id: <JMsSc.131329$eM2.126204@attbi_s51>

Sandman wrote:

> In article <slrnchhgrh.3tt.tadmc@magna.augustmail.com>, Tad McClellan
>>Then the Subject header should say something about News::Scan.
> 
> My original post, the one I wanted Greg to view, did exactly that.

You should always change the subject line in a reply when changing topics.

>>Please help us keep threads threaded, don't put things unrelated to
>>the Subject into the thread.
> 
> I replied to a post, I didn't create the thread. My reply was directed to a 
> specific poster.

You should always change the subject line in a reply when changing topics.

	-Joe


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

Date: 11 Aug 2004 13:26:17 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Validating email addresses
Message-Id: <Xns954260033BD67asu1cornelledu@132.236.56.8>

amerar@iwc.net (Arthur) wrote in
news:8b622eae.0408110342.12c0056c@posting.google.com: 

[ do not top-post ]

> "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
> news:<d3iSc.26899$114.18434@nwrddc02.gnilink.net>... 
>> Arthur wrote:
>> > Hi All,
>> >
>> > I'm using that Perl module:  Mail::RFC822::Address qw(valid).
>> >
>> > I am not getting any of the expected results at all.   First off,
>> > the perl code compiles, so that means it found
>> > Mail::RFC822::Address. 
>> >
>> > When I ran the test:
>> >
>> >   if (valid("me@mail.com")) {
>> 
>> You elected to have perl interpolate the array @mail.
>> Somehow I doubt this is really what you want.
>> 
>> Use single quotes if you don't want Perl to interpolate @mail.
>> 
>> BTW: if you would have enabled warnings then perl would have told you
>> (unless you actually do have an array named @mail).

Just checked the docs for version 0.3 of this module. It seems that's 
where the OP got the idea from:

<blockquote>
SYNOPSIS

  use Mail::RFC822::Address qw(valid validlist);

  if (valid("pdw@ex-parrot.com")) {
      print "That's a valid address\n";
  }

  if (validlist("pdw@ex-parrot.com, other@elsewhere.com")) {
      print "That's a valid list of addresses\n";
  }
</blockquote>

> Even stranger, if the list of addresses I send all have an @ sign,
> then everything is flagged as valid, even if I have other symbols in
> the address, such as # or ( or *.
> 
> But if and only if I omit the @ sign is it marked invalid..........

You are lying:

use strict;
use warnings;

use Mail::RFC822::Address qw(valid);


my @list = (
    'test@example.com',
    'Hello World@example.com',
    '"Hello World"@example.com',
    '"Hello World@example.com"',
);

for (@list) {
    if(valid $_) {
        print "$_ is valid\n";
    } else {
        print "$_ is invalid\n";
    }
}
__END__

> Does this thing even work under Red Hat, what is the issue?

You need to fix the mismatch between your conception of what is a valid 
email address and what RFC822 (Section 6) considers to be an email 
address.

You also need to learn to post properly. Posting fictional code wastes 
everybody's time.

-- 
A. Sinan Unur
1usa@llenroc.ude.invalid 
(remove '.invalid' and reverse each component for email address)



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

Date: Wed, 11 Aug 2004 17:22:34 +0100
From: Peter Hickman <peter@semantico.com>
Subject: Re: Validating email addresses
Message-Id: <411a47cb$0$29592$afc38c87@news.easynet.co.uk>

I use Email::Valid, works fine for me.


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

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


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