[10724] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4322 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 30 11:07:43 1998

Date: Mon, 30 Nov 98 08:00:24 -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           Mon, 30 Nov 1998     Volume: 8 Number: 4322

Today's topics:
    Re: Any good books for a Newbie? <avitala@macs.biu.ac.il>
    Re: barcodes <jimfl@bnl.gov>
    Re: changing '@INC' at runtime <merlyn@stonehenge.com>
    Re: changing '@INC' at runtime (Bart Lateur)
    Re: comparing two strings case insensatively <jacklam@math.uio.no>
    Re: comparing two strings case insensatively (Larry Rosler)
    Re: Directory? <ebohlman@netcom.com>
    Re: Directory? <tchrist@mox.perl.com>
    Re: Directory? <luoni@gol.com>
        Folder Recurison <rippoXXXX@kc3.co.uk>
    Re: How could I "EXPORT" Variables from one script to a haakon.alstadheim@sds.no
    Re: How do I execute another program from a CGI script? <chrisre@ecpi.com>
    Re: How portable are DBM files? <tchrist@mox.perl.com>
    Re: HTMLgen for perl... <sfarrell@farrell.org>
        Input from <TEXTAREA> via perl and DBI into MySQL datab <adrian@internetxs.com>
    Re: Is it possible to run a web server on Win95? <maadarani@mosaid.com>
    Re: Is it possible to run a web server on Win95? <beekmans@iae.nl>
    Re: Mounting Network Directories in Win32 Perl <indy@NOSPAMdemobuilder.com>
    Re: Net::SMTP <beekmans@iae.nl>
    Re: Net::SMTP (Nathan V. Patwardhan)
    Re: Net::SMTP (Nathan V. Patwardhan)
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
        Open or Create a file <preble@ipass.net>
    Re: Origin of 'local'? <ebohlman@netcom.com>
    Re: Origin of 'local'? (Chris Nandor)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 30 Nov 1998 17:28:05 +0200
From: "Avshi Avital" <avitala@macs.biu.ac.il>
Subject: Re: Any good books for a Newbie?
Message-Id: <73udn9$ode$1@cnn.cc.biu.ac.il>


Tim Schaab wrote in message <3661e795.495622071@news.supernews.com>...
>Hello all in Perl land!
> I'm new at Perl, in fact totaly new. Are there any books out
>there in the plethera of bound tree carcuses that can teach me Perl
>5.0?


for a very good first glimpse on Perl, read "learning Perl" (the llama
book) by Randal Schwartz.





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

Date: Mon, 30 Nov 1998 07:56:33 -0800
From: Jim Flanagan <jimfl@bnl.gov>
Subject: Re: barcodes
Message-Id: <3662C030.4B9793B7@bnl.gov>

Rich wrote:
> 
> On Mon, 30 Nov 1998 05:43:37 GMT, Alan Melton <arm@home.net> wrote:
> >is there a method of generating out barcodes from numbers
> 
>    Yes, there are many different methods.  Did you have something a
> little more specific in mind?
> 
> - Rich
> 
> --
> Rich Mulvey
> My return address is my last name,
>    followed by my first initial, @mulveyr.roc.servtech.com
> http://mulveyr.roc.servtech.com
> Amateur Radio: aa2ys@wb2wxq.#wny.ny.usa

Take a look at:

   http://www.disinfo.com/prop/newordr/prop_newordr_barcodes.html

Just about everything you might care to know about bar codes can be
found at this collection of links to other bar code sites.

--Jim


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

Date: Mon, 30 Nov 1998 14:07:03 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: changing '@INC' at runtime
Message-Id: <8ck90djmv8.fsf@gadget.cscaper.com>

>>>>> "Girish" == Girish Deodhar <girishd@gsslco.co.in> writes:

Girish> i tried that
Girish> but it doesn't work
Girish> now it doesn't find where is 'lib.pm'

That means you have a bad install of Perl, because Perl comes with
lib.pm as part of the standard distribution.  Time to reinstall.

print "Just another standard Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Mon, 30 Nov 1998 15:31:47 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: changing '@INC' at runtime
Message-Id: <3663b4cc.26869529@news.skynet.be>

Girish Deodhar wrote:

>i've found the following thing to work
>but i am not very sure *why* this works
>
>BEGIN {
> my $perldir = q|d:\tools\perl|;
> push(@INC,"$perldir\\lib");
>}
>
>use ...

Because everything that is in a BEGIN block (there may be more than one)
is compiled AND EXECUTED before the plain part of the script file is
compiled and run.

Imagine "use" to be a BEGIN block as well. It's the nature of that
beast. Therefore, if there is a BEGIN block in front of "use", it will
be compiled/run first, and then the "use" is executed.

Even if the "used" module contained a syntax error, the BEGIN block
STILL would have been run. Just for fun, (alright then, for "educational
purposes") try adding a print statement (preferably to STDERR) in a
BEGIN block, and a syntax error in a module that you then will use. Or
put a print statement in the plain part of the module.

If "use" would have been followed by another BEGIN block, that would
have been executed after the module was imported.

p.s. If you're having trouble with Perl finding the default "lib"
directory, you might be able to patch this properly by setting an
environmental variable to this path, e.g. in AUTOEXEC.BAT. Appropriate
candidates are "PERLLIB" and "PERL5LIB". You may put in more than one
path into this environmental variable, separated with ";". Well, it
works on the ports I've tested (DJPERL for DOS, and OS/2). And you may
use forward slashes.

   HTH,
   Bart.


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

Date: Mon, 30 Nov 1998 15:15:08 +0100
From: Peter John Acklam <jacklam@math.uio.no>
Subject: Re: comparing two strings case insensatively
Message-Id: <3662A86C.B368F275@math.uio.no>

"Allan M. Due" wrote:
> 
> You forgot your old friend i.
> 
> #!/usr/local/bin/perl -w
> use strict;
> my $foo = 'STRING THING';
> my $bar = 'string thing';
> if ($foo =~ /$bar/i) {print "They match!\n"}
> else {print "They don't.\n"}

Or should it perhaps be

 if ($foo =~ /^$bar$/i) { ... }

The original question was a little unclear at this point.  Your
solution will also return true for

 my $foo = 'STRING THING';
 my $bar = 'ng th';

Peter

-- 
Peter J. Acklam - jacklam@math.uio.no - http://www.math.uio.no/~jacklam




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

Date: Mon, 30 Nov 1998 07:39:02 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: comparing two strings case insensatively
Message-Id: <MPG.10cc5bed2d9052c7989935@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <3662A86C.B368F275@math.uio.no> on Mon, 30 Nov 1998 15:15:08 
+0100, Peter John Acklam <jacklam@math.uio.no> says...
 ... 
>  if ($foo =~ /^$bar$/i) { ... }

If one insists on a regex solution, it should be:

   if ($foo =~ /^\Q$bar\E$/i) { ... }

This avoids false matches if $bar contains a '.', for example.

But why bother with regexes, which have to be compiled when encountered?  
The 'lc' function is the way to go.  In an earlier post, you suggested:

> Well, you can always try to compare them first, and convert the case
> only if they differ, with something like
> 
>    $same = $str1 eq $str2 || lc $str1 eq lc $str2;

This would be best if 'lc' were a costly function.  But where the main 
cost is interpreter overhead, simplest is best:

     $same = lc $str1 eq lc $str2;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 30 Nov 1998 13:56:10 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Directory?
Message-Id: <ebohlmanF38MpM.E3I@netcom.com>

Mario Luoni <luoni@gol.com> wrote:
: Has anybody encountered the problem that Perl considers something not to be
: a directory, although it is one? I check with

:     if (-d $name) {...}

: but the result of the test is just wrong (not: false). I cannot imagine this
: to be a bug of the Perl implementation, neither one of the script I wrote.
: I'm pretty much lost. Can anybody help.

Are you sure that $name either contains the complete path to the 
directory in question or refers to a subdirectory of your 
current working directory?  A very common trap is to read a directory 
other than your CWD with readdir() and then do file tests (such as -d) 
against the returned values, which do *not* include path information.
 


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

Date: 30 Nov 1998 14:59:18 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Directory?
Message-Id: <73ubs6$c7k$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, <luoni@gol.com> writes:
:Has anybody encountered the problem that Perl considers something not to be
:a directory, although it is one? I check with
:    if (-d $name) {...}
:but the result of the test is just wrong (not: false). 

Is "spool" a directory?  Only if you happen to be in /usr/ at the 
time!  You've read something from readdir, I bet, and it's not
qualified the way you think it is.

--tom
-- 
    "I can only bend the rules so much before it starts looking like I'm breaking
    the rules." --Larry Wall


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

Date: Mon, 30 Nov 1998 16:05:07 +0100
From: "Mario Luoni" <luoni@gol.com>
Subject: Re: Directory?
Message-Id: <73uc77$t35@gd2inews.swissptt.ch>

Thanks to everybody for their ideas. Unfortunately, there was nothing I
hadn't thought about myself. At the time being, my working hypothesis is
that directory names that start with a digit might cause problems. I'm
looking into this...

-Mario


Eric Bohlman wrote in message ...
>Mario Luoni <luoni@gol.com> wrote:
>: Has anybody encountered the problem that Perl considers something not to
be
>: a directory, although it is one? I check with
>
>:     if (-d $name) {...}
>
>: but the result of the test is just wrong (not: false). I cannot imagine
this
>: to be a bug of the Perl implementation, neither one of the script I
wrote.
>: I'm pretty much lost. Can anybody help.
>
>Are you sure that $name either contains the complete path to the
>directory in question or refers to a subdirectory of your
>current working directory?  A very common trap is to read a directory
>other than your CWD with readdir() and then do file tests (such as -d)
>against the returned values, which do *not* include path information.
>




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

Date: Mon, 30 Nov 1998 15:57:32 +0000
From: Richard Wilde <rippoXXXX@kc3.co.uk>
Subject: Folder Recurison
Message-Id: <3662C06B.74AD@kc3.co.uk>

How can I get a list of all files into a  @FILES array from a base
driectory INCLUDING all sub-directories.

I have tried various methods and can only get the files from one
dirctory down from the sub directory. For example:

|BaseDIR
|--->dir1 OK
|--->dir2 OK
|--->dir3 OK
     |--->dir4 NO


Any help will be appreciated


Email rippoXXXX@kc3.co.uk
Remove XXXX from email


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

Date: 30 Nov 1998 16:13:18 +0100
From: haakon.alstadheim@sds.no
Subject: Re: How could I "EXPORT" Variables from one script to another?
Message-Id: <u4srhb4dt.fsf@sds.no>

Hints: 
- A "variable" in korn shell is an environment var, and hence gets 
inherited by child-processes (if you 'export' it) .
- A variable in perl is a variable IN perl, and hence is not visible by
child processes.
- It is much quicker to use 'use', 'require' or 'do' than to fork off
a new process from perl. This will evaluate whatever is required/used/done
in the same process, possibly within a different package.

Test: what does system("perl script1.pl") do ?

Here is a hint for an inefficient (and hence not so smart) answer.  It
might teach you something if you got it to work though.  
- Look up the %ENV builtin variable (execute perldoc perlvar and
search for ENV).



How long have you been using perl did you say ?
Did you try to learn something about the environment you are working in ?


Guillaume Dupuis <guillaume@sandtechnology.com> writes:
[...]
> ...
> $scr_1 = system("perl script1.pl");
> ...
[...]
> And as you can figure it out, I've failed.
> 
> What I would like:
> Define the majority of my variables in the "main" module (script), and
> use those variables in all the other 'child' processes.
> 
> Thanks in advance for your help!!


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

Date: Mon, 30 Nov 1998 08:51:59 -0600
From: "Chris Reickenbacker" <chrisre@ecpi.com>
Subject: Re: How do I execute another program from a CGI script?
Message-Id: <73u9eo$3kj$1@nntp.smartdna.com>

Mke sure you put the FULL PATH to the program u want to execute, CGI's have
a limited  ENV.

:)




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

Date: 30 Nov 1998 15:02:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How portable are DBM files?
Message-Id: <73uc1n$c7k$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, Jarkko Hietaniemi <jhi@alpha.hut.fi> writes:
:> Should DBM files be portable from one O/S to another? I have an application
:Of course they *should* :-) but no, they are not.  At least they are
:byteorder dependent, that I remember, but they may also be integer
:width dependent.
:
:"Berkeley DB" is rumored to be wiser in this respect.  

DB_File (v1 of Berkeley DB) is supposed to be fine this way
as well, and in fact, a simple Sun/Lintel test would 
demonstrate this.

--tom
-- 
    "* Unix is a footnote of AT&T Bell Laboratories."
			     --Barry Shein


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

Date: Mon, 30 Nov 1998 14:59:23 GMT
From: stephen farrell <sfarrell@farrell.org>
Subject: Re: HTMLgen for perl...
Message-Id: <87sof1ql9w.fsf@couatl.uchicago.edu>

aasmundo@ifi.uio.no (=C5smund =D8deg=E5rd) writes:

> Den Fri, 27 Nov 1998 14:19:52 GMT, delte dave@mag-sol.com f=F8lgende me=
d
> oss:
> >> I wonder, is there some perl-module which is similar to the HTMLgen
> >>module for python.
> >>
> >> I know there is CGI.pm, HTML::Base and maybe HTML::Simple, but this
> >>is not exactly what I want. Ok, the problem is that I like HTMLgen
> >>in python, but I
> > Perhaps, if you explained about the modules you mentioned, it might
> >help us to help you. I would guess that most of us here have little
> >or no knowledge of Python.
> =

> Ok, I assume that some of you know HTMLgen, but anyway. HTMLgen is a
> python-module which makes it easy to generate static
> HTML-pages. CGI.pm doing well in generating dynamic pages, the two
> other packages I mnetion in my first entry generate static pages, but
> I dosen't like them. So: Is there some package for Perl which makes it
> easy to generate html-files from scripts.

My HTML::TableLayout module might be worth a look... See
http://people.healthquiz.com/~sfarrell/TableLayout/.

--sf


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

Date: 30 Nov 1998 15:54:00 GMT
From: adrian <adrian@internetxs.com>
Subject: Input from <TEXTAREA> via perl and DBI into MySQL database.
Message-Id: <3662BFB3.188FFFA1@internetxs.com>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
On a webpage I have an area that people can input 'unlimited' length text
using the &lt;TEXTAREA> HTML tag. This is passed thru my perl script into
a MySQL database using DBI and DBD:mysql. The receiving coloumn has been
defined as TEXT.
<p>Only this just doesn't work! If I "force" an entry of exactly what is
input from the page by putting that in the INSERT statement the table does
get updated?!
<p>Please could someone shed light unto my problem. I would be very grateful.
All the software and mods are the latest versions.</html>



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

Date: Mon, 30 Nov 1998 14:06:08 GMT
From: "Mike Maadarani" <maadarani@mosaid.com>
Subject: Re: Is it possible to run a web server on Win95?
Message-Id: <01be1c6a$3a9c1050$4f04010a@mop247>

try FrontPage 98

PCM <pulsecode@mailandnews.dot.com> wrote in article
<73c6il$f0r$1@news-02.meganews.com>...
> I use Sambar Server.  Runs fine on my crappy old 486/66 with 16Mb.  Has
> web/FTP/proxy servers and comes with Perl 5 preinstalled.  Put your stuff
in
> the cgi-bin and go!
> 
> http://www.sambar.com
> 
> -Patrick
> +--------------------------------+
> | Perl help, scripts, references |
> | http://error500.hypermart.net  |
> +--------------------------------+
> 
> 
> Kris wrote in message <3654E41F.BA773505@fit2print.com>...
> >I have Apache 1.3.3 and Perl 5.0, and I'm wondering if its worth my time
> >trying to figure out how to configure them to run on Win95 (4.00.950b,
> >96 megs RAM, Pentium 166).  Looking through the documentations it seems
> >that you can, but I wanted to get some feedback before I spend too much
> >time on it.  From what I can tell I don't need C++ to run it, but I
> >could be mistaken.  I've gotten to where I can Apache from a command
> >line, but that's about it.  Any tips on what to do if I can?  Thanks.
> 
> 
> 
> 


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

Date: Mon, 30 Nov 1998 15:13:10 +0100
From: Marcel Beekmans <beekmans@iae.nl>
Subject: Re: Is it possible to run a web server on Win95?
Message-Id: <3662A7F6.8EF7C94E@iae.nl>

try Personal Web Server (it's included by Frontpage 98)

Mike Maadarani wrote:

> try FrontPage 98
>
> PCM <pulsecode@mailandnews.dot.com> wrote in article
> <73c6il$f0r$1@news-02.meganews.com>...
> > I use Sambar Server.  Runs fine on my crappy old 486/66 with 16Mb.  Has
> > web/FTP/proxy servers and comes with Perl 5 preinstalled.  Put your stuff
> in
> > the cgi-bin and go!
> >
> > http://www.sambar.com
> >
> > -Patrick
> > +--------------------------------+
> > | Perl help, scripts, references |
> > | http://error500.hypermart.net  |
> > +--------------------------------+
> >
> >
> > Kris wrote in message <3654E41F.BA773505@fit2print.com>...
> > >I have Apache 1.3.3 and Perl 5.0, and I'm wondering if its worth my time
> > >trying to figure out how to configure them to run on Win95 (4.00.950b,
> > >96 megs RAM, Pentium 166).  Looking through the documentations it seems
> > >that you can, but I wanted to get some feedback before I spend too much
> > >time on it.  From what I can tell I don't need C++ to run it, but I
> > >could be mistaken.  I've gotten to where I can Apache from a command
> > >line, but that's about it.  Any tips on what to do if I can?  Thanks.
> >
> >
> >
> >



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

Date: Mon, 30 Nov 1998 10:07:21 -0500
From: "Indy" <indy@NOSPAMdemobuilder.com>
Subject: Re: Mounting Network Directories in Win32 Perl
Message-Id: <73ubqf$64c$1@nntp2.uunet.ca>

try
system("net use p: \\server\directory");
or
$foo = `net use p: \\server\directory`;

The second example is if you don't want anything displayed.

Most of the time you don't actually have to 'mount' a network drive, because
you can access the files on it directly.  E.g. instead of "p:foo.txt" you
can use "\\server\directory\foo.txt"


Indy
--
www.perl2exe.com
Tools for Web Programmers





>>How can I mount a network directory (i.e. "\\server\directory" to "p:")



Jeffrey R. Drumm wrote in message <36638501.255388609@news.mmc.org>...
>[ posted to comp.lang.perl.misc and a courtesy copy was mailed to the cited
>author ]
>
>On Sun, 29 Nov 1998 21:32:22 -1000, "Vann H. Walke" <vwalke@ibm.net> wrote:
>
>>How can I mount a network directory (i.e. "\\server\directory" to "p:")
>>in a Perl script?
>>
>>Thanks,
>>Vann
>
>If you check DejaNews and search on my name and Win32::NetResource, you
should
>come across a couple of examples fairly quickly.
>
>--
>                               Jeffrey R. Drumm, Systems Integration
Specialist
>                       Maine Medical Center - Medical Information Systems
Group
>
drummj@mail.mmc.org
>"Broken? Hell no! Uniquely implemented!" - me




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

Date: Mon, 30 Nov 1998 16:09:09 +0100
From: Marcel Beekmans <beekmans@iae.nl>
Subject: Re: Net::SMTP
Message-Id: <3662B515.12BE1077@iae.nl>

Oke this works, but it for example converts gif-images into text and that is
just something i don't want. I want to attach the file as a file so the
reciepient can save the file and inport it to his own application.
Is that possible?

"Nathan V. Patwardhan" wrote:

> Marcel Beekmans (beekmans@iae.nl) wrote:
> : Is it possible to attach a file to an email with the Net::SMTP module?
> : So the Perl-script must built te file and send te e-mail with the file
> : as an attachment.
>
> Yes, it's possible.  Here's one such example which uses the MIME::Lite
> and Net::SMTP modules:
>
> #!/usr/local/bin/perl -w
>
> use MIME::Lite;
> use Net::SMTP;
> use strict;
>
> my($mailhost, $msg, $smtp, $data, $mime_all);
>
> $mailhost = 'my.smtphost.org';
>
> # Create a new multipart message:
> $msg = new MIME::Lite
>     From    =>'you@your.domain',
>     To      =>'them@their.domain',
>     Subject =>'The message',
>     Type    =>'multipart/mixed';
>
> # attach text part
> attach $msg
>     Type     => 'TEXT',
>     Data     => 'Tell me about your mother';
>
> # attach base64 part (note: encoding line)
> attach $msg
>     Type     =>'image/gif',
>     Encoding => 'base64',
>     Path     =>'/path/to/gif/eliza.gif';
>
> # the message as a string
> $mime_all = $msg->as_string;
>
> # now, send the attachment with Net::SMTP
> $smtp = Net::SMTP->new($mailhost);
> $smtp->mail('you@your.domain');
> $smtp->to('them@their.domain');
>
> $smtp->data();
> $smtp->datasend(<<END);
> $mime_all
> END
>
> $smtp->dataend();
> $smtp->quit();
>
> --
> Nate Patwardhan|root@localhost
> "Fortunately, I prefer to believe that we're all really just trapped in a
> P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
> shall by the light of day evaporate, leaving nothing but good intentions in
> its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>



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

Date: Mon, 30 Nov 1998 15:40:18 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Net::SMTP
Message-Id: <C%y82.149$J4.58133@news.shore.net>

Marcel Beekmans (beekmans@iae.nl) wrote:
: Oke this works, but it for example converts gif-images into text and that is
: just something i don't want. I want to attach the file as a file so

It was an example of how to use the Net::SMTP and MIME::Lite modules
together.  I was hoping that you'd do your own homework and make it
work in the way that you'd anticipated it to.  You'd even learn how to
do something interesting in the process.  Is that so bad of me?  :-)

: the reciepient can save the file and inport it to his own
: application.  Is that possible?

Yes.  Honestly, changing as few as two (2) lines will make it work in
the way that you want it to.  I believe that you'll want to read up on
'Encoding' and 'Type' in the MIME::Lite documentation.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Mon, 30 Nov 1998 15:44:14 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Net::SMTP
Message-Id: <i3z82.150$J4.58133@news.shore.net>

Marcel Beekmans (beekmans@iae.nl) wrote:
: Oke this works, but it for example converts gif-images into text and that is
: just something i don't want. I want to attach the file as a file so the
: reciepient can save the file and inport it to his own application.

This also occurs to me.  Well, if the image appears as text, something
must be funny with your mail client or the way that you're encoding
the gif.  The example that I provided appeared as an attachment
("link") in 'elm' and 'pine', and as an inline in 'Netscape Mail', FWIW.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 30 Nov 1998 15:57:58 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <73ufa6$gv7$4@info.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 23 Nov 1998 15:54:38 GMT and ending at
30 Nov 1998 07:46:34 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1998 Greg Bacon.  All Rights Reserved.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  223 (52.2% of all posters)
Articles: 306 (27.4% of all articles)
Volume generated: 482.2 kb (26.5% of total volume)
    - headers:    209.5 kb (4,395 lines)
    - bodies:     260.7 kb (8,632 lines)
    - original:   201.5 kb (6,942 lines)
    - signatures: 11.6 kb (365 lines)

Original Content Rating: 0.773

Averages
========

Posts per poster: 1.4
    median: 1 post
    mode:   1 post - 178 posters
    s:      1.2 posts
Message size: 1613.5 bytes
    - header:     701.1 bytes (14.4 lines)
    - body:       872.5 bytes (28.2 lines)
    - original:   674.2 bytes (22.7 lines)
    - signature:  38.9 bytes (1.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   11    13.6 (  8.8/  4.8/  2.5)  bart.lateur@skynet.be (Bart Lateur)
    9    15.3 (  7.2/  5.8/  3.0)  rjk@linguist.dartmouth.edu (Ronald J Kimball)
    6     7.1 (  3.2/  3.9/  3.1)  "Sean Mintz" <stmintz@yahoo.com>
    5    17.5 (  3.6/ 13.9/ 10.0)  "LSS" <lss@shaw.wave.ca>
    4     8.6 (  3.0/  5.6/  1.6)  "Vlad Volkov" <vvolkov@benton.com>
    4     4.3 (  2.7/  1.5/  1.5)  thst@my-dejanews.com
    4     7.3 (  3.4/  3.9/  1.5)  Andy Mendelsohn <andy@focus-consulting.co.uk>
    3     3.2 (  2.1/  1.1/  1.1)  bkraymond@geocities.com
    3     4.2 (  1.8/  2.4/  0.9)  "Bryan Duchesne" <crewsys@nbnet.nb.ca>
    3     2.5 (  1.8/  0.8/  0.8)  "Citimidia Internet" <admin@citemedia.com>

These posters accounted for 4.7% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  17.5 (  3.6/ 13.9/ 10.0)      5  "LSS" <lss@shaw.wave.ca>
  15.3 (  7.2/  5.8/  3.0)      9  rjk@linguist.dartmouth.edu (Ronald J Kimball)
  14.7 (  0.8/ 13.9/ 13.9)      1  Marius Kjeldahl <marius@funcom.com>
  13.6 (  8.8/  4.8/  2.5)     11  bart.lateur@skynet.be (Bart Lateur)
  10.1 (  0.8/  2.3/  1.9)      1  goossenk@natlab.research.philips.com (Goossens Kees G.W.)
   8.6 (  3.0/  5.6/  1.6)      4  "Vlad Volkov" <vvolkov@benton.com>
   8.0 (  0.7/  7.2/  6.3)      1  JJ353@webtv.net (J. J. Goodrich)
   7.3 (  3.4/  3.9/  1.5)      4  Andy Mendelsohn <andy@focus-consulting.co.uk>
   7.1 (  3.2/  3.9/  3.1)      6  "Sean Mintz" <stmintz@yahoo.com>
   6.5 (  0.6/  5.8/  4.0)      1  jjoerg@camlaw.rutgers.edu (john joergensen)

These posters accounted for 6.0% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  0.8 /  0.8)      3  "Citimidia Internet" <admin@citemedia.com>
1.000  (  2.0 /  2.0)      3  "Peter R Lynch" <plynch@bbss.com>
1.000  (  1.1 /  1.1)      3  bkraymond@geocities.com
0.972  (  1.5 /  1.5)      4  thst@my-dejanews.com
0.810  (  3.1 /  3.9)      6  "Sean Mintz" <stmintz@yahoo.com>
0.721  ( 10.0 / 13.9)      5  "LSS" <lss@shaw.wave.ca>
0.587  (  2.2 /  3.8)      3  Citizen Joe <no@spam.org>
0.558  (  1.2 /  2.1)      3  "L. Birdwell" <airman@inreach.com>
0.528  (  2.5 /  4.8)     11  bart.lateur@skynet.be (Bart Lateur)
0.515  (  3.0 /  5.8)      9  rjk@linguist.dartmouth.edu (Ronald J Kimball)

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.587  (  2.2 /  3.8)      3  Citizen Joe <no@spam.org>
0.558  (  1.2 /  2.1)      3  "L. Birdwell" <airman@inreach.com>
0.528  (  2.5 /  4.8)     11  bart.lateur@skynet.be (Bart Lateur)
0.515  (  3.0 /  5.8)      9  rjk@linguist.dartmouth.edu (Ronald J Kimball)
0.464  (  1.3 /  2.9)      3  doug@zerolimits.com
0.441  (  0.4 /  1.0)      3  ankadakia@hotmail.com
0.381  (  1.5 /  3.9)      4  Andy Mendelsohn <andy@focus-consulting.co.uk>
0.366  (  0.9 /  2.4)      3  "Bryan Duchesne" <crewsys@nbnet.nb.ca>
0.351  (  0.5 /  1.4)      3  "Brian Gaber" <brian.gaber@pwgsc.gc.ca>
0.286  (  1.6 /  5.6)      4  "Vlad Volkov" <vvolkov@benton.com>

16 posters (7%) had at least three posts.


Top 10 Crossposters
===================

Articles  Address
--------  -------

       9  Citizen Joe <no@spam.org>
       6  sw12@irz.inf.tu-dresden.de (Sebastian Weber)
       5  vepoko@start.com.au
       4  "Andrew Chapas" <aka@takas.lt>
       3  Pluto <Pluto@nospam.com>
       3  Citizen Joe <please@post-it.com>
       3  William Case <wcase@mediaone.net>
       3  "J.Oliver" <sabs45@hotmail.com>
       3  "Stefan Waidele" <waidele@rol3.com>
       2  rjk@linguist.dartmouth.edu (Ronald J Kimball)


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

Date: Mon, 30 Nov 1998 09:07:21 -0500
From: "E. Preble" <preble@ipass.net>
Subject: Open or Create a file
Message-Id: <mEx82.798$kx1.868@news.ipass.net>

I have a counter, and it needs to update a particular file when it
finds it, or else it needs to create the file, chmod it, and then
update the counter in it.  What is the "create file" command in
Perl.

Are there security issues with creating files from a script? (no
exec commands allowed on my server).

E. Preble



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

Date: Mon, 30 Nov 1998 06:35:12 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Origin of 'local'?
Message-Id: <ebohlmanF382Ao.no@netcom.com>

Steven Morlock <newspost@morlock.net> wrote:

: At first I thought 'local' was a bit of syntactic sugar that saved
: one the trouble of saving, modifying & restoring the value of
: of a global variable.  Repeatably I get minor burns by my forgetful
: memory of what 'local' does.  The source of my confusion
: results from how references are handled when a 'local' is effect.
: Unlike directly modifying a global variable, 'local' does not leave
: references to the global pointing to the new value.  For example
: the following:

[snip]

: Where did this seemingly unusual behavior for local come from?  Was it
: considered a feature and used to solve a particular class of problem?
: Is it documented in detail somewhere?

local was introduced to Perl long before references were.

Although you usually think of "local $var" as "save the value of $var and 
restore it on exit from this block," it's actually implemented as "save 
the symbol-table entry for $var, replace it with a new one, and restore 
the old symbol-table entry on exit from this block."  References don't 
know anything about symbol-table entries (at least hard references 
don't), so it would require an awful lot of work for local to look at all 
references and see if they're pointing at the same place that the 
symbol-table entry was pointing at.

And this behavior would more often than not be undesirable.  Consider a 
recursive routine that builds data structures; you generally don't want a 
reference to a structure that's already been built to suddenly change.
  
So basically the answer is "it would require a lot of work and would 
break a lot of existing code."


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

Date: Mon, 30 Nov 1998 08:01:29 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Origin of 'local'?
Message-Id: <pudge-3011980801340001@192.168.0.77>

In article <Px282.52$Hw.454556@lwnws01.ne.mediaone.net>, Steven Morlock
<newspost@morlock.net> wrote:

>At first I thought 'local' was a bit of syntactic sugar that saved
>one the trouble of saving, modifying & restoring the value of
>of a global variable.

Indeed, it is that.


>... produces the following output:
>
>s = 1234, rs = 1234
>s = 4321, rs = 4321
>s = 5678, rs = 1234 (*)
>s = 8765, rs = 8765
>
>The line highlighted with the '*' is a bit surprising to me.

Note that I tried this:

  sub output {
    printf "s = $s (%s), rs = $$rs (%s)\n", \$s, $rs;
  }

And got:

  s = 1234 (SCALAR(0x71a2660)), rs = 1234 (SCALAR(0x71a2660))
  s = 4321 (SCALAR(0x71a2660)), rs = 4321 (SCALAR(0x71a2660))
  s = 5678 (SCALAR(0x719e6ec)), rs = 1234 (SCALAR(0x71a2660))
  s = 8765 (SCALAR(0x71a2660)), rs = 8765 (SCALAR(0x71a2660))

I could come up with an explanation, but I am not sure it would be right,
so I won't.  :)

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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