[16103] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3515 Volume: 9

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

Date: Thu, 29 Jun 2000 15:15:27 -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: <962316927-v9-i3515@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 29 Jun 2000     Volume: 9 Number: 3515

Today's topics:
    Re: Perl Tk dynamic widget allocation <aqumsieh@hyperchip.com>
    Re: Perl Tk dynamic widget allocation <aqumsieh@hyperchip.com>
    Re: Perl Tk dynamic widget allocation (LMC)
    Re: Perl Tk dynamic widget allocation <stephen.kloder@gtri.gatech.edu>
    Re: Perl+MySQL Profi fuer Projekt gesucht!! <gellyfish@gellyfish.com>
        problem comparing dates tgfree@usa.net
    Re: problem comparing dates <care227@attglobal.net>
    Re: problem comparing dates tgfree@my-deja.com
        Problems installing perl on PC (Neil Jones)
        Random number generator <lkembelNOSPAM@cgocable.net>
    Re: Random number generator <care227@attglobal.net>
    Re: regex - slurp file and extract email addresses <jbroz@yperite.demon.co.uk>
    Re: regex - slurp file and extract email addresses <gellyfish@gellyfish.com>
    Re: regex brain teaser (Craig Berry)
        sending a password to a server. <andrew.g.bacchi@hitchcock.NOSPAM.org>
        shouldn't sort return a list? tmorset@tus.ssi1.com
    Re: shouldn't sort return a list? <tony_curtis32@yahoo.com>
    Re: shouldn't sort return a list? <aqumsieh@hyperchip.com>
    Re: shouldn't sort return a list? <aqumsieh@hyperchip.com>
    Re: shouldn't sort return a list? jlamport@calarts.edu
        Specifying smtp server in Mail::Mailer <rosenbse@muohio.edu>
        Strange behavior of forking server in performance graph nawkboy@my-deja.com
    Re: Strange behaviour in upper case conversion (Tad McClellan)
    Re: Strange behaviour in upper case conversion <care227@attglobal.net>
    Re: Teen Volenteers WANTED <jbroz@yperite.demon.co.uk>
    Re: Teen Volenteers WANTED <gellyfish@gellyfish.com>
    Re: V4 vs V5 sourcing problem <jbroz@yperite.demon.co.uk>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 29 Jun 2000 18:06:10 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Perl Tk dynamic widget allocation
Message-Id: <7a1z1g746k.fsf@merlin.hyperchip.com>


Stephen Kloder <stephen.kloder@gtri.gatech.edu> writes:

> "Francois Eric (LMC)" wrote:

> >   $T->tag(qw/bind $tmp_tag <1>/ => sub {&disp_user_info($i)});
> 
> Change this to:
>   $T->tag(qw/bind $tmp_tag <1>/ => [\&disp_user_info, $i])});

Bad advice. You should look more carefully at the qw// operator. It
doesn't interpolate.

--Ala


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

Date: Thu, 29 Jun 2000 18:16:01 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Perl Tk dynamic widget allocation
Message-Id: <7aya3o5p5q.fsf@merlin.hyperchip.com>


"Francois Eric (LMC)" <lmcfrer@lmc.ericsson.se> writes:

> Hello,
> 
> In the GUI I am creating, I have an array that has info on users :
> @user_info[$i]. Its a two dimensionnal array: first dimension being the

@user_info[$i] is an array slice of one element. Check out perlfaq4:

	What is the difference between $array[1] and @array[1]?

[snip]

> My problem is that when I run the program, I have no problem seeing all
> the users ($user_info[$i][0]) but when I click on one of these users in
> the GUI, no info is printed out by disp_user_info() because the argument
> received is always 21.  This 21 comes from the fact that there are 21
> users in the file. In other words, I specify in the tag: sub
> {&disp_user_info($i)}, but once the function is called by "MainLoop" it
> takes the value $i as it is at that time (which is 21 of course since
> the MainLoop is outside of the "for" loop).
> 
> How can I give an argument to my tag that is dynamic, so that I don't
> have to hardcode the whole thing?

> ...
> for ($i=0;$i<$number_users;$i++)
> {
>   $tmp_tag = "a" . $i;
> 
>   $T->tag(qw/bind $tmp_tag <1>/ => sub {&disp_user_info($i)});
>   $T->insert('end', "\t$user_info[$i][0]\n", [qw/demo $tmp_tag/]);
> }
> 
> MainLoop;

The reason is the $i is a global variable. Just change your for()
statement to:

	for my $i (0 .. $number_users-1)

Also qw// does not interpolate variables. So $tmp_tag will be passes
verbatim; it won't be actually changes to a0, a1, etc ..

--Ala


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

Date: Thu, 29 Jun 2000 15:06:24 -0400
From: "Francois Eric (LMC)" <lmcfrer@lmc.ericsson.se>
Subject: Re: Perl Tk dynamic widget allocation
Message-Id: <395B9E30.FE829B20@lmc.ericsson.se>

Both solutions did not work.  Here is the problem again

Thank you anyway,

Francois

Hello,

In the GUI I am creating, I have an array that has info on users :
@user_info[$i]. Its a two dimensionnal array: first dimension being the
user and second dimension the info.  Now I fetch that information from a
file (user and info on user) so the number of users is not determined in
advance.  That is why I have did the following code. $number_users gives
the number of users found in the file and $T is a text widget.

My problem is that when I run the program, I have no problem seeing all
the users ($user_info[$i][0]) but when I click on one of these users in
the GUI, no info is printed out by disp_user_info() because the argument
received is always 21.  This 21 comes from the fact that there are 21
users in the file. In other words, I specify in the tag: sub
{&disp_user_info($i)}, but once the function is called by "MainLoop" it
takes the value $i as it is at that time (which is 21 of course since
the MainLoop is outside of the "for" loop).

How can I give an argument to my tag that is dynamic, so that I don't
have to hardcode the whole thing?

thank you very much

Francois

 ...
for ($i=0;$i<$number_users;$i++)
{
  $tmp_tag = "a" . $i;

  $T->tag(qw/bind $tmp_tag <1>/ => sub {&disp_user_info($i)});
  $T->insert('end', "\t$user_info[$i][0]\n", [qw/demo $tmp_tag/]);
}

MainLoop;


sub disp_user_info
{
  my $a = $_[0];

  print "argument received: $a\n\n";
  print "Nom:       $user_info[$a][0]\n";
  print "Position:  $user_info[$a][1]\n";
  print "E-mail:    $user_info[$a][2]\n";
  print "Tel1er:    $user_info[$a][3]\n";
  print "Telsecond: $user_info[$a][4]\n\n";
}

Ala Qumsieh wrote:

> "Francois Eric (LMC)" <lmcfrer@lmc.ericsson.se> writes:
>
> > Hello,
> >
> > In the GUI I am creating, I have an array that has info on users :
> > @user_info[$i]. Its a two dimensionnal array: first dimension being the
>
> @user_info[$i] is an array slice of one element. Check out perlfaq4:
>
>         What is the difference between $array[1] and @array[1]?
>
> [snip]
>
> > My problem is that when I run the program, I have no problem seeing all
> > the users ($user_info[$i][0]) but when I click on one of these users in
> > the GUI, no info is printed out by disp_user_info() because the argument
> > received is always 21.  This 21 comes from the fact that there are 21
> > users in the file. In other words, I specify in the tag: sub
> > {&disp_user_info($i)}, but once the function is called by "MainLoop" it
> > takes the value $i as it is at that time (which is 21 of course since
> > the MainLoop is outside of the "for" loop).
> >
> > How can I give an argument to my tag that is dynamic, so that I don't
> > have to hardcode the whole thing?
>
> > ...
> > for ($i=0;$i<$number_users;$i++)
> > {
> >   $tmp_tag = "a" . $i;
> >
> >   $T->tag(qw/bind $tmp_tag <1>/ => sub {&disp_user_info($i)});
> >   $T->insert('end', "\t$user_info[$i][0]\n", [qw/demo $tmp_tag/]);
> > }
> >
> > MainLoop;
>
> The reason is the $i is a global variable. Just change your for()
> statement to:
>
>         for my $i (0 .. $number_users-1)
>
> Also qw// does not interpolate variables. So $tmp_tag will be passes
> verbatim; it won't be actually changes to a0, a1, etc ..
>
> --Ala



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

Date: Thu, 29 Jun 2000 16:41:50 -0400
From: Stephen Kloder <stephen.kloder@gtri.gatech.edu>
Subject: Re: Perl Tk dynamic widget allocation
Message-Id: <395BB48D.4D0E24C9@gtri.gatech.edu>

"Francois Eric (LMC)" wrote:

> Both solutions did not work.  Here is the problem again
>
> Thank you anyway,
>
>

> My problem is that when I run the program, I have no problem seeing all
> the users ($user_info[$i][0]) but when I click on one of these users in
> the GUI, no info is printed out by disp_user_info() because the argument
> received is always 21.  This 21 comes from the fact that there are 21
> users in the file. In other words, I specify in the tag: sub
> {&disp_user_info($i)}, but once the function is called by "MainLoop" it
> takes the value $i as it is at that time (which is 21 of course since
> the MainLoop is outside of the "for" loop).
>

Are you sure this is the reason it fails?  If it is, then the fix I sent you
should work.  For example, if I run:
#!c:\perl\bin\perl -w
use Tk;
$mw = MainWindow->new;
for($i=0;$i<10;$i++) {
  $mw->Button(-text => $i,
       -command => sub {print $i})->pack;

}

MainLoop;

each button will cause "10" to be printed, but if I change the command line to:
       -command => [sub {print @_}, $i])->pack;
each button will cause its label to be printed.


> sub disp_user_info
> {
>   my $a = $_[0];
>
>   print "argument received: $a\n\n";
>   print "Nom:       $user_info[$a][0]\n";
>   print "Position:  $user_info[$a][1]\n";
>   print "E-mail:    $user_info[$a][2]\n";
>   print "Tel1er:    $user_info[$a][3]\n";
>   print "Telsecond: $user_info[$a][4]\n\n";
> }
>

Are you sure this function is even being called?  If it is being called with the
wrong parameter, it should print all the literal text, plus some "Undefined"
errors.  Maybe you should add a "print @_" statement to the beginning of your
function.




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

Date: 30 Jun 2000 00:37:06 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl+MySQL Profi fuer Projekt gesucht!!
Message-Id: <8jgmj2$cla$1@orpheus.gellyfish.com>

On Thu, 29 Jun 2000 07:24:25 GMT R.Schweier wrote:
> Hallo,
> 
> für umfangreiche Projekte suchen wir einen Perl-Profi
> oder Software-Schmiede zur externen Verstärkung.

I dont speak German, but I think I should refer you to David Adler's
regular post on the matter of job postings ...

/J\
-- 
** This space reserved for venue sponsor for yapc::Europe **
              <http://www.yapc.org/Europe/> 


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

Date: Thu, 29 Jun 2000 18:33:15 GMT
From: tgfree@usa.net
Subject: problem comparing dates
Message-Id: <8jg4pb$mpu$1@nnrp1.deja.com>

I have a web page that passes a month to the script.

Ex. User chooses January, the form passes "Jan".

The script takes this input and places into a variable called $date.

When I use an if statement and compare $date with another variable
which has the same value, it returns false.

The variable that $date is being compared to has the following value 1-
Jun-00 and sometimes 12-Jun-00.

I used the following to extract the month:

$datepiece = substr($piece[9],2,4);
$datepiece =~ s/-//g;

When I run a for loop, both variables are the same, however when I use
an if statement, it returns false.

This is my if statement:

if ($date eq $datepiece || $date eq "All Months") {
do something
}

Does anybody know why this if statement is false?

Thanks for any help.


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


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

Date: Thu, 29 Jun 2000 14:47:24 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: problem comparing dates
Message-Id: <395B99BC.9584C2CD@attglobal.net>

tgfree@usa.net wrote:
> 
> 
> if ($date eq $datepiece || $date eq "All Months") {
> do something
> }

Have you tried printing the variables to see what they contain?
Might there be some newlines or carriage returns hiding somewhere?


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

Date: Thu, 29 Jun 2000 19:37:06 GMT
From: tgfree@my-deja.com
Subject: Re: problem comparing dates
Message-Id: <8jg8h1$q2g$1@nnrp1.deja.com>

In article <395B99BC.9584C2CD@attglobal.net>,
  Drew Simonis <care227@attglobal.net> wrote:
> tgfree@usa.net wrote:
> >
> >
> > if ($date eq $datepiece || $date eq "All Months") {
> > do something
> > }
>
> Have you tried printing the variables to see what they contain?
> Might there be some newlines or carriage returns hiding somewhere?
>

Thanks for the response but I tried chomp() and chop() just in case and
it did not work.

I printed both vars one next to another and they look exactly the same.


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


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

Date: Thu, 29 Jun 00 20:16:45 GMT
From: Neil@nwjones.demon.co.uk (Neil Jones)
Subject: Problems installing perl on PC
Message-Id: <962309805snz@nwjones.demon.co.uk>

I have a real problem installing perl on my laptop.
It is active Perl from a file APi522e.exe
It installed fine on my desktop machine some while ago but when I went to
install it on the laptop today I ran into problems.
The first time I ran out of space on the hard disk which 
is probably the cause of my current problems.
I currently have 37,502,976 bytes free after removing the failed
installation.

My current problem is that it goes through the installation but
fails at 80% giving a message that it can not install the 
Perl Interpreter and that it is aborting the installation.

I have tried installing it in different directories as suggested
by the blurb in the package as it installs but to no avail.
It won't always uninstall either since what ever it is 
that enables it to be registered as present to windows
presumably fails too. (I have to deltree from a DOS prompt.)

Can any one please help?

TIA

-- 
Neil Jones- Neil@nwjones.demon.co.uk http://www.nwjones.demon.co.uk/



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

Date: Thu, 29 Jun 2000 19:45:46 GMT
From: "Lee Kembel" <lkembelNOSPAM@cgocable.net>
Subject: Random number generator
Message-Id: <KHN65.84427$7o1.2001915@news2.rdc1.on.home.com>

How does Perl choose a random number? Does it use a random seed? Most
importantly, how random is this number? If I sat down for a couple days and
analyzed it, is there any way I'd be able to predict a number?

LKembel




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

Date: Thu, 29 Jun 2000 15:53:54 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Random number generator
Message-Id: <395BA952.BBBA34FC@attglobal.net>

Lee Kembel wrote:
> 
> How does Perl choose a random number? Does it use a random seed? Most
> importantly, how random is this number? If I sat down for a couple days and
> analyzed it, is there any way I'd be able to predict a number?

Take a read at:

$ perldoc -q random


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

Date: Thu, 29 Jun 2000 21:53:38 +0100
From: jb <jbroz@yperite.demon.co.uk>
Subject: Re: regex - slurp file and extract email addresses
Message-Id: <395BB752.1AE9A634@yperite.demon.co.uk>

Chris Sorensen wrote:
> 
> thank you .. now there are two books I need to pickup today :p
> Mastering Regular Expressions and the Perl Cookbook
> 

Indeed. The perl cookbook points out (in section 6.19) that there is no
solution to your problem, only a compromise that will not work in all
cases.


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

Date: 29 Jun 2000 23:38:08 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: regex - slurp file and extract email addresses
Message-Id: <8jgj4g$1br$1@orpheus.gellyfish.com>

On 29 Jun 2000 05:15:00 EDT Abigail wrote:
> Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCDXCIV September
> MCMXCIII in <URL:news:8jf3si$uft$1@orpheus.gellyfish.com>:
> )) 
> )) But people arent saying that what you are proposing is a worse way of
> )) searching for e-mail addresses , they are saying that it isnt a way of
> )) searching for *e-mail addresses* at all.  You might as well print every
> )) line of the text with an '@' in it for all the hand cleaning you are
> )) going to have to do with your data (and even that isnt foolproof as the
> )) address might easily have a newline in it).
> 
> 
> And let's not forget, not every address has a @ in it.
> 

Yes, but one doesnt like to mention 'bang path' in the company of some of
these boys ...

/J\
-- 
** This space reserved for venue sponsor for yapc::Europe **
              <http://www.yapc.org/Europe/> 


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

Date: Thu, 29 Jun 2000 18:54:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: regex brain teaser
Message-Id: <sln6r3aejev83@corp.supernews.com>

Jonah (nomail@nomail.com) wrote:
: I need to allow the following pattern:
: any number of words separated by a "/"
: Anything that doesn't match this is an error.
: In this case, a word is defined by any \w or \d character, but no spaces
: anywhere, and no \W

Note that \w is a superset of \d.

: Also, the slash, "/" can't be at the beginning or at the
: end of the string.
: And if the user entered nothing at all, that's also acceptable.

It's unclear from the above whether there can be more than one "/"; I'm
assuming there can be.  I'd tend to do, this, assuming string to be tested
is in $_: 

  $is_ok = m!/! && ! (m![^\w/]! || m!^/! || m!/$!);

That is, going clause by clause:

* Make sure there's at least one slash, and
* Make sure that none of these are true:
  * There are non-word, non-slash chars in the string, or
  * There is a slash at the beginning of the string, or
  * There is a slash at the end of the string

Sometimes using more than one regex and some boolean ops is a lot easier
than trying to cram all the logic into one regex.

-- 
   |   Craig Berry - http://www.cinenet.net/users/cberry/home.html
 --*--  "Beauty and strength, leaping laughter and delicious
   |   languor, force and fire, are of us." - Liber AL II:20


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

Date: Thu, 29 Jun 2000 14:08:07 -0400
From: Andrew Bacchi <andrew.g.bacchi@hitchcock.NOSPAM.org>
Subject: sending a password to a server.
Message-Id: <395B9087.546BDB6D@hitchcock.NOSPAM.org>

I have to send a password to a server to restart it from a Perl script.
Can someone tell me where to look to do this?  A hint would be helpful.
TIA.



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

Date: Thu, 29 Jun 2000 19:08:41 GMT
From: tmorset@tus.ssi1.com
Subject: shouldn't sort return a list?
Message-Id: <8jg6ra$oih$1@nnrp1.deja.com>

Perl gurus,

I have two questions on list processing that I hope someone
can help me with.  I can't understand why the following code
prints 2 instead of 5 or 6.  Shouldn't keys %h return a
list to the scalar function, which should then return the
last item in the list to print out?  Are temporary arrays
being used?  I must be missing something here.

I also can't understand why if I try to sort the keys in the
subroutine with

	return sort keys %h;

I get an 'uninitialized value' error in the print statement.
Given what keys %h returned, it seems I should get the same
answer of 2 even if I sort the keys.  Any help would be
appreciated, thanks.


#!/usr/local/bin/perl5 -w
print "Scalar of return ", scalar a(), "\n";
sub a
{
    my %h = (5 => 7,
             6 => 8,);

    return keys %h;
}



Tim Morse



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


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

Date: 29 Jun 2000 14:30:35 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: shouldn't sort return a list?
Message-Id: <878zvoffok.fsf@limey.hpcc.uh.edu>


>> On Thu, 29 Jun 2000 19:08:41 GMT,
>> tmorset@tus.ssi1.com said:

> I hope someone can help me with.  I can't understand why
> the following code prints 2 instead of 5 or 6.

> #!/usr/local/bin/perl5 -w

use strict;

> print "Scalar of return ", scalar a(), "\n";
> sub a {
>     my %h = (5 => 7, 6 => 8,);
>     return keys %h;
> }

perldoc -f keys

   keys HASH
           Returns a list consisting of all the keys of the
           named hash.  (In scalar context, returns the
           number of keys.)  The keys are returned in an
           apparently random order.

Since the keys are {5,6} that's why you get 2 (count 'em
:-).

When I test/run this here, I don't get any "uninitialised"
messages.  Is this the whole code or just a snippet?

You might like to try "wantarray" (perldoc -f wantarray)
to predicate the return value from your sub.

    sub a {
	my %h = (5 => 7, 6 => 8,);
	my @ret = keys %h;
	wantarray ? @ret : pop(@ret);
    }

which will give you one of the keys.

hth
t
-- 
"With $10,000, we'd be millionaires!"
                                           Homer Simpson



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

Date: Thu, 29 Jun 2000 19:35:46 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: shouldn't sort return a list?
Message-Id: <7an1k45lgr.fsf@merlin.hyperchip.com>


tmorset@tus.ssi1.com writes:

> Perl gurus,
> 
> I have two questions on list processing that I hope someone
> can help me with.  I can't understand why the following code
> prints 2 instead of 5 or 6.  Shouldn't keys %h return a
> list to the scalar function, which should then return the
> last item in the list to print out?  Are temporary arrays
> being used?  I must be missing something here.

You are missing a good read of the docs :-)

    % perldoc -f keys
    keys HASH
            Returns a list consisting of all the keys of the named
            hash. (In a scalar context, returns the number of keys.)

> I also can't understand why if I try to sort the keys in the
> subroutine with
> 
> 	return sort keys %h;
> 
> I get an 'uninitialized value' error in the print statement.
> Given what keys %h returned, it seems I should get the same
> answer of 2 even if I sort the keys.  Any help would be
> appreciated, thanks.
> 
> 
> #!/usr/local/bin/perl5 -w
> print "Scalar of return ", scalar a(), "\n";
> sub a
> {
>     my %h = (5 => 7,
>              6 => 8,);
> 
>     return keys %h;
> }

I can't explain the reason for the uninitialized warning. But, what
baffles me is why do you want to sort the keys of the hash before
returning their count?

--Ala


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

Date: Thu, 29 Jun 2000 19:55:13 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: shouldn't sort return a list?
Message-Id: <7ak8f85kkc.fsf@merlin.hyperchip.com>


Tony Curtis <tony_curtis32@yahoo.com> writes:

> When I test/run this here, I don't get any "uninitialised"
> messages.  Is this the whole code or just a snippet?

I believe the OP got the warning when he changed the following line:

	return keys %h;

for

	return sort keys %h;

I do get the warning on my side, but can't explain it. It's probably due
to the reason that the implementors of sort() never thought of giving it
a scalar value.

--Ala


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

Date: Thu, 29 Jun 2000 19:50:04 GMT
From: jlamport@calarts.edu
Subject: Re: shouldn't sort return a list?
Message-Id: <8jg995$qik$1@nnrp1.deja.com>

In article <8jg6ra$oih$1@nnrp1.deja.com>,
  tmorset@tus.ssi1.com wrote:
> Perl gurus,
>
> I have two questions on list processing that I hope someone
> can help me with.  I can't understand why the following code
> prints 2 instead of 5 or 6.  Shouldn't keys %h return a
> list to the scalar function, which should then return the
> last item in the list to print out?  Are temporary arrays
> being used?  I must be missing something here.

Yep, you're missing something:

scalar LIST

returns the *number of items in LIST*, not the last item in LIST.  In
your code, %h contains two keys, so the list returned by keys %h contains
two values, so scalar a() returns 2.

-jason


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


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

Date: Thu, 29 Jun 2000 18:35:09 GMT
From: Shana Rosenberg <rosenbse@muohio.edu>
Subject: Specifying smtp server in Mail::Mailer
Message-Id: <8jg4ss$msa$1@nnrp1.deja.com>

I am using ActivePerl on a Win95 machine and am having the problem that
when I have my personal mail server turned ON the code below works fine-
-because it is accessing my mail server. (The code below does NOT refer
to my mail server). However, when I turn the mail server off and
attempt to use this code, I get the following error: 'Died at
C:/Perl/site/lib/Mail/Mailer.pm line 264'.

It is my understanding from perusing this group's archives that I am
using the proper syntax to specify 'mailfwd.muohio.edu' as the smtp
server I want the script to use. Although my personal mail server is a
fun toy, the script I'm writing is for work, and thus I must use the
supported resources available.

I'm using the following code:

$mailer = Mail::Mailer->new('smtp',Server=>'mailfwd.muohio.edu');
$mailer->open({ From    => 'rosenbse@muohio.edu',
                To      => 'rosenbse@muohio.edu',
                Subject => 'test',
             });

Any suggestions?


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


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

Date: Thu, 29 Jun 2000 21:11:38 GMT
From: nawkboy@my-deja.com
Subject: Strange behavior of forking server in performance graphs
Message-Id: <8jge1r$ufq$1@nnrp1.deja.com>

I have written a forking server in perl that is exibiting a strange
behavior in its response times around 10 simultaneous connections.
The response times demonstrate a phase change of sorts.

The plot and relevant code snipits can be seen at:
http://www.geocities.com/nawkboy

It is worth your time to follow this URL just to see the strange
performance curves.

I do not understand the behavior and would appreciate any guidance in
understanding it.


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


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

Date: Thu, 29 Jun 2000 13:16:51 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Strange behaviour in upper case conversion
Message-Id: <slrn8ln143.47g.tadmc@magna.metronet.com>

On Thu, 29 Jun 2000 11:38:21 -0400, Drew Simonis <care227@attglobal.net> wrote:
>Tad McClellan wrote:
>> >
>> >$name =~ tr/[a-z]/[A-Z]/; # will work just as well.
>> 
>> But still spends cycles that do not change anything (for
>> the first and last characters in the lists).
>
>I didn't say it worked well, but just as well as the OPs  =)
>
>. o O (I don't think he'll buy that, but its worth a throw)


Well, at least you were right about that part  :-)  :-)


>> Also Wrong  :-)
>> 
>> What you don't see in perlop is any mention of regular
>> expressions in connection with tr///
>> 
>
>As soon as I saw Ala's post explaining that, I knew the blunder I 
>had made.  It was just too late for a cancel to have any hope of
>saving my brusied and battered ego.  


No, no! Don't save yourself.

I have found from personal experience that being publically wrong
is a great way of "internalizing" a new fact  :-)


>And I was sure I was getting 
>better. =)


You are getting better.

Think you will ever try regex stuff with tr/// again?

 ...?

Chalk up one more lesson learned, I'd guess.


>Forever a newb.


Oh no. But you do owe about 10-40 more blunders to 
complete your "initiation".


(I found it best to try and distribute them over a few years of
 posting, so as not to fall on my Swiss Army knife before
 attaining a "Seven Levels of Perl Mastery" where I could hold
 my head up, heh, heh.
)


Anyone have a URL for Tom Christiansen's "Seven Levels of Perl Mastery"?

I couldn't make the search function at perl.com find it...


But Google found this archived Usenet posting:

   http://larc.ee.nthu.edu.tw/~cfwu/perl/japh.txt


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 29 Jun 2000 15:18:53 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Strange behaviour in upper case conversion
Message-Id: <395BA11D.9CE87D64@attglobal.net>

Tad McClellan wrote:
> 
> Anyone have a URL for Tom Christiansen's "Seven Levels of Perl Mastery"?
> 
> I couldn't make the search function at perl.com find it...
> 

Found this:

http://prometheus.frii.com/~gnat/yapc/2000-stages/


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

Date: Thu, 29 Jun 2000 21:56:44 +0100
From: jb <jbroz@yperite.demon.co.uk>
Subject: Re: Teen Volenteers WANTED
Message-Id: <395BB80C.C2B347CC@yperite.demon.co.uk>

Cooljazz wrote:
> 
> I am... and judging from how you adults are flaming, I think I'll stay a
> teenager...

I believe you will find this is impossible.


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

Date: 30 Jun 2000 00:03:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Teen Volenteers WANTED
Message-Id: <8jgkkl$69j$1@orpheus.gellyfish.com>

On Thu, 29 Jun 2000 05:39:09 GMT Cooljazz wrote:
> I am... and judging from how you adults are flaming, I think I'll stay a
> teenager...

'you adults are flaming' ... Right.  I think people were complaining
about the implication of exploitation here - you want to be ripped off
fine go ahead.  If you are good at what you do you can get a proper job
where you get paid for it - people here care about how good you are and
how you conduct yourself not how old you are ....  

/J\
-- 
** This space reserved for venue sponsor for yapc::Europe **
              <http://www.yapc.org/Europe/> 


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

Date: Thu, 29 Jun 2000 21:25:26 +0100
From: jb <jbroz@yperite.demon.co.uk>
Subject: Re: V4 vs V5 sourcing problem
Message-Id: <395BB0B6.CAD9055C@yperite.demon.co.uk>

Ron Auer wrote:
> 
> I am working with a product called Tivoli and they package Perl 4.0.

Tell IBM (who own Tivoli) to provide perl 5. They package (and support)
5.005_03 with AIX 4.3.3 so I don't see why they can't with Tivoli as
well. Easier said than done I know.


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

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


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