[7893] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1518 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 21 18:07:27 1997

Date: Sun, 21 Dec 97 15:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 21 Dec 1997     Volume: 8 Number: 1518

Today's topics:
     Re: a Perl crypt function question <dtlgc@flash.net>
     Automating postings to newsgroups with Perl <fp@pmpcs.com>
     Re: Automating postings to newsgroups with Perl <rootbeer@teleport.com>
     Re: calling two arrays in a function as variables <rhodri@wildebst.demon.co.uk>
     Re: calling two arrays in a function as variables (Honza Pazdziora)
     Compilation error with Format (Randy)
     Re: Compilation error with Format <rootbeer@teleport.com>
     Re: does ne1 know... <uzs7ci@ibm.rhrz.uni-bonn.de>
     Re: Dynamic s/// vs. s///i? (Honza Pazdziora)
     Errror message running Install during Perl setup <allie@icct.net>
     Re: failed to close pipe into sendmail (Chip Salzenberg)
     Re: failed to close pipe into sendmail (Chip Salzenberg)
     Re: FLOCK question (Honza Pazdziora)
     Holiday Sale: CGI Programming (Loose Foot Computing)
     Re: Holiday Sale: CGI Programming (brian d foy)
     Re: How can I Mail attachments with Perl (Frank)
     Re: MDQ: Calling Subroutines (Andrew M. Langmead)
     Q : How can I replace something by an image... <philray@hotmail.com>
     Re: Q : How can I replace something by an image... (brian d foy)
     Re: redirection on win95 <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
     Re: Regular Expression Question - non greedy match <ksl@usa.net>
     Rejected email message <starbird@sonic.net>
     Re: Rejected email message (brian d foy)
     Re: Statistics for comp.lang.perl.misc (Andrew M. Langmead)
     Re: Wanna get the Week Day for a specified date <rootbeer@teleport.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 21 Dec 1997 17:22:59 GMT
From: "Steve Graham" <dtlgc@flash.net>
Subject: Re: a Perl crypt function question
Message-Id: <01bd0e35$663be9e0$b10f1ed1@default>

Thanks,

I'll take a llok at that code.

Steve


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

Date: 21 Dec 1997 15:10:54 GMT
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Automating postings to newsgroups with Perl
Message-Id: <01bd0e22$9e2a6f60$49580e26@pmp>

Greetings:

How do I open the newsgroup socket (port 119) for those news groups that
require a user id and password?

I.E. How do I pass along the user and password so I can have the program
post the message?

Please post a copy of your reply to mailto:pperchan@pmpcs.com

Thank you for your time.

-- 
===========================================================
Peter Perchansky,  Computer Consultant & Microsoft FrontPage MVP
PMP Computer Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm


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

Date: Sun, 21 Dec 1997 12:02:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Peter Perchansky <fp@pmpcs.com>
Subject: Re: Automating postings to newsgroups with Perl
Message-Id: <Pine.GSO.3.96.971221120154.4811F-100000@user2.teleport.com>

On 21 Dec 1997, Peter Perchansky wrote:

> How do I open the newsgroup socket (port 119) for those news groups that
> require a user id and password?

1. Use a module; there's one on CPAN which can help. 2. Please, don't post
spam. Thanks! :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Sun, 21 Dec 1997 13:21:38 +0000 (GMT)
From: Rhodri James <rhodri@wildebst.demon.co.uk>
Subject: Re: calling two arrays in a function as variables
Message-Id: <47fbf6be84rhodri@wildebst.demon.co.uk>

In article <349D09CD.FFC2D992@xs4all.nl>,
 Aragorn <mbijlsma.nospam@xs4all.nl> wrote:
> Hi,
> I've got a problem calling two lists or arrays into a function. When I
> call them inside the function using (@foo, %bar) = @_; perl tends to
> assign all elements - both arrays - to the first one, leaving the second
> one empty. Something like this:

Yes, this is all as specced.

