[15959] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3371 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 15 11:10:39 2000

Date: Thu, 15 Jun 2000 08:10:18 -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: <961081818-v9-i3371@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 15 Jun 2000     Volume: 9 Number: 3371

Today's topics:
    Re: Help with strings <godzilla@stomp.stomp.tokyo>
    Re: Help with strings <abe@ztreet.demon.nl>
        Hotmail/E-mail/HTML Question joel_ricker@my-deja.com
        how do I "redirect" a substitution? <webqueen@my-deja.com>
    Re: how do I "redirect" a substitution? <mike.solomon@eps.ltd.uk>
    Re: how do I "redirect" a substitution? <aqumsieh@hyperchip.com>
    Re: how to find what modules are available in a server (jason)
        how to setuid and setgid <dominic01@hotmail.com>
    Re: how to setuid and setgid <care227@attglobal.net>
    Re: Implementing java applets in my already embedded HT <brent.schenk@home.com>
    Re: Infinity ? (jason)
    Re: Infinity ? (jason)
    Re: Is there a NET::Time call to get remote time. Or so <tony_curtis32@yahoo.com>
    Re: Looking for a way to make the size of text smaller <tony_curtis32@yahoo.com>
    Re: Looking for a way to make the size of text smaller <blzbrthr@gte.net>
    Re: my vs. our <julien.quint@xrce.xerox.com>
    Re: my vs. our (Bart Lateur)
    Re: NET::SMTP <red_orc@my-deja.com>
    Re: NET::SMTP <dan@tuatha.sidhe.org>
        perl to read a given URL <ts@relson.net>
        Reminder: Perl haiku contest (Damian Conway)
    Re: sendmail in Win32 <sweeheng@usa.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 15 Jun 2000 06:57:52 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Help with strings
Message-Id: <3948E0E0.AED8ACC9@stomp.stomp.tokyo>

Mike Ray wrote:
 
> Hey Godz, are you smoking some whacky weed or do you 
> just like to hear yourself type? (Or maybe even both?.) Sheesh!

My goodness. Your ego writes just like someone else,
actually, just like many others, both male and female.

Do you know of Socrates and a game called chess?

Godzilla!


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

Date: Thu, 15 Jun 2000 16:55:55 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Help with strings
Message-Id: <81qhks4pj1pc282p15jal46a79nm2040ec@4ax.com>

On Thu, 15 Jun 2000 11:51:50 GMT, "Mike Ray" <noone@nowhere.org> wrote:
 ...

>                                                         The problem is
> the leading and trailing whitespace is NOT preset in the searched string
> (as confirmed by a hex dump). The searched string contains
> "[FORMNAME=NLD_Inquiry]" so the match result in $1 should be
> "NLD_Inquiry" without the leading and trailing whitespace. At this point
> I'm stumped as to why this whitespace is introduced into the $1 variable
> by the match operation.

Yes it sounds strange. From what you've posted so far, I created this
little example. It does work on my systems (perl 5.005_03 for linux/perl
5.6.0 for Win32). If this gives you the same trouble as you've
described, I think there is something wrong with your perl. If this
works, you problem lies elsewhere in the code, you might have striped it
for simplification.

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

my @PLines = ('[FORMNAME=NLD_Inquiry]');
my %Form = (FORMID=>'NLD_Inquiry');

for (my $k = 0; $k <= $#PLines; $k++) {
	if ($PLines[$k] =~ /FORMNAME/) {
		$PLines[$k] =~ /=(.+?)\]/;
		if ($Form{'FORMID'} eq $1) {#THIS LINE ALWAYS FAILS
			print "success!\n";
        	}
		print "\$1 => [$1]\n";
	}
}
__END__

> 
> In earlier debugging I had attempted to remove any whitespace (even
> though there is not any in my test data) with the following:
> 
> $foo = $1;
> $foo =~ tr/\s//; (and $foo =~ tr/\s//d;)

