[18442] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 610 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 3 00:21:25 2001

Date: Mon, 2 Apr 2001 21:20:53 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <986271652-v10-i610@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 2 Apr 2001     Volume: 10 Number: 610

Today's topics:
    Re: Pointing the browser at a web page <tinamue@zedat.fu-berlin.de>
    Re: Problem with regular expression in IF statement! Pl (Malcolm Dew-Jones)
    Re: Problem with regular expression in IF statement! Pl <benpottinger@fuse.net>
        Q: LWP::UserAgent wont time out <nospam@joemama.com>
    Re: Read and write a hash of arrays ? <iltzu@sci.invalid>
    Re: Regular exasperation <nospam@nospam.com>
    Re: Regular exasperation (Mark Jason Dominus)
        regular expression aa versus a{2} <don.koks@defence.gov.auREMOVE_CAPITALS>
    Re: regular expression aa versus a{2} <wyzelli@yahoo.com>
    Re: regular expression aa versus a{2} (John Joseph Trammell)
    Re: Regular expression for conversions that exclude HTM (Tad McClellan)
    Re: Replacing spaces in a url with %20 <goldbb2@earthlink.net>
    Re: require problem, help?? (Tad McClellan)
    Re: rounding up or down with Perl (Garry Williams)
    Re: Script optimization question (John Joseph Trammell)
    Re: Script optimization question (Abigail)
    Re: Script or Application <admin@gatordev.net>
    Re: segmentation fault CGI/Perl -> DBI <ubl@schaffhausen.de>
        simultaneously open file handles -- limit? <plz@righthere.com>
        SMTP Connections peter.reid2000@ntlworld.com
    Re: SMTP Connections <iltzu@sci.invalid>
    Re: Spaces in path to perl script (NT) (Martin Vorlaender)
    Re: Strings in XML files and Unicode <matt@sergeant.org>
        Switch from MacPerl to ActivePerl and <STDIN> doesn't w bzring@cmgm.stanford.edu
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 31 Mar 2001 14:35:29 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Pointing the browser at a web page
Message-Id: <9a4pvh$3ktoi$4@fu-berlin.de>

S Warhurst <s.warhurst@rl.ac.uk> wrote:

> That comes up with the message:

> Status: 302 Moved Location: http://www.somewhere.com

> in the browser windows rather than actually going to the site.

then you are printing out a header before.
if you just do the suggested statements:
> "Mark Kuin" <mkuin@globalrangers.com> wrote in message
> news:99vht9$536$1@news1.xs4all.nl...
>> use CGI;
>> my $query = new CGI;
>> print $query->redirect('http://www.somewhere.com');
>> exit;

it should direct you to the new location.

regards,
tina

-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: 2 Apr 2001 11:39:19 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Problem with regular expression in IF statement! Please help!
Message-Id: <3ac8c757@news.victoria.tc.ca>

Ben P (benpottinger@fuse.net) wrote:
: Actually, it returns exactly what I would see if I typed whois "insert
: domain here" at the shell.

No it doesn't.  You just think it does because you have a
misunderstanding. 

:   What I'm curious about is why the IF always returns true.

Because it's not true that system() returns what you think it does. 


I better not say more in case I make a spelling mistake.


:  Ben

: John Joseph Trammell <trammell@bayazid.hypersloth.invalid> wrote in message
: news:slrn9c9mqv.rao.trammell@bayazid.hypersloth.net...
: > On Fri, 30 Mar 2001 14:29:47 -0800, Ben P <benpottinger@fuse.net> wrote:
: > > Hello everyone, sorry to make a stupid question my first post but I can
: not
: > > seem to figure this out (I know it has to be something simple too).
: >
: > To make matters worse -- you're asking the wrong question!
: >
: > [snip]
: > > #!/usr/bin/perl -w
: >
: > use strict;
: >
: > [snip]
: > > $results = system("whois $_");
: > > if ($results =~ /No match for/) { print "$results\n\n\n"; }
: >
: > I do not think system() returns what you think it does.
: >



--
Want to access the command line of your CGI account?  Need to debug your
installed CGI scripts?  Transfer and edit files right from your browser? 

What you need is "ispy.cgi" - visit http://nisoftware.com/ispy.cgi


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

Date: Sat, 31 Mar 2001 13:55:17 -0800
From: "Ben P" <benpottinger@fuse.net>
Subject: Re: Problem with regular expression in IF statement! Please help!
Message-Id: <tcca3de21dn47c@corp.supernews.com>