> sub RequireFields {

>      local(%array, @list) = @_;

A minor point, but you probably didn't really want to use "local" here;
"my" would lead to fewer tears in the long run.

Back to your problem.  The only way to get what you want is to use
references.  If you change RequireFields to look like this;

sub RequireFields
{
  local($hash, $list) = @_;

  if (!@$list)
  {
    die "RequireFields function error: your list contains no elements\n";
  }
  elsif (!%$hash)
  {
    die "RequireFields function error: your array contains no elements\n";
  }

  foreach (@$list)
  {
    if (!$$hash{$_})
    {
      die "$_ is not present in your array\n";
    }
  }
}


and call it with;

  &RequireFields(\%h, \@l);

then everything will work as you want.  See the perlref documentation for
more details.

-- 
Rhodri James  *-*  Wildebeeste herder to the masses
If you don't know who I work for, you can't misattribute my words to them

 ... Aliens do it inside you


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

Date: Sun, 21 Dec 1997 14:05:24 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: calling two arrays in a function as variables
Message-Id: <adelton.882713124@aisa.fi.muni.cz>

Aragorn <mbijlsma.nospam@xs4all.nl> writes:

> Hi,
> I've got a problem calling two lists or arrays into a function. When I
> call them inside the function using (@foo, %bar) = @_; perl tends to
> assign all elements - both arrays - to the first one, leaving the second

[...]

> won't work.
> Is there any special syntax forcing perl to keep the two devided, any
> trick to get the arrays back in line, just.. anything that will work? :)

It's documented in the docs. You need to pass references to those
objects -- two scalars:

sub function
	{
	my $arrayref = shift;
	my $hashref = shift;
	
	[...]
	}

function(\@array, \%hash);

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Sun, 21 Dec 1997 20:24:38 GMT
From: randx@imagin.net (Randy)
Subject: Compilation error with Format
Message-Id: <67jtlh$h25@news.imagin.net>

I'm using the 5.004_02 Win32 binary distribution and am working 
my way through _Learning_Perl_on_Win32_Systems_ as a learning 
exercise. Although I've managed to correct the very few typos 
I've come up against so far, I haven't got this one figured out. 
Help would be appreciated.

In using the following format statement:

 ..
format STDOUT =
@<<<<<<<<<<<<<<< @<<<<<<<<< @<<<<<<<<<<<
$filename, $name, $word
 .
[EOF]

I get the following error message:

E:\Perl Progs>perl listword.plx
Format not terminated at listword.plx line 20, at end of line
Format not terminated at listword.plx line 20, at end of line
Execution of listword.plx aborted due to compilation errors.

According to what I've read the only termination required for a 
format statement is a period. Can anyone suggest where I've gone 
wrong? Any help would be appreciated.

Thanks,
Randy

Make the obvious name change in the return address.
Randy Thomson
K4MMW
Fort Worth, TX


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

Date: Sun, 21 Dec 1997 14:42:50 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Randy <randx@imagin.net>
Subject: Re: Compilation error with Format
Message-Id: <Pine.GSO.3.96.971221143853.4811J-100000@user2.teleport.com>

On Sun, 21 Dec 1997, Randy wrote:

> Format not terminated at listword.plx line 20, at end of line

Make sure that the period terminating the format is on a line by itself,
with no hidden control characters before or after it. A good programmer's
editor should be able to help you to see these. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!




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

Date: 21 Dec 1997 18:57:27 +0100
From: Oliver Much <uzs7ci@ibm.rhrz.uni-bonn.de>
Subject: Re: does ne1 know...
Message-Id: <67jla7$nt@walras.econ.de>

Tad McClellan <tadmc@metronet.com> wrote:

TM>: where can i get source code for a keyword search engine?

TM>If you can come up with good keywords, you could enter those
TM>keywords into a search engine and likely find a keyword search engine.
TM>;-)

Mhh.. This is like the story of the chicken and the egg. Maybe you shouldn't
answer with a recursive answer ?! ;-)
-- 
---
Oliver Much|@home: UZS7CI@ibm.rhrz.uni-bonn.de     | Sei P ein Punkt Q wir
           |@work: oliverm@addi.finasto.uni-bonn.de| wollen ihn Z nennen. 


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

Date: Sun, 21 Dec 1997 14:29:20 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Dynamic s/// vs. s///i?
Message-Id: <adelton.882714560@aisa.fi.muni.cz>

joc@netaxs.com (Joe Casadonte) writes:


> I am trying to write a script that will help non-Perl users get some of
> the power of Perl search and replace.  I would like to write a single
> match (m//) and substitute (s///) statement that can handle things
> like word-boundaries (or not) or case insensitivity (or not), all
> depending on the users immediate needs.  Is there an easy way without
> using eval?

You can always put the necessary tags into variables and include them
in the regexp when necessary. Check perlre man page for (?imsx)
modifiers that might help you, as well as the fact that you can have
regular expression in variable.

Hope this helps,

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Sun, 21 Dec 1997 13:37:38 -0600
From: Allie <allie@icct.net>
Subject: Errror message running Install during Perl setup
Message-Id: <349D7001.B2E17B93@icct.net>

Okay, I'm installing Perl5 from a cd-rom supplied with a book I
purchased. As instructed, I unzipped the files into C:\Perl5 and
then it said to run install.bat. Dutifully, I go to the command line
and cd to Perl5 and type install. I get this message: Can't locate
Nt.ph in @ INC (did you run h2ph?) at install.bat line 35.
I found a file called Nt.ph in the perl5 directory, but odn't know
what @ INC means... Any ideas?

Thanks, allie



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

Date: Sun, 21 Dec 1997 15:15:26 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: failed to close pipe into sendmail
Message-Id: <67jbp7$ihg$1@cyprus.atlantic.net>

According to spidaman@well.com (Ian Kallen):
>            close(QUEUE) or die "REALLY BAD STUFF: $! == $?\n"; 

>Now, where I close the filehandle to sendmail it's dying; I get 
>REALLY BAD STUFF: No child processes == -1

Prehaps you have a SIGCHLD handler set, or set $SIG{CHLD} = "IGNORE".
Either of those may conceivably make close() report failure.


-- 
Chip Salzenberg               - a.k.a. -               <chip@pobox.com>
** Perl Training from Stonehenge Consulting Services: (503) 777-0095 **
               "All you need is a toxic landfill /
           A cycle and a sidecar and an urge to kill"  // MST3K


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

Date: Sun, 21 Dec 1997 15:17:06 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: failed to close pipe into sendmail
Message-Id: <67jbsb$ii2$1@cyprus.atlantic.net>

According to keith_willis.junk@non-hp-unitedkingdom-om1.om.hp.com (Keith Willis):
>Pardon?  I have found that if one _specifically_ sets SIGCHLD to
>SIG_IGN, it does _not_ generate zombies.

Sadly, Solaris doesn't do that when you use sigaction() _unless_ you
also specify an additional flag (I forget which).  IMO, this is a bug
(or at least poor quality of implementation) in Solaris.
-- 
Chip Salzenberg               - a.k.a. -               <chip@pobox.com>
** Perl Training from Stonehenge Consulting Services: (503) 777-0095 **
               "All you need is a toxic landfill /
           A cycle and a sidecar and an urge to kill"  // MST3K


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

Date: Sun, 21 Dec 1997 14:26:03 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: FLOCK question
Message-Id: <adelton.882714363@aisa.fi.muni.cz>

teacafehk@iname.com (TeaCafeHK) writes:

> I am a newbie on both of Linux and PERL.
> 
> The command syntax of FLOCK in PERL
> is something like that FLOCK(filevar, flockop).
> 
> I don't know what is the exact value to be used
> in Linux for : Share exclusive lock, Exclusive lock,
>  and unlock.

First, you probably mean flock. Please note that Perl is case
sensitive, so it cannot be FLOCK, and it looks like you are shouting,
when it's uppercase.

Also, if you check the perlfunc man page, section of flock, you will
not only find the exact syntax of flock, but also what the values are
and how to specify them symbolicaly.

Hope this helps,

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Sun, 21 Dec 1997 15:30:21 GMT
From: info@loosefoot.com (Loose Foot Computing)
Subject: Holiday Sale: CGI Programming
Message-Id: <349d3603.2927838@news.uregina.ca>

Dear business owner,

Loose Foot Computing is offering a %50
discount on all CGI/database programming
until December 31, 1997, so act now to
increase your online sales.

CGI can benefit your business tremendously,
no matter what you sell.

For more information, please visit:

http://loosefoot.com/cgi.htm


For the success of your business,

Loose Foot Computing


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

Date: Sun, 21 Dec 1997 16:43:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Holiday Sale: CGI Programming
Message-Id: <comdog-2112971643030001@news.panix.com>

In article <349d3603.2927838@news.uregina.ca>, info@loosefoot.com wrote:

> Loose Foot Computing is offering a %50
> discount on all CGI/database programming
> until December 31, 1997, so act now to
> increase your online sales.

sounds like a programmer needs some money for holiday presents or 
something to do christmas day.

it was rather hunorous that the Succes Stories part of the web site
appeared to be the complete body of all of the companies business
correspondence.  i think i would have saved the site launch for April
1st though...

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: Sun, 21 Dec 1997 14:50:23 GMT
From: FHeasley@chemistry.com (Frank)
Subject: Re: How can I Mail attachments with Perl
Message-Id: <349d2c38.888940@news.halcyon.com>

On Sat, 20 Dec 1997 18:02:00 -0800, Craig <design@kiwi.net> wrote:

>Does anyone know how to send an attachment with Perl?
>
>I know how to "upload" with the ENCTYPE=\"multipart/form-data\"
>attibute.
>
>But how can a Perl script download information as an attachment?
>
There was a perl script published here that will do the job, after a
fashion.

Unfortunately, it appears that all of the popular email programs
receive and store attachments differently, even though they may decode
them the same way, so there is a good possibility that many of the
people you mail to will not be able to view them.

Frank



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

Date: Sun, 21 Dec 1997 20:23:10 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: MDQ: Calling Subroutines
Message-Id: <ELK3AM.Iyp@world.std.com>

Stephan Vladimir Bugaj <bugaj@bell-labs.com> writes:

>Why is calling a subroutine as &sub(); or &sub($var); considered
>bad?

I'm not sure it is really "bad", mostly just "unnecessary" with a
tinge of "interferring with optional new features"

>What is the current @_ if &sub; is called outside of another 
>subroutine, in what a C person might want to call main()?  My
>guess is that it's the empty list.

It does what the perlsub man page says it does. Keeps the current
value of @_ from the code that called it. This has some interesting
side effects. If the subroutine clears the @_ array like this:

sub foo {
  my $arg = shift;
  &bar;
}

then bar gets an emtpy parmater list, but if the subroutine copies the
argument list into named variable like this:

sub foo {
  my($arg1, $arg2) = @_;
  &bar;
}

then it get the same call-by-reference aliases that were passed to
foo() (this could be considered "action at a distance" to the
programmer that called foo(), but the programmer that wrote foo()
should realize what they have or haven't done with the argument list
before passing it to bar())

>I've been told by a friend that calling a function without 
>parens will gain me compile-time type checking vs. run-time
>type checking with parens.  As unreadable as that sounds to a
>not-quite-reformed C'er, I'm considering going back through my
>code at some point and rip out all the parens to make sure 
>it'll bail at compile time if I mis-call a non-variadic function.  

It is the addition or lack of a "do" or "&", not the parens that
control whether perl consults the prototype of a function, and the
perlsub man page explicitly warns about subtle bugs that can be
created when a programmer blindly adds prototypes to existing
subroutines.

Perl's prototypes perform a differnt function than C
prototypes. Again, according to the perlsub man page, the main purpose
of them is so non-core functions can work like certain core functions
do, not to try to create strict compile time type checking. The intent
is most telling in this passage:

       This is all very powerful, of course, and should be used
       only in moderation to make the world a better place.

If you needlessly prototype, especially where you are needlessly
forcing a scalar context, you create situations where you interfere
with perl's natural tendencies. Take a look at the example when a
scalar context is forced on split().

>How do I get this  benefit for methods?  I tried defining some 
>methods with protos in one of my class modules and then doing:

Since all method lookups are done at runtime, prototypes aren't
consulted. Have you considered using runtime checks? (especially in
addition to a debugging flag?)

use constant DEBUGGING => 1;
#... time passes
  die "wrong number of args" if DEBUGGING and @_ != 2;

If you then change DEBUGGING to 0 for the production version of your
code, then "if 0 and {something}" is optimized into "if 0" and the
dead code is removed.

>require myClass;

>$foo = new myClass data_member=>$value;
>$foo->function arg1,arg2; 

>and $foo->function arg1, arg2; caused a syntax error.

The only way you can omit the parens is to use the "indirect object"
syntax.

   function $foo 'arg1', 'arg2';

You still don't get compile-time prototyping though.

If I've been too subtle, let me tell you that I think the contents of
the "perlsub" man page might be of interest to you.
-- 
Andrew Langmead


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

Date: Sun, 21 Dec 1997 12:47:29 -0500
From: Philippe Raymond <philray@hotmail.com>
Subject: Q : How can I replace something by an image...
Message-Id: <349D5631.2BDAFF7F@hotmail.com>

Hi,
    I need some help, I got my Message Board, but I wanted to add
something to it. Each time someone is writing a smiley(ex: =), :o), :),
:p, etc.) in the form, its translated to an image when its post on the
message board, like on the X-Files BBS. How can I do this?

Thanks for your help
-Philippe



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

Date: Sun, 21 Dec 1997 17:09:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Q : How can I replace something by an image...
Message-Id: <comdog-2112971709220001@news.panix.com>

In article <349D5631.2BDAFF7F@hotmail.com>, Philippe Raymond <philray@hotmail.com> wrote:

>     I need some help, I got my Message Board, but I wanted to add
> something to it. Each time someone is writing a smiley(ex: =), :o), :),
> :p, etc.) in the form, its translated to an image when its post on the
> message board, like on the X-Files BBS. How can I do this?


you might want to try things like

   $_ = "this is a smiley :) here\n";

   s/(      #start $1
     [:=8]  #eyes
     \)     #smiley
     )      #end $1
    /<img src="smiley.gif" alt="$1">/x;

   print;

and so on.  good luck <img src="smiley.gif" alt=":)">

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: Sun, 21 Dec 1997 11:05:52 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: redirection on win95
Message-Id: <67jp9q$r8j@bgtnsc02.worldnet.att.net>

This may have three causes. Well, I suppose you could throw in evil spirits
and bugs in Perl, but I don't consider either one very likely to cause
problems like this.

1. The program is not printing to what we would recognize as STDOUT. The
most likely cause of this is that the program is actually printing to
STDERR, especially if you're trying to capture an error message.

2. The program is printing to STDOUT, but you're not capturing it correctly.
The command "prog > log file" actually runs prog and sends the output to a
file called "log". What happens to the word "file" depends on what "prog"
does. If you type

copy foo > log file

you get a copy of foo called "log" and a message, 'File not found
"C:\whatever\file"

If you want to use a long file name in Win95 from the command line, in most
cases you have to put the LFN in quotes or use other workarounds.

3. You may not be able to create a file in whatever directory you're trying
to put your log file in because you don't have permission to do so. This
could be because there's already a locked file by that name, or you could be
trying to write to a CD-ROM or something. (Don't laugh. I tried it once. It
didn't work.)

Assuming the program's output goes to STDOUT, you might have better luck
with something like this:

$result = `prog`
open(LOG,">logfile") or die "Can't write to log file";
print $result;
print LOG $result;
close LOG;

Hope this helps,

--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl


Ophir Yoktan wrote in message <349D000A.6E1117F7@agentsoft.com>...
>I'm trying to run a program and capture it output.
>i tried
>system "prog > log file"
>and `prog > log file`
>but they dont work - does anybody how it can be done?
>
>please CC to my e-mail
>-----------------------------
>Ophir Yoktan
>ophiry@agentsoft.com
>http://www.huji.ac.il/~ophiry
>
>"It's not a bug, It's a feature"
> (old Microsoftian proverb)
>
>




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

Date: Sun, 21 Dec 97 22:07:01 GMT
From: Karen Lindsey <ksl@usa.net>
Subject: Re: Regular Expression Question - non greedy match
Message-Id: <9712212207.AA0021h@ksl.uk>

Eli the Bearded <#@qz.to> wrote:
[snip]
> It is my opinion that non-greedy repetition is very subtle and tends to
> expose a large number of programmer bugs. I almost always recommend doing
> without it.              ^^^^^^^^^^^^^^^
[snip]
> Or maybe even this (for added security against false positives from
> #! rnews appearing somewhere besides the start of a line):
  ^^^^^^^^
[snip]

This really made me laugh - it broke my news unbatching program... because
it was at the start of a line...

Ho ho ho.

- KSL.  -
(Well, I did write it myself after all).


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

Date: Sun, 21 Dec 1997 09:42:53 -0800
From: Mikel Cook <starbird@sonic.net>
Subject: Rejected email message
Message-Id: <349D551D.7EE1@sonic.net>

I am trying to set up a script that eventually will be triggered by a
form that will let people send an email message with an attachment from
my web site to a third party.  I found MIME::Lite installed on the isp
site and set up the following test script:

_[Sonic:/home/s/starbird]_ (For intro system menus, type menu)
$ cat /usr/local/lib/httpd/cgi-bin/starbird/t2.pl
#!/usr/local/bin/perl -w

# test of multipart message
# test of MIME object/module

use MIME::Lite;
$msg = new MIME::Lite
>From =>'starbird\@sonic.net',
To =>'mikel\@ap.net',
Subject =>'Sending a file to you!',
Type =>'image/gif',
Encoding =>'base64',
Path =>'/home/WWW_pages/starbird/_private/bw-ibm2.tif';
$msg->send;

This runs, but the message is rejected by sendmail because the sender is
unknown.  But the login is right and has email on the site.

What am I doing wrong?


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

Date: Sun, 21 Dec 1997 16:45:32 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Rejected email message
Message-Id: <comdog-2112971645320001@news.panix.com>

In article <349D551D.7EE1@sonic.net>, mikel@ap.net wrote:

 
> use MIME::Lite;
> $msg = new MIME::Lite
> From =>'starbird\@sonic.net',
> To =>'mikel\@ap.net',

> This runs, but the message is rejected by sendmail because the sender is
> unknown.  But the login is right and has email on the site.

what happens when you try

   print 'starbird\@sonic.net';

good luck :)

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: Sun, 21 Dec 1997 19:31:34 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <ELK0wM.1qI@world.std.com>

bart.mediamind@tornado.be (Bart Lateur) writes:
[stats cut. I've got to keep up my OCR numbers.]

>WOW! I'm both in the top 10 and in the bottom 10!

>And it's not just me: it looks like the statistics only included 13
>posters... Anthony David is both number 4 and number 10th from the
>bottom up.

It does look surprising, but I'm sure you're aware of the
reason. Since the Original Content Ratio figures are only calculated
for people with more than five posts, that means that fewer than 20
people posted the minimum number of articles to be figured into the
calculations.

Out of 179 posters, only 13 of us posted five or more articles. The
number 10 poster (when calculated by number of posts) just barely made
the cut.

I wonder what Greg is trying to achieve with this restriction? I can
understand why he would want to keep from including posters with one
original question and no replies. (They'd fill up the top ten, but
these are people who are unlikely to be around week after week.) but
maybe this result would be better served by just including
replies. (articles with a References: header.)

The current formula seems to be set to answer the question "of the
people who post frequently (for an arbitrary definition of frequently)
which of them include the least and most amount of quoted material."
Where calculating it based on replies would answer the question "Of
the people who reply to articles, which include the most or least of
the original article."

Well, I guess if I really want the answer to the second question, I
have my own news spool to analyze.
-- 
Andrew Langmead


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

Date: Sun, 21 Dec 1997 11:59:19 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: tony buono <tony@buono.demon.co.uk>
Subject: Re: Wanna get the Week Day for a specified date
Message-Id: <Pine.GSO.3.96.971221115708.4811E-100000@user2.teleport.com>

On Sun, 21 Dec 1997, tony buono wrote:

> open (TEXTFILE, "$FORM{url}/$next_element};

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file. 
(And there's a bug in that line.) 

> $calMonth = substr($next_element, 0,3);
> $mon_start = &timegm(undef,undef,undef,$the_first,$calMonth,$year);

> But this throws my server into some kinda loop that is really p*ssing of
> the guys in charge. 

You should check that your parameters to timegm are what they're supposed
to be. Try stepping through your code in the debugger. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1518
**************************************

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