But tr/// doesn't recognize '\s' as the whitespace-class, as it doesn't
recognize classes at all.
Leaving the replace (second) part of tr/// empty, doesn't do what you
think (I won't quote perlop), that is what the /d modifier is for
indeed.

	$foo =~ tr/ \f\n\r\t//d; 


-- 
Good luck,
Abe


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

Date: Thu, 15 Jun 2000 13:01:23 GMT
From: joel_ricker@my-deja.com
Subject: Hotmail/E-mail/HTML Question
Message-Id: <8iak2o$o7k$1@nnrp1.deja.com>

I'm not sure this is exactly the forum I need to ask this question in
but its best I could find.  If someone knows of a better forum or
resource of information for this problem, please let me know.

  My problem is that as part of a site I'm doing, I'll be producing a
weekly e-mail newsletter that will show up in HTML form (hopefully).
I'm using a perl script to process a list of subscribers and then
sending out the appropriate page (btw, we're talking subscribed e-mail
addresses -- not spam). When I tested it, I tried sending it to my own
e-mail program (Pegasus) and it came up fine and also Hotmail.  In
Hotmail it shows up as a message with an attachment attached -- not the
way I'm looking for.

  A few technical details: I am including a Content-Type: text/html and
a DOCTYPE.  I'm may not be providing enough a header for Hotmail to
"trust" it as a web page.

I've included my source below (with some personal info removed to
protect the innocent).

use Net::SMTP;

$smtp = Net::SMTP->new('*REMOVED*');

$smtp->mail($ENV{USER});
$smtp->to('*REMOVED*');

$fromadd = "*REMOVED*";

$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("From: $fromadd\n");
$smtp->datasend("Content-Type: text/html");

$smtp->datasend('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">');
open (HTMLFILE, "testrun.htm");
while ($line = <HTMLFILE>) {
  $smtp->datasend("$line")
}

$smtp->dataend();

$smtp->quit;

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

I'd appreciate any help.

Thanks
Joel


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 15 Jun 2000 14:20:04 GMT
From: webqueen, queen of the web <webqueen@my-deja.com>
Subject: how do I "redirect" a substitution?
Message-Id: <8iaolv$ruf$1@nnrp1.deja.com>



I don't see this in the docs or camel. Often I want to use a regex to
extract or modify one string and store that result in another. Usually I
do something like:

 $s1='cat dog';
     .
     .
     .
 $s2=$s1;
 $s2 =~ s/cat/mouse/;

Is there a way to do the last 2 lines in one statement? Like split for
example, has the optional , at the end:

 @l= split / /,$myvar;

I'd like to do something like that:

 $s2 =~ s/cat/mouse/,$s1;

where we could still use switches if we wanted to:

 $s1 =~ s/cat/mouse/ig,$s1



--
Time is nature's way of preventing everything from happening at once.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 15 Jun 2000 15:34:45 +0100
From: "mike solomon" <mike.solomon@eps.ltd.uk>
Subject: Re: how do I "redirect" a substitution?
Message-Id: <8iapie$4d1g7$1@fu-berlin.de>

how about


$s1 = 'cat dog';
($s2 = $s1) =~ s/cat/mouse;


Regards


Mike Solomon


<webqueen>; queen of the web <webqueen@my-deja.com> wrote in message
news:8iaolv$ruf$1@nnrp1.deja.com...
>
>
> I don't see this in the docs or camel. Often I want to use a regex to
> extract or modify one string and store that result in another. Usually I
> do something like:
>
>  $s1='cat dog';
>      .
>      .
>      .
>  $s2=$s1;
>  $s2 =~ s/cat/mouse/;
>
> Is there a way to do the last 2 lines in one statement? Like split for
> example, has the optional , at the end:
>
>  @l= split / /,$myvar;
>
> I'd like to do something like that:
>
>  $s2 =~ s/cat/mouse/,$s1;
>
> where we could still use switches if we wanted to:
>
>  $s1 =~ s/cat/mouse/ig,$s1
>
>
>
> --
> Time is nature's way of preventing everything from happening at once.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.




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