> Get into the habit of quoting the properly trimmed text you are
> responding to in context.  Not only does it make the overall thread
> more readble and make you look less like an asshole but it also
> increases the chance that you will actually read what is said carefully.

Get into the habit of learning to spell, asshole.

  thanks for the information though, your message, though rude, was far more
informative than his.

  Ben





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

Date: Sat, 31 Mar 2001 19:14:01 -0500
From: "The News" <nospam@joemama.com>
Subject: Q: LWP::UserAgent wont time out
Message-Id: <E9ux6.11056$B4.946785@e420r-sjo3.usenetserver.com>

Hello,

I have been trying to get the LWP useragent to timeout when it encounters a
URL that takes a long time to send a response back, but my application just
keeps hanging.  This is what I've tried:

    use LWP::UserAgent;
    use HTTP::Request::Common qw/GET/;

    $cur_url = "http://cinemania.msn.com"; # This URL really is bad, too.

    $ua = LWP::UserAgent->new();
    $ua->timeout(5);
    $req = GET $cur_url;
    $res = $ua->request($req);

I want the user agent object to timeout after 5 seconds, but it just keeps
hanging indefinitely.  With nearly every other URL this works fine.  What is
wrong here w/ this piece of code?

Thanx in advance,
 _ _
 . .
  C    - Chris S.
 \_/





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

Date: 31 Mar 2001 17:20:18 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Read and write a hash of arrays ?
Message-Id: <986058211.27941@itz.pp.sci.fi>

[Original context hopelessly mixed up in silly debate -- see the full
thread if you need it.]

In article <tc9frli02arv29@corp.supernews.com>, Rich wrote:
>
>But doesn't that negate the purpose of your posted example, which I assume
>was to cut down on all the clutter in that *huge* while loop? And, if the
>purpose was to save space, why replace logically named variables if you
>have to use comments to explain the replacements?

You know, he does have a point.  *Both* of your examples are pretty hard
to read, and it *is* generally a good rule of thumb to at least keep
unreadable code as short as possible.

How would I write it?  First of all, I'd keep the field names, but make
them hash keys and specify them _before_ the loop:

  my @old_order = qw/this that whatever more fields/;
  my @new_order = qw/that more fields whatever this/;

That way, I could put the field values in a hash, and use the predefined
key lists to slice the hash any way I want.  I'd also further reduce the
clutter in the loop by using unpack(), which is a much cleaner way to
parse fixed-length fields than a long regexp.

Why haven't I?  Well, frankly because I looked at the original code and
just couldn't figure out what it was supposed to do.  And your corrected
version seems to solve some other problem than what the OP wanted.  What
the heck is the keyword field meant to be used for, anyway?

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: 2 Apr 2001 08:18:08 -0600
From: "William D. Ezell" <nospam@nospam.com>
To: Mark Jason Dominus <mjd@plover.com>
Subject: Re: Regular exasperation
Message-Id: <3AC870E1.4C73A795@nospam.com>

Thanks for the reply, and you're exactly correct in your point. 
Unfortunately, I'm dealing with data purchased from a state government
agency which had the wisdom to store all of their names in uppercase in
their database, so I don't have the option of a really "proper" source. 
Over the years I've managed to assemble a collection of brute-force
search-and-replace operations that fix a great percentage of the data --
not a perfect solution but better than none.  I'm just now getting
around to modernizing some of the routines and thought it would be a
good opportunity to learn and apply Perl.  So far the experience has
been pleasant -- just a few minor hurdles like this one.

Bill

******  To reply, remove the "~" from  "wd~ezell@snowhill.com"  ******


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

Date: Sat, 31 Mar 2001 16:50:13 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Regular exasperation
Message-Id: <3ac60ad3.5c88$193@news.op.net>


In article <3AC4F7C3.5DF9AE9B@nospam.com>,
William D. Ezell <nospam@nospam.com> wrote:
>I'm in need of a little enlightenment regarding regular expressions. 
>Specifically, I'm writing a Perl subroutine to perform "proper"
>capitalization for strings with unusual, special-case acronyms.

Other people have showed you how to do what you want, but I'd like to
suggest that what you want isn't what you should do.  People's names
do not follow any reasonable rules for capitalization.  If you
capitalize every letter that follows a space, you will capitalize some
names incorrectly.  For example, you will mess up names like
"d'Agostino" and "van der Graaf" and soforth.  People with names like
'van der Graaf' can sometimes be very sensitive about the exact
spelling  and may be offended if you change their name to 'Van Der Graaf'. 

A quick look in the telephone directory for your city or town will
turn up many, many more examples---they are probably more common than
you think.

The best solution, if it is feasible, is to get the correct names in
the first place, and then avoid tampering with them.



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

Date: Tue, 03 Apr 2001 11:48:29 +0930
From: Don Koks <don.koks@defence.gov.auREMOVE_CAPITALS>
Subject: regular expression aa versus a{2}
Message-Id: <3AC932F4.AFB38EDF@defence.gov.auREMOVE_CAPITALS>

Can anyone tell me the difference between the regular expressions aa and
a{2} please.

They are often said to be the same, but are not, as the following bit of
code shows:

if ("zaab" =~ /([^a]*)(a{2})b/) {
    print "\$1 = $1\n";
    print "\$2 = $2\n";
}

This produces no match.  If we replace a{2} by aa then we do get a
match: $1 = z and $2 = aa

And to make matters even more obscure, if we leave the a{2} there but
remove the b, it matches again with $1 and $2 as above.

Can anyone shed any light on this?

Thanks,
Don




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

Date: Tue, 3 Apr 2001 12:19:52 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: regular expression aa versus a{2}
Message-Id: <aGay6.6$mp2.4354@vic.nntp.telstra.net>

"Don Koks" <don.koks@defence.gov.auREMOVE_CAPITALS> wrote in message
news:3AC932F4.AFB38EDF@defence.gov.auREMOVE_CAPITALS...
> Can anyone tell me the difference between the regular expressions aa
and
> a{2} please.
>
> They are often said to be the same, but are not, as the following bit
of
> code shows:
>
> if ("zaab" =~ /([^a]*)(a{2})b/) {
>     print "\$1 = $1\n";
>     print "\$2 = $2\n";
> }
>
> This produces no match.  If we replace a{2} by aa then we do get a
> match: $1 = z and $2 = aa
>
> And to make matters even more obscure, if we leave the a{2} there but
> remove the b, it matches again with $1 and $2 as above.
>
> Can anyone shed any light on this?

Your Perl is broken.  They all match OK for me.

Wyzelli
--
($a,$b,$w,$t)=(' bottle',' of beer',' on the wall','Take one down, pass
it around');
$d='$_$a$s$b$w';$e='$_$a$s$b';sub
d{$h=shift;$h=~s/\$(\w+)/${$1}/g;return$h}
sub
e{return(shift!=1)?'s':''}for(reverse(1..100)){$s=e($_);$f=d($d);$g=d($e
);
$c.="$f\n$g\n$t\n";$_--;$s=e($_);$e=d($d);$c.="$e\n\n";}print"$c*hic*";




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

Date: Tue, 03 Apr 2001 02:50:11 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: regular expression aa versus a{2}
Message-Id: <slrn9cichq.a30.trammell@bayazid.hypersloth.net>

On Tue, 03 Apr 2001 11:48:29 +0930, Don Koks wrote:
> Can anyone tell me the difference between the regular expressions aa
> and a{2} please.
[snip]

Maybe you should post the actual code that is producing the
problem.

#!/usr/bin/perl -w
use strict;

my $s = "zaab";

if ($s =~ /([^a]*)(a{2})b/) { print qq[1 => "$1", "$2"\n] }
if ($s =~ /([^a]*)(a{3})b/) { print qq[2 => "$1", "$2"\n] }
if ($s =~ /([^a]*)(aa)b/)   { print qq[3 => "$1", "$2"\n] }
if ($s =~ /([^a]*)(aaa)b/)  { print qq[4 => "$1", "$2"\n] }
if ($s =~ /([^a]*)(a{2})/)  { print qq[5 => "$1", "$2"\n] }

__END__

1 => "z", "aa"
3 => "z", "aa"
5 => "z", "aa"



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

Date: Mon, 2 Apr 2001 21:02:52 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Regular expression for conversions that exclude HTML-comments
Message-Id: <slrn9ci89s.11q.tadmc@tadmc26.august.net>

Tim Lauterborn <Tim.Lauterborn@gmx.de> wrote:
>
>I have got the following problem:
>
>Example: $input="ä<!--ä is a nice letter-->"
>should become "&auml;<!--ä is a nice letter-->"
>
>What is the regular expression which achieves the result and excludes
>HTML-comments?


I found myself wanting something like that just yesterday. I
use this approach, making use of split's behavior when the
split pattern contains parenthesis:


-----------------------
while (<DATA>) {
   foreach ( split /(<!--.*?-->)/s ) {
      unless ( /(<!--.*?-->)/s ) {  # do this block only outside of comments
         s/ä/&auml;/g;
      }
      print;
   }
}
-----------------------


Now that I look at it again, this alternative also suggests itself:

-----------------------
while (<DATA>) {
   my @chunks = split /(<!--.*?-->)/s;
   for ( my $i=0; $i<@chunks; $i+=2) {  # even-numbered ones are not comments
      $chunks[$i] =~ s/ä/&auml;/g;
   }
   print @chunks;
}
-----------------------



I felt OK using that only because the HTML I was processing was
machine-generated so I can expect no "weird stuff"...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 01 Apr 2001 04:35:20 GMT
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Replacing spaces in a url with %20
Message-Id: <3AC6B0E2.997DC598@earthlink.net>

grimrob wrote:
> 
> This is a really simple question I am sure, but I cannot for the life
> of me find the answer!
> 
> Any help greatly appreciated.
> 
> Rob

$url ~= s[([^a-zA-Z0-9/_~])][printf("%%%02x",ord $1)]e;

-- 
Sometimes the journey *is* its own reward--but not when you're trying to
get to the bathroom in time.


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

Date: Sat, 31 Mar 2001 08:38:40 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: require problem, help??
Message-Id: <slrn9cbnf0.pdm.tadmc@tadmc26.august.net>

Mickey Mestel <mickm@ix.netcom.com> wrote:
>> What you are apparently missing is the self discipline to read the
>> manaul entry for require() all the way through before posting to
>> usenet.
>
>    yes, you are correct, i did fail to read it all the way through, as
>it is there blatanly at the end, and had i done so, i would have saved
>your time as well as mine.  


As well as the time of hundreds (thousands?) of other readers.

This is not a "read the docs to me" service.


>but otoh, i would not have provided you with
>the apparently necessary satisfaction of berating someone new for their
>lack of measuring up to the standards of self discipline that you
>yourself posses.  so in the end, i think i did both of us a favor!


If you take cuts in line, expect someone to say something about it.

--------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...

<Larry>  [snip]  I view a programming language as a place to be
<Larry>  explored, like Disneyland. You don't need to have a lot of preparation
<Larry>  to explore a theme park.  You do have to go along with the crowd
<Larry>  control measures, though.  In a sense, each ride has its own
<Larry>  prerequisites--if you cut in line, you risk getting tossed out of the
<Larry>  park.
<Larry> 
<Larry>  What we have here in this newsgroup is a failure in crowd control.
<Larry>  Reading the FAQ is like staying in line--it's something you should
<Larry>  learn in kindergarten.  Usenet needs a better kindergarten.
--------------------------------------


>> > also, i don't have access to the newsgroups from work, or very
>> > often, 


That must make it hard to see the followups to your posts.


>> >so i have to get there through this channel.


What is a "channel"?


>> Not only is this matter addressed in the manual but it was also
>> addresses in comp.lang.perl.* several timne within the last few weeks.
>
>    not getting to the newsgroups mean that i don't read them, and so
>don't follow threads and such.  


You are altogether too selfish to be heard, so long.


>it is unfortunate for the moment, 


It is unfortunate forevermore. Killfile entries are a one-way thing.
They go in but they don't come out.


>but
>out of my control.


Bumma.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sat, 31 Mar 2001 17:51:11 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: rounding up or down with Perl
Message-Id: <slrn9cc68f.rj2.garry@zfw.zvolve.net>

On 30 Mar 2001 15:46:12 -0500, Doug Perham
<dperham@dperham.eng.tvol.net> wrote:

> use constant PI  => atan2(1,1)

I think you meant 

  use constant PI  => 4 * atan2(1,1);

-- 
Garry Williams


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

Date: Mon, 02 Apr 2001 17:46:51 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: Script optimization question
Message-Id: <slrn9chcn5.8g1.trammell@bayazid.hypersloth.net>

On Mon, 2 Apr 2001 17:59:51 +0100, Andrew <andrew@mvt.ie> wrote:
[snip]
Fun!  Here's my shot at it.  Critiques are welcome.

#!/usr/bin/perl -w
use strict;

my @points;
while (<>)
{
    chomp;
    my ($x,$y) = split /,/;
    next unless defined($x) and defined($y);
    push @points, { x => $x, y => $y};
}

my $cluster = 0;
while (1)
{
    my @cluster;
    for (@points)
    {
        next if exists $_->{c};
        push @cluster, $_;
        last;
    }
    last unless @cluster;

    while (1)
    {
        my @tmp = grep { in_cluster($_,@cluster) } @points;
        last unless @tmp;
        for (@tmp) { $_->{c} = $cluster }
        push @cluster, @tmp;
    }
    $cluster++;
}

@points = sort { $a->{c} <=> $b->{c} } @points;
for (@points) { printf "%3d, %3d, %3d\n",$_->{x},$_->{y},$_->{c} }

sub in_cluster
{
    my($p,@c) = @_;
    return unless $p and @c;
    return if exists $p->{c};
    for (@c) { return 1 if distance2($p,$_) <= 4 }
    return;
}

sub distance2
{
    return ($_[0]{x} - $_[1]{x})*($_[0]{x} - $_[1]{x}) +
           ($_[0]{y} - $_[1]{y})*($_[0]{y} - $_[1]{y});
}



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

Date: Mon, 2 Apr 2001 19:31:41 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Script optimization question
Message-Id: <slrn9chkst.282.abigail@tsathoggua.rlyeh.net>

Abigail (abigail@foad.org) wrote on MMDCCLXXI September MCMXCIII in
<URL:news:slrn9chftj.pp.abigail@tsathoggua.rlyeh.net>:
## Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMDCCLXXI
## September MCMXCIII in <URL:news:9aa4rn$r0g$1@mamenchi.zrz.TU-Berlin.DE>:
## '' According to Andrew <andrew@mvt.ie>:
## '' > The problem that I'm trying to solve is this;
## '' > I have a file, each line of which contains an x coordinate, a y coordina
## '' > and a unique reference.  I want to be able to specify a distance thresho
## '' > and have all items in the list which are closer to each other than this
## '' > threshold merged together.  The solution I have come up with is as follo
## '' 
## '' The problem is probably covered (ha ha) in computational geometry.
## '' Abigail?
## 
## 
## Probably. I'd say "All Nearest Neighbours" and "Voronoi Diagrams", but
## the problem isn't specified clearly, so I can't say more.


Sure I can:  Union-Find.



Abigail
-- 
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print 
               qq{Just Another Perl Hacker\n}}}}}}}}}'    |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w


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

Date: Tue, 03 Apr 2001 01:42:59 GMT
From: Scott <admin@gatordev.net>
Subject: Re: Script or Application
Message-Id: <3AC8D459.A68AB4F4@gatordev.net>



Tom wrote:

> I have a question... should a perl program be called a script or an
> application ?
>
> Tom

It changes from a script to an application after the number of lines of
code exceeds the number of licks that it takes to get to the center of a
tootsie roll lollipop.

Scott



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

Date: Sat, 31 Mar 2001 11:05:57 +0100
From: Malte Ubl <ubl@schaffhausen.de>
Subject: Re: segmentation fault CGI/Perl -> DBI
Message-Id: <3AC5AC05.D21BAE2E@schaffhausen.de>

Malte Ubl schrieb:
> 
> Mark Jason Dominus schrieb:
> >
> > In article <3AC4C31F.1964F1AD@schaffhausen.de>,
> > Malte Ubl  <ubl@schaffhausen.de> wrote:
> > >well I had a first timer for me. My Perl called a segmentation
> > >fault/core dump.
> >
> > What DBD modules are you using with DBI?
> 
> mysql

maybe I should post, tooo, that this behavior is consistent on three
different machines, so I guess it's very likely that the fault is on
my side.

->malte


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

Date: Mon, 2 Apr 2001 12:29:52 -0700
From: "B McDonald" <plz@righthere.com>
Subject: simultaneously open file handles -- limit?
Message-Id: <is4y6.27209$qv3.11738230@nnrp5-w.sbc.net>

Hi. Would someone please tell me if there is a limit on the number of
simultaneously open file handles? I have a script that processes XML files
and generates a number of CSV output files for bulk load into SQL 7. I was
generating 10 of these "slurp" files, but then, when I added two new files
to the total, file 12 was not getting written to... and it looked as if some
data was not getting written to other files as well.

I've checked the ActivePerl (5.6.0.613 under Win98) documentation and don't
see any info on the max number of files that may be simultaneously open for
writing. Does anyone have any information/experience on this?

Thanks,

Brian





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

Date: 1 Apr 2001 10:20:10 GMT
From: peter.reid2000@ntlworld.com
Subject: SMTP Connections
Message-Id: <9a6vcq$g8c$1@news.netmar.com>

Guys, I need some help here. Can any1 give me a COMPLETE walkthrough on how
to send email from Perl.

let's say the email account from where I want to SEND the email is "sr123",
the password is "test123" and the smtp server is "smtp.testserver.com"

The e-mail is to be delivered to $recipient and the subject must be $subject
and the main text shoud be $main_body and the reply-to address should be
"joebloggs@hotmail.com" (for example)

How would I do that???? Please please, in layman's terms

Peter

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: 1 Apr 2001 12:44:31 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: SMTP Connections
Message-Id: <986127959.26959@itz.pp.sci.fi>

In article <9a6vcq$g8c$1@news.netmar.com>, peter.reid2000@ntlworld.com wrote:
>Guys, I need some help here. Can any1 give me a COMPLETE walkthrough on how
>to send email from Perl.

 1. Open a web browser.

 2. Go to "http://search.cpan.org/".

 3. Click on the link "Mail and Usenet News".

 4. Click on the link "MailTools".

 5. Click on the link "Mail::Send".

 6. Read.

There are, of course, many ways to do it.  You could, for example, use
Net::SMTP directly -- in fact, I might prefer doing it that way.  Or you
could open a pipe to sendmail or some other mailer.  Or you could look
more closely at the module list between steps 3 and 4 to see what other
modules have been written for this purpose.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Sun, 01 Apr 2001 01:40:54 +0200
From: martin@radiogaga.harz.de (Martin Vorlaender)
Subject: Re: Spaces in path to perl script (NT)
Message-Id: <3ac66b06.524144494f47414741@radiogaga.harz.de>

dmeyers+news@panix.com wrote:
> Paul Goris <paul@indigoproductions.be> writes:
>
> It's both an IIS problem and a perl feature.
> IIS does a mapping (go to the server, pull up
> Properties, Application Configuration) which
> tells it (usually) to take a file with a given
> extension (ie. .pl) and do something with it.
> By default, for .pl, it wants to: C:\Path\To\Perl.exe %s %s.
 ...
> > topic and I'm still hoping other posters here would be aware of this
> > issue and be able to give a clue about what to do...
>
> Get rid of the spaces in the path.

Or adapt the .pl entry for IIS to read C:\Path\To\Perl.exe "%s" "%s"
to preserve the parameter integrity.

cu,
  Martin
-- 
One OS to rule them all       | Martin Vorlaender  |  VMS & WNT programmer
One OS to find them           | work: mv@pdv-systeme.de
One OS to bring them all      |   http://www.pdv-systeme.de/users/martinv/
And in the Darkness bind them.| home: martin@radiogaga.harz.de


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

Date: Sun, 01 Apr 2001 09:18:40 +0100
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: Strings in XML files and Unicode
Message-Id: <3AC6E460.20898BA1@sergeant.org>

Thomas Theakanath wrote:
> 
> The XML file contains non-ASCII characters in the text nodes and encoding in
> XML is defined as "ISO-8859-1". These files are created using regular Perl
> print statements. The text strings are read using DOM methods. The output of
> these methods seem to be in UTF-8 format. I tried to convert it back to
> 8859-1 (Latin 1) format using the following transliteration:
> $str =~ tr/\0-\x{FF}//UC;
> But some of the characters are not converted properly. And that is the
> problem.
> 
> The Perl scripts are run on a  Perl, v5.6.0 for sun4-solaris installation. I
> think, these scripts worked as expected on a Windows NT installation. So, I
> don't know if the problem is OS specific.
> 
> Anyways, if somebody has done anything similar to this, please give me some
> pointers on what I am doing wrong here. Can I use Unicode::Map8 or
> Unicode:String to fix this problem? Also, please give me some insights into
> how Perl stores non-ASCII characters in text files and how XML files are
> handled within XML::DOM module.

Try Text::Iconv.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


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

Date: 1 Apr 2001 10:42:02 GMT
From: bzring@cmgm.stanford.edu
Subject: Switch from MacPerl to ActivePerl and <STDIN> doesn't work anymore
Message-Id: <9a70lq$h27$1@news.netmar.com>

Hi,
This is hopefully a really simple question, but its weirding me out.  I have
just switched from a Mac to the Dark Side.  Now, <STDIN> no longer functions
to get user input.  Either PERL is completely different in Windows, I haven't
sacrificed enough goats to my Bill Gates icon, or I have something configured
oddly.  A line like:

$A = <STDIN>;
print $A;

use to wait until I entered something, and then print it.  Now, nothing.

Any thoughts?

Brian


 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


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


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