[12722] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 132 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 13 20:07:36 1999

Date: Tue, 13 Jul 1999 17:05:27 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 13 Jul 1999     Volume: 9 Number: 132

Today's topics:
    Re: ** Working With Strings (Larry Rosler)
    Re: FTP fetch with LWP::Simple (Paul J. Schinder)
    Re: Linux - Apache - Perl (I R A Aggie)
        MIME::Lite and file attachments lbravo10102@my-deja.com
        Online Coverage of '99 USENIX Annual Conference & the 2 (Jennifer Radtke)
    Re: Problem with MacPerl locating modules (Paul J. Schinder)
    Re: Reclaiming hashed memory (Anno Siegel)
        Why Perl instead of ColdFusion? <porterh@yahoo.com>
    Re: Win32 Perl Editors <john@dlugosz.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Tue, 13 Jul 1999 16:01:22 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: ** Working With Strings
Message-Id: <MPG.11f5651e7b0407da989cc4@nntp.hpl.hp.com>

In article <slrn7onggl.h7.abigail@alexandra.delanet.com> on 13 Jul 1999 
17:48:17 -0500, Abigail <abigail@delanet.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MMCXLII September MCMXCIII in
> <URL:news:MPG.11f510c4a29b3bbc989cb8@nntp.hpl.hp.com>:
> @@ 
> @@ Things like this are tipping me further to the Abigail side of The 
> @@ Force.
> 
> You like mauve too?

Nowhere near Dark enough.  I prefer gentian violet.

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


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

Date: Tue, 13 Jul 1999 23:11:10 GMT
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: FTP fetch with LWP::Simple
Message-Id: <iIPi3.1184$%w4.47945@iad-read.news.verio.net>

In <7mg9fo$uib$1@nnrp1.deja.com> wired2000@my-deja.com writes:

>In article <xkf4sj8mo57.fsf@valdemar.col.hp.com>,
>  Eric The Read <emschwar@rmi.net> wrote:
>> wired2000@my-deja.com writes:
>> > Any help on how to fetch with LWP::Simple greatly appreciated.
>>
>> LWP::Simple is for WWW pages.
>>
>> You want Net::FTP (also on CPAN).
>>
>> -=Eric
>>

>That's what I thought too, but according to the Perl FAQ's (Faq 9, last
>question on page), it says that LWP::Simple can do FTP fetches. I
>myself don't see how, but it says it, and I'm wondering if its truly
>possible.

What definition of the word "fetch" are you using that makes you think
that LWP::Simple can't do what you want?  For example:

use LWP::Simple;

$result = getstore("ftp://some.ftp.server/some/path","localfile");


works just fine, provided you have libnet installed.  Check the result
code if something goes wrong; according to the docs, it's the HTTP
return code.  LWP::Simple will choose a reasonable return code for
non-http URL's.

>Would anyone know by any chance if using Net::FTP how I can verify if a
>file is downloadable (similar to doing a HEAD request, just want to
>verify if its valid without downloading it).

Try doing a LWP::Simple::head() on the ftp URL and see what you get.
See the docs for details.

>Thanks
>Charles


>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
--
Paul J. Schinder 
NASA Goddard Space Flight Center 
schinder@leprss.gsfc.nasa.gov 


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

Date: 13 Jul 1999 23:19:14 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Linux - Apache - Perl
Message-Id: <slrn7onifs.i13.fl_aggie@thepentagon.com>

On 13 Jul 1999 17:58:45 -0500, Abigail <abigail@delanet.com>, in
<slrn7onh47.h7.abigail@alexandra.delanet.com> wrote:
+ I R A Aggie (fl_aggie@thepentagon.com) wrote on MMCXLII September
+ MCMXCIII in <URL:news:slrn7omfpf.ecd.fl_aggie@thepentagon.com>:

+ ,, Then let me ask you this...why is there more than one newsgroup?

+ That way you can post the same question to multiple groups!

You mean to say I've not been realizing the full potential of Usenet
by posting to what appeared to be the most pertinent group(s) for
any given question?? I'm such a newbie sometimes...

James


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

Date: Tue, 13 Jul 1999 23:38:24 GMT
From: lbravo10102@my-deja.com
Subject: MIME::Lite and file attachments
Message-Id: <7mgilf$25r$1@nnrp1.deja.com>

I installed MIME::Lite and wrote a little script
that is supposed to send files in email.

It works ok, and it is sending an email message
with 2 attachments, but the attachments should be
just plain old text (comma delimited files).

The recipient gets gobbledeegook.  So here's the
script:

------------- START SCRIPT -----------------
#!/usr/bin/perl -w
#

use strict;

use MIME::Lite;

my $msg = new MIME::Lite
From    =>'webmaster@newtek.com',
To      =>'webmaster@newtek.com',
Subject =>'Data file attached',
#Type    =>'multipart/mixed';

# attach a part
attach $msg
Type    =>'TEXT',
Data    =>"Here are the files...";

attach $msg
Type    =>'application/octet-stream',
Disposition=>'attachment',
Encoding =>'base64',
Path    =>'/www/directory/path/',
Filename =>'file1.txt';

attach $msg
Type    =>'text/plain',
Disposition=>'attachment',
Encoding =>'base64',
Path    =>'/www/directory/path/',
Filename =>'file2.txt';

$msg->send;

------------------- END SCRIPT --------------

Any ideas?  Thanks in advance!


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 13 Jul 1999 23:45:09 GMT
From: jennifer@usenix.org (Jennifer Radtke)
Subject: Online Coverage of '99 USENIX Annual Conference & the 2000 Call for Papers
Message-Id: <FEu1zA.Fs@usenix.org>

**DR. DOBB'S JOURNAL TechNET/CAST covered the 1999 USENIX Technical
Conference, in June in Monterey, California, and broadcasts are available
at http://technetcast.ddj.com/
Coverage includes the following interviews of conference participants:
- Linus Torvalds hosted the Linux BOF and reported on the state of Linux,
with questions from the audience.
- Eric Allman, on sendmail, email security, and spam.
- Miguel de Icaza on GNOME and Linux.
- Jeff Mogul, Compaq Western Research Lab, on HTTP, firewalls.
- Ronald Record on SCO Skunkware and SCO Wabi (Windows Application Binary
Interface).
- Peter Salus on the history of Unix and Linux.
- Henry Spencer on C and Interpretive Languages.


**Announcing the Call for Papers for USENIX 2000, including the FREENIX Track

USENIX 2000 ANNUAL TECHNICAL CONFERENCE
June 18-23, 2000
San Diego, California, USA
=================================================================
Call for Papers at  http://www.usenix.org/events/usenix2000/cfp/
Refereed Paper submissions due:  November 29, 1999
FREENIX Track submissions due:  November 29, 1999
=================================================================
The USENIX Annual Technical Conference brings together under a single roof
the broad community of developers, researchers, and users. It is well known
as the place to share the results of the latest and best work, find points
of common interest and perspective, and develop new ideas that cross and
break boundaries.

The three-day technical sessions include: a track of refereed papers
selected by the Program Committee; a track of Invited Talks by experts and
leaders in the field; and FREENIX, a track of talks and paper presentations
on freely available software and systems. Three days of tutorials precede
the technical sessions with practical tutorials on timely topics.

The Program Committee seek submissions to the Refereed Paper track on a
broad range of topics, including:
* Operating system and application structures for modern, commodity
hardware, including extensible, embedded, distributed, and object-oriented
systems.
* The impact of commodity hardware and software on the development of
software systems.
* How the growing ubiquity of the Internet affects, and is affected by,
developments in the areas of electronic commerce, security, heterogeneous,
and mobile computing.
* ActiveX, Java, CORBA, and other technologies that support mobile and
reusable software components.
* The future of Tcl/Tk, Perl, and other scripting and domain-specific
languages.
* Connecting, managing, and maintaining geographically distributed,
heterogeneous networks of computers.

The FREENIX track showcases the latest developments and interesting
applications in freely redistributable software. FREENIX is open to the
full range of software--Apache, FreeBSD, GNOME, GNU, Linux, NetBSD,
OpenBSD, Samba, and more--which is freely redistributable in source code
form and provides pointers to where the code can be found on the Internet.

The purpose for the FREENIX papers is not as an archival reference, but
rather a place to let others know about the project on which you are
working and to provide a forum from which to expand your user base. We are
seeking submission of a one to three page abstract for talks which
advance the state of the art of freely redistributable software or
otherwise provide useful information to those faced with deploying (and
"selling") free software in the field.

Invited Talk and tutorial suggestions and proposals are also very welcome.
=============================================================
USENIX, the Advanced Computing Systems Association, is a not-for-profit
society with an international membership of scientists, engineers, and
system administrators working on the cutting edge of systems and software.
For 25 years USENIX conferences and workshops have emphasized the free
exchange of technical ideas unfettered by stodginess or commercialism.



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

Date: Tue, 13 Jul 1999 23:27:06 GMT
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: Problem with MacPerl locating modules
Message-Id: <eXPi3.1189$%w4.48170@iad-read.news.verio.net>

In <7me45r$ddv@pmgm.Stanford.EDU> gcavet@pmgm.Stanford.EDU (Guy Cavet) writes:

>A basic problem with MacPerl - I couldn't find a MacPerl-specific newsgroup but
>please feel free to redirect me if there's a more appropriate forum for this.

>I installed MacPerl and it runs just fine, except for loading modules that came
>along with it.  For example, trying to run One Liner results in the following:

># Can't find loadable object for module Mac::Memory in @INC (Macintosh HD:\
>Applications:MacPerl:lib Dev:Pseudo)
>File 'Macintosh HD:Applications:MacPerl:lib:Mac:AppleEvents.pm'; line 773
><etc. etc>

>Of course I have checked that the Memory module is indeed in 
>Macintosh HD:Applications:MacPerl:lib:Mac and,

But that's not the file it's complaining about.  You should have a
Macintosh HD:Applications:MacPerl:lib:MacCFM68K:auto:Mac:Memory:Memory
shared library file (since I believe a 540c is a 68k rather than a PPC
machine; if not replace CFM68K by PPC in the path).  That's what it's
complainig about. And, since you seem to be using a 68k machine, you
must have the CFM68k extension in your extensions folder when you boot
the machine so it can use shared libraries.  And you must have
replaced the MacPerl application that the installer installed with the
CFM68k version.  All this is explained in README.MAC.

I'm guessing one of these hasn't been done or is missing.

>as you can see, Macintosh HD:Applications:MacPerl:lib is in @INC.
>Also, Perl finds the AppleEvents module just fine and it's in the same 
>directory as the Memory module.  I suppose this could mean that there's 
>something wrong with the Memory module files, but they're just as I downloaded 
>them...
>If it is relevant, I'm running Version 5.2.0r4 Patchlevel 5.004 on a 540c.

>Any help/advice appreciated.

>Guy

--
Paul J. Schinder 
NASA Goddard Space Flight Center 
schinder@leprss.gsfc.nasa.gov 


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

Date: 13 Jul 1999 23:08:39 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Reclaiming hashed memory
Message-Id: <7mggtn$dou$1@lublin.zrz.tu-berlin.de>

Lauren Smith <laurens@bsquare.com> wrote in comp.lang.perl.misc:
>Anno Siegel wrote in message <7mg7bd$d73$1@lublin.zrz.tu-berlin.de>...

[...]

>>How do you check the size of your hash?  If it still exists, it hasn't
>>gone out of scope (obviously).
>
>
>I assigned the hash to a scalar:
>
>my $hash_size = %hash;
>print $hash_size;
>
>Output:
>12/256
>
>This is put inside the loop where %hash is also created with my().
>
>The contents of the hash increase and decrease in size, but the total size
>of the hash only increases.  It seems that when the hash is destroyed only
>the contents are destroyed.

No, you're quite right.  The first number is the number of keys in the
hash, the one right of the slash is the number of assigned slots.

>Of course, my whole interpretation of assigning the hash to a scalar is
>mistaken, but the ## / ### format gives me the impression that I am looking
>at the number of elements vs. the size of the hash.
>
>>undef %hash
>
>I have tried this to no avail.  The hashtable never gets destroyed nor
>shrunk, it seems.

Trying to reconstruct your situation, I arrive at something like this:

#!/usr/bin/perl -w

for ( 1 .. 3 ) {
  my %h;
  @h{ 0 .. rand 100} = 1;
  $d = %h;
  undef %h;
  $u = %h;
  print "defined: $d undef'd: $u\n";
}

--->
defined: 32/64 undef'd: 0
defined: 21/32 undef'd: 0
defined: 10/16 undef'd: 0

(or similar)

As you see, the size shrinks if it can.

>Maybe this is a feature (bug?) in ActivePerl?

If anything, it's a bug, in my opinion.

Anno


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

Date: Tue, 13 Jul 1999 23:20:09 GMT
From: Henry Porter <porterh@yahoo.com>
Subject: Why Perl instead of ColdFusion?
Message-Id: <7mghiu$1nn$1@nnrp1.deja.com>

I've been creating database applications on the Web using ColdFusion
for about 2 years now.  I tinker with Perl and C on the side, in part to
convince myself that I'm a real programmer. (I have a hard time
justifying to myself the several years i spent studying computer science
when I realize I spend my days "programming" with a "language" that any
reasonably intelligent computer-literate person could become fairly
proficient in in a week.)  Because of this foolish pride and
also just because I like Perl and what it represents, I'd much rather be
using Perl as my primary development language.  However, despite my best
efforts, I cannot convince myself, and I have yet to be convinced by
others, that there is a practical reason for using Perl instead of
ColdFusion for database-driven web apps.

To me, the huge advantage, the real value of CF, and the main reason I'm
asking this question, is time of development.  A given project can
be developed in CF in a fraction of the time it would take to create it
in Perl. I do not consider my Perl skills to be on such a level that I
could give an accurate CF hours : Perl hours conversion; however I
strongly doubt that many with experience with both would disagree with
this point (glad to hear from you if you do).

With CF taking time of development with a 1st round knockout (in my
eyes), I'll address a few of the issues in favor of Perl that seem to
come up in similar discussions I've seen here and in Allaire's forums:
(Important Note: I'm not addressing platform; Allaire is working on
supporting more unixes, and I want to avoid a platform discussion)
-Cost:  The cost of CF is made up for quickly with the development hours
       tradeoff
-Support: Both are excellent
-Speed: I'm not real interested in a highly technical discussion.  I've
       heard both camps claim hands-down superiority here.  If speed is
       *that* important I don't think you'd be using either.
-Forced to use Allaire's IDE:  This isn't true; I use Emacs.
-Regep and File Issues: Perl by a mile

I'm not looking for a point by point comparison; I only address the
above issues to hopefully avoid hearing those complaints about CF.

Please note that what I am most interested in is the answer to the
following question: Given the development time advantage of CF, why
should I write Web/DB apps using Perl?

There must exist good reasons to choose Perl over CF; I look forward to
hearing them.

-Henry


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 13 Jul 1999 18:54:16 -0500
From: "John M. Dlugosz" <john@dlugosz.com>
Subject: Re: Win32 Perl Editors
Message-Id: <7BE888A2AC270F38.53DA63FCA1140407.961CE989B4718328@lp.airnews.net>

I use "Source Insight" (www.sourcedynamics.com).  The upcoming version has
full Perl support.

Kevin Kuebler <kkuebler@iwaynet.net> wrote in message
news:7mga44$3cl$1@news.iwaynet.net...
> Hi all,
>
> I've been using the ActiveState releases of Perl for some time now. The
> other day I came across the Windows95/NT section of the ActivePerl FAQ.
One
> of the subsections is titled "What editors are available for Windows?" I
> decided to check out the Perl Builder application. Until then I'd been
using
> Programmer's File Editor (PFE32) - a freeware file editor - to edit my
Perl
> scripts. PFE32 is a nice basic editor isn't a real IDE like Perl Builder
> (with color coded syntax highlighting, debuging tools, etc.)
>
> I downloaded a demo copy of Perl Builder and so far I'm quite impressed.
> It's a version 1.0 release, so there are some problems, but overall it
seems
> like it could be a great Perl editor. It feels much like the Microsoft
> Visual Basic development environment. It also has some pretty cool
features
> for developing cgi scripts in Perl but I haven't really tried them out
yet.
>
> Does anyone have any experience with this program? I'm trying to decide if
> it's worth the $150 price or if I should try something else first. What
> about other editors - any favorites among the Windows Perl community out
> there?
>
> Thanks,
> Kevin Kuebler
>
>




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

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

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


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