Date: Thu, 15 Jun 2000 14:38:46 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: how do I "redirect" a substitution?
Message-Id: <7abt139fgo.fsf@merlin.hyperchip.com>


webqueen, queen of the web <webqueen@my-deja.com> writes:

> I don't see this in the docs or camel. 

It's in there. In perlop:

       Unlike in C, the assignment operator produces a valid
       lvalue.  Modifying an assignment is equivalent to doing
       the assignment and then modifying the variable that was
       assigned to.  This is useful for modifying a copy of
       something, like this:

           ($tmp = $global) =~ tr [A-Z] [a-z];

Please look harder next time.


>                                        Often I want to use a regex to
> extract or modify one string and store that result in another. Usually I
> do something like:
> 
>  $s1='cat dog';
>      .
>      .
>      .
>  $s2=$s1;
>  $s2 =~ s/cat/mouse/;
> 
> Is there a way to do the last 2 lines in one statement? 

	($s2 = $s1) =~ s/cat/mouse/;

--Ala


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

Date: Thu, 15 Jun 2000 13:31:36 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: how to find what modules are available in a server
Message-Id: <MPG.13b377ece4b6163498973a@news>

Debjit writes ..
>how to find what modules are available in a server? Like CGI, DBI, IO etc

I don't know if this is an approved method .. but I do this

  eval
  {
    require ModuleName;
  };

  die "Module load failed for 'ModuleName': $@" if $@;

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 15 Jun 2000 14:05:24 GMT
From: Dominic Prakash <dominic01@hotmail.com>
Subject: how to setuid and setgid
Message-Id: <8ianqm$r4p$1@nnrp1.deja.com>

Group,

I am an Administrator of a particular task. (But NOT ROOT). I want to
give certain permission to the common users to perform that task using
perlscripts. So that they will not bug me any more for each and
everything. The user will execute a Perlscript, and this script will
have (-r-sr-sr-x admin) persmissions.

How do I do that? Presently I am using an external C application with (-
r-sr-sr-x   1 admin) permissions. This C application just uses setuid
and setgid functions. How do I do that in Perl?

Thanks
Dominic


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 15 Jun 2000 10:49:18 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: how to setuid and setgid
Message-Id: <3948ECEE.EE6A5ED@attglobal.net>

Dominic Prakash wrote:
> 
> How do I do that? Presently I am using an external C application with (-
> r-sr-sr-x   1 admin) permissions. This C application just uses setuid
> and setgid functions. How do I do that in Perl?
> 


Learn thy operating system.  

$ man chmod

This has nothing to do with Perl.


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

Date: Thu, 15 Jun 2000 09:39:57 -0500
From: "Brent Schenk" <brent.schenk@home.com>
Subject: Re: Implementing java applets in my already embedded HTML
Message-Id: <3948ea43.0@news>

Hey,
thanks for reading it!  Anways, here is the Perl with the HTML embedded into
it with the applet parameters:

 print "Content-type: text/html\n\n";
 print qq|
<html>

<head>
<title>This is where the content goes</title>
<style fprolloverstyle>A:hover {color: #FFFF00; font-weight: bold}
</style>
</head>

<body stylesrc="../index2.html" background="../../../bg.jpg">

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="15%" valign="top"><table border="0" width="100%"
cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><b><font color="#FFFFFF">Job
Opportunities</font></b></td>
  </tr>
  <tr>
    <td width="100%">
      <p>
      <applet code="../../../fphover.class" codebase="./" width="143"
height="20">
        <param name="hovercolor" value="#FFFF00">
        <param name="font" value="Helvetica">
        <param name="fontstyle" value="bold">
        <param name="fontsize" value="14">
        <param name="url" valuetype="ref"
value="http://www.contactpdi.com/job_opportunities/descriptions/index.html">
        <param name="text" value="Job Descriptions">
        <param name="color" value="#000000">
        <param name="textcolor" value="#FFFFFF">
        <param name="effect" value="glow">
      </applet>

Hopefully that'll show up and not as HTML.  Anways, that is just part of the
program, but it is one applet and they all look the same way.  Thanks alot
for any help that you can give me!

Brent "ProtoFrag" Schenk
Tony Curtis <tony_curtis32@yahoo.com> wrote in message
news:87em60jlq2.fsf@limey.hpcc.uh.edu...
> >> On Wed, 14 Jun 2000 10:57:19 -0500,
> >> "Brent Schenk" <brent.schenk@home.com> said:
>
> > Hi, I have a perl script written that is for use of CGI.
> > When the CGI is called it runs and then generates an
> > HTML page.  I have one problem.  My menu on the side is
> > all java applets and it seems that when I call them from
> > a script it just won't work.  The applets work fine in
> > just plain HTML.  Is this a limit of Perl or do I have
>
> There is absolutely no difference.  The browser just sees
> the HTML source code coming back from the server, no
> matter how it was originally represented there.
>
> Tell perl to output HTML containing applet tags and it
> will do that.  Anything after that is a matter between the
> browser and the server.
>
> > to use some special calls.  I have gotten redirection
> > java scripts to work with perl, but not my applets.  Is
> > there a work around for this?
>
> I suspect the problem lies elsewhere.
>
> You'll have to post code (not the java stuff please) and
> more information otherwise all you'll get are wild
> guesses.
>
> A CGI or web-server newsgroup may offer you more on-topic
> help.
>
> hth
> t
> --
> "Trying is the first step towards failure"
>                                            Homer Simpson




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

Date: Thu, 15 Jun 2000 13:45:27 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Infinity ?
Message-Id: <MPG.13b37b28469025c898973b@news>

Paul GABORIT writes ..
>> > PS: i can't find the word 'Infinity' in source codes of Perl...:-(
>> 
>> Maybe just "Inf" then?
>
>	> perl -le 'print 2**1024'
>	Infinity
>	>
>
>How and where perl finds the word 'Infinity' ?

it's some IEEE thing .. mentioned in perldata and perlfaq4 .. you can't 
assign it TO a number .. it's not a constant .. it's an overflow thing - 
like the 'E' on a high school calculator when you overflowed the 
positions of the calc

Damian was correct .. taking the compliment of zero and raising it to 
the power of itself will get an overflow every time .. in fact I'd 
hazard a guess that raising 2 to zero's compliment will overflow any 
system .. but better to be safe than sorry

>With MacPerl, i obtained 'Inf' instead of 'Infinity'...

ActiveState use '1.#INF' on Win32 (well .. WinNT anyway ;)

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 15 Jun 2000 13:47:27 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Infinity ?
Message-Id: <MPG.13b37ba2819d921d98973c@news>

Ilmari Karonen writes ..
>In article <8ia539$3gb$1@towncrier.cc.monash.edu.au>, Damian Conway wrote:
>>So build your infinity out of machine-dependent components:
>>
>>	$inf = (~0)**(~0); 
>
>And exactly what is this supposed to accomplish?
>
>  $ perl -le 'print (~0)**(~0)'
>  4294967295
>
>Not the -1 I was expecting, but not infinity either.

watch your parenthesis .. you're printing zeros compliment and then 
raising the result of that print to the power of zeros compliment and 
discarding the result

try

  perl -le 'print( (~0)**(~0))'  

-- 
 jason - elephant@squirrelgroup.com -


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

Date: 15 Jun 2000 09:21:30 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Is there a NET::Time call to get remote time. Or something like that
Message-Id: <873dmfja8l.fsf@limey.hpcc.uh.edu>

>> On 15 Jun 2000 06:01:53 GMT,
>> nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar) said:

> In article <anZ15.23$1x4.1433@nsw.nnrp.telstra.net>,
> Robert Chalmers <robert@chalmers.com.au> wrote:
>> Is there a call to retrieve the time from a system
>> (port 13 I think) - Maybe in NET or something like
>> that. I can't find anyting, but that doesn't mean
>> anyting.

> You're thinking of Network Time Protocol (NTP), on port
> 123.

Yes, there's ntp (& rdate) but there's also, from
/etc/services:

    daytime         13/tcp
    daytime         13/udp
    time            37/tcp          timserver
    time            37/udp          timserver

(may or may not be activated)

http://search.cpan.org/ would be a good place to look for
info on network/time modules.

hth
t
-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: 15 Jun 2000 09:15:32 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Looking for a way to make the size of text smaller
Message-Id: <8766rbjaij.fsf@limey.hpcc.uh.edu>

>> On Thu, 15 Jun 2000 03:50:37 GMT,
>> "Chris" <blzbrthr@gte.net> said:

> Hello.  I'm working on a program that does a few things
> and then deposits what it does into a file.  Fairly,
> typical, I'm guessing. And yet, one thing vexes me.  I
> want to print what was deposited into the file, on to an
> 8.5x11 sheet of paper, but what I want to print is to
> large for the page.

> I've searched perldoc for info on font size and
> character size and haven't found anything.  Maybe I'm
> not looking in the right place.

This isn't perl's job.  Perl isn't bound to any operating
medium (just like HTML shouldn't be).

If you want to force output of a certain format you need
to tell perl to write out something that will produce that
format.

Things that come to mind immediately are PostScript,
and...err...PostScript.  Possibly PDF.

If there's a groovy module you'll find it at

    http://search.cpan.org/

hth
t
-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Thu, 15 Jun 2000 14:30:26 GMT
From: "Chris" <blzbrthr@gte.net>
Subject: Re: Looking for a way to make the size of text smaller
Message-Id: <6M525.78$YR2.66206@paloalto-snr1.gtei.net>

Thanks.  I'll check it.



Tony Curtis <tony_curtis32@yahoo.com> wrote in message
news:8766rbjaij.fsf@limey.hpcc.uh.edu...
> >> On Thu, 15 Jun 2000 03:50:37 GMT,
> >> "Chris" <blzbrthr@gte.net> said:
>
> > Hello.  I'm working on a program that does a few things
> > and then deposits what it does into a file.  Fairly,
> > typical, I'm guessing. And yet, one thing vexes me.  I
> > want to print what was deposited into the file, on to an
> > 8.5x11 sheet of paper, but what I want to print is to
> > large for the page.
>
> > I've searched perldoc for info on font size and
> > character size and haven't found anything.  Maybe I'm
> > not looking in the right place.
>
> This isn't perl's job.  Perl isn't bound to any operating
> medium (just like HTML shouldn't be).
>
> If you want to force output of a certain format you need
> to tell perl to write out something that will produce that
> format.
>
> Things that come to mind immediately are PostScript,
> and...err...PostScript.  Possibly PDF.
>
> If there's a groovy module you'll find it at
>
>     http://search.cpan.org/
>
> hth
> t
> --
> "Trying is the first step towards failure"
>                                            Homer Simpson




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

Date: 15 Jun 2000 15:32:29 +0200
From: Julien Quint <julien.quint@xrce.xerox.com>
Subject: Re: my vs. our
Message-Id: <thr99z2hoy.fsf@mont-chauve.grenoble.xrce.xerox.com>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:

> Just one nit to pick: unlike my(), local() is really concerned with
> values, not variables.  That is, you can local()ize individual array
> or hash elements.

I guess it opens plenty of possibilities for obfuscated code!

-- 
Julien


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

Date: Thu, 15 Jun 2000 14:33:04 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: my vs. our
Message-Id: <3948e8ba.22745046@news.skynet.be>

Anno Siegel wrote:

>Just one nit to pick: unlike my(), local() is really concerned with
>values, not variables.  That is, you can local()ize individual array
>or hash elements. Witness

>While this feature is unlikely to be of much practical use, i think
>it bears mentioning in this context.

It does. And it has it's uses. Simply think of %SIG, where you can
temporarily change $SIG{__WARN__} or $SIG{__DIE__}, without affecting
any of the other signal handlers.

-- 
	Bart.


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

Date: Thu, 15 Jun 2000 13:04:38 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: NET::SMTP
Message-Id: <8iak8r$o8t$1@nnrp1.deja.com>

In article <8i8su3$pc6$1@news.chatlink.com>,
  "Timothy H. Schilbach" <tschilbach@aodinc.com> wrote:
>
>
> Can't call method "mail" on an undefined value at
> I:\aodinc.com\cgi-bin\signup.pl line 298.
>
> Below I have imput the lines of code as well. For some reason its not
> recognizing the "mail" command. Without this varable, the message
> would not be sent to the user. Any suggestions on how to overcome
> this? I have commented the troubled line.
>
>   $smtp->mail($ENV{USER});              # This is the line it says it
> cannot recognize
>

seems to me that the diagnostic is complaining about $ENV{USER}, not the
'mail' method.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 15 Jun 2000 14:07:38 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: NET::SMTP
Message-Id: <Kq525.1163$Zg4.6078@news1.rdc1.ct.home.com>

Timothy H. Schilbach <tschilbach@aodinc.com> wrote:
> Dan,

>   No upgrades of PERL over libnet. It works in all my other apps except for
> this one. All my casing is correct (went back and corrected it) and yet
> still get the same results. Any other suggestions?


Two:

1) (non-topic-specific) Stop jeapordy-quoting, please! Makes it tough to
track what's going on

2) Check to make sure the Net::SMTP->new call actually suceeded. You don't
check, and it could well have failed. That'd leave you calling a method on
undef, which won't work too well... :)

				Dan


> --
> Timothy H. Schilbach
> Alpha Omega Design Inc.
> tschilbach@aodinc.com
> 1-877-263-7094
> Visit our website at www.aodinc.com

> Dan Sugalski <dan@tuatha.sidhe.org> wrote in message
> news:dkX15.1123$Zg4.5233@news1.rdc1.ct.home.com...
>> Timothy H. Schilbach <tschilbach@aodinc.com> wrote:
>> > Dan,
>>
>> >   This did not fix the problem, get the same errors reguardless. PERL on
> NT
>> > doesnt seem to be case sensitive.  Any other suggestions?
>>
>> Perl on NT is case-sensitive. Perl everywhere is case-sensitive. (Actually
>> you can get away with the "use" bit in a case-insensitve manner on systems
>> with case-insensitive filesystems, but it can cause problems and is
>> generally a good way to get unreliable results. Been there. Done that.
>> Didn't like it... :)
>>
>> Did you maybe upgrade perl over an existing libnet install? That might
>> cause you problems of some sort, and a reinstall can't hurt. It's
>> certainly easy enough with PPM.
>>
>> Dan
>>
>> > "Timothy H. Schilbach" <tschilbach@aodinc.com> wrote in message
>> > news:8i8su3$pc6$1@news.chatlink.com...
>> >> Ok here is a simple question and some background.  I have a script that
>> >> automatically activates user accounts when they signup for our
> services.
>> >> This works great except for the NET::SMTP section that is supposed to
>> > email
>> >> the client and then the administrator when the account is activated. I
>> > keep
>> >> getting this:
>> >>
>> >> Can't call method "mail" on an undefined value at
>> >> I:\aodinc.com\cgi-bin\signup.pl line 298.
>> >>
>> >> Below I have imput the lines of code as well. For some reason its not
>> >> recognizing the "mail" command. Without this varable, the message would
>> > not
>> >> be sent to the user. Any suggestions on how to overcome this? I have
>> >> commented the troubled line.
>> >>
>> >> Code:
>> >> sub sendmailtouser {
>> >>
>> >> if ($FORM{'email'} =~ /\@/) {
>> >>
>> >>   use NET::SMTP;
>> >>
>> >>   $smtp = Net::SMTP->new($server);
>> >>   $smtp->mail($ENV{USER});              # This is the line it says it
>> > cannot
>> >> recognize
>> >>
>> >>   $smtp->to("$FORM{'email'}\n");
>> >>
>> >>   $SMTP->data();
>> >>   $SMTP->datasend("From: Automated Server\n");
>> >>   $SMTP->datasend("To: $FORM{'first_name'}\n");
>> >>   $SMTP->datasend("Subject: Internet Service Order Completed.\n");
>> >>   $SMTP->datasend("\n");
>> >>
>> >>   $SMTP->datasend("Below is your account information\n");
>> >>   $SMTP->datasend("please print this out for your reference:\n\n");
>> >>   $SMTP->datasend("Dial-Up Username: ${dialuser}\n");
>> >>   $SMTP->datasend("Dial-Up Password: $FORM{'password'}\n");
>> >>   $SMTP->datasend("Access Numbers: $location\n\n");
>> >>
>> >>   $SMTP->datasend("Newsgroup Username: newservice\n");
>> >>   $SMTP->datasend("Newsgroup Password: begin\n");
>> >>   $SMTP->datasend("Newsgroup Server:   ${news}\n\n");
>> >>
>> >>   if ($e =~ /1|3/) {
>> >>     $SMTP->datasend("Email Username: $FORM{'username'}\n");
>> >>     $SMTP->datasend("Email Password: $FORM{'password'}\n");
>> >>   }
>> >>
>> >>   $SMTP->datasend("Incoming Mail Server: ${pop}\n");
>> >>   $SMTP->datasend("Outgoing Mail Server: ${smtp}\n\n");
>> >>
>> >>   if ($e =~ /2|3/) {
>> >>     $SMTP->datasend("FTP Username: $FORM{'username'}\n");
>> >>     $SMTP->datasend("FTP Password: $FORM{'password'}\n");
>> >>     $SMTP->datasend("FTP Server: ${ftp}\n");
>> >>     $SMTP->datasend("Web Address:
>> >> http://members.${domain}/$FORM{'username'}/\n");
>> >>   }
>> >>
>> >>   $SMTP->datasend("If you have any problems, please call $phone\n");
>> >>   $SMTP->datasend();
>> >>
>> >>   $SMTP->quit;
>> >>
>> >> } }
>> >>
>> >> --
>> >> Timothy H. Schilbach
>> >> Alpha Omega Design Inc.
>> >> tschilbach@aodinc.com
>> >> 1-877-263-7094
>> >> Visit our website at www.aodinc.com
>> >>
>> >>
>>
>>




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

Date: Thu, 15 Jun 2000 15:52:20 +0100
From: "Tony Shrimpoton" <ts@relson.net>
Subject: perl to read a given URL
Message-Id: <8iaqj5$mtk$1@vg170.it.volvo.se>

Hi All ,

        I need to write a bit of perl to go to a specific web page and then
check for results on that page and then it needs to update our DB if
specific fields are found. The DB bit if fine its just the part where i need
to fetch the given url

any suggestions where i can find any information on this?

Thanks


TS




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

Date: 15 Jun 2000 00:19:45 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Reminder: Perl haiku contest
Message-Id: <8i97f1$rp8$1@towncrier.cc.monash.edu.au>

Just a reminder
that the Perl haiku contest
is still underway.

A $100
O'Reilly book voucher is
the prize for the best.

You can enter at:
history.perl.org
/CHI/


Damian


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

Date: Thu, 15 Jun 2000 21:13:40 +0800
From: "Swee Heng" <sweeheng@usa.net>
Subject: Re: sendmail in Win32
Message-Id: <8iakeq$m23$1@violet.singnet.com.sg>

> Why ActivePerl 5.6 for Win32 does not provide the "sendmail" module in the
> lib?
If some module does not come with a distribution of Perl, go look for it at
http://search.cpan.org.

> Is this can't be used in Win32?
> If so, how can I send mail in Win32?
See the Net::SMTP module, the MIME::Lite module, etc. Do a search on
deja.com against this newsgroup. Many people have asked similar questions.

Swee Heng




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

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 V9 Issue 3371
**************************************


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