[8640] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2257 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 6 08:07:34 1998

Date: Mon, 6 Apr 98 05:00:43 -0700
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, 6 Apr 1998     Volume: 8 Number: 2257

Today's topics:
    Re: ?: Usage Question <nathan@npj.com>
    Re: accessing variables EXPORTed then "use"d <ewinter@pop3.stx.com>
        ANNOUNCE: IndexMaker 6.1: an index.html maker from PDF, <pivari@geocities.com>
        Can I execute Perl scripts with Front Page 98 ? <nospam@noanswer.com>
    Re: Cross platform 'distributed' perl? <dgoddard@us.oracle.com>
        Determining which flock strategy perl is using (Frank D. Cringle)
    Re: file locking in perl <Mike_Lacey@Cargill.Com>
    Re: file permissions <ewinter@pop3.stx.com>
    Re: File Renaming Problem (Please Help...) <ewinter@pop3.stx.com>
    Re: frames (David Oswald)
        Help on Perl m144103303@abonados.cplus.es
    Re: internationalisation of MacPerl (Helmut Thetmeyer)
    Re: Newbie needs NT Help <tony@cyberscape.net>
    Re: perl and CGI <nathan@npj.com>
        Perl/Tk presentation at the Perl Conference plambert$1@plambert.org
        Please help me <Beljaars@fys.ruu.nl>
    Re: Post - is lwp the only answer? <pi83@dial.pipex.com>
        problems w/ miniperl during compilation of 5.004_04 <nega@vt.edu>
    Re: Urgent: Perl Win32 vs Unix Perl <ion@aroma.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 05 Apr 1998 12:00:48 -0600
From: Nathan Johansen <nathan@npj.com>
To: James Watson <james_vs_watson@yahoo.com>
Subject: Re: ?: Usage Question
Message-Id: <3527C6D0.61D4@npj.com>

Or if you're really attached to the eq operator, put quotes around your
zero.  Some more context of the sourrounding statement block might be
helpful for us to see the whole problem you're having.


($pageinfo->param('StdSglWinter') eq '0') ?


NPJ.com

James Watson wrote:
> 
> On Wed, 01 Apr 1998 17:03:40 -0500, Bruce Hodo
> <bruceh@interaccess.com> wrote:
> 
> >($pageinfo->param('StdSglWinter') eq 0) ?
> You may want this line to read
> ($pageinfo->param('StdSglWinter') == 0)
> Just a thought.
>  - James V. S. Watson


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

Date: Mon, 6 Apr 1998 07:09:44 -0400
From: "Eric Winter" <ewinter@pop3.stx.com>
Subject: Re: accessing variables EXPORTed then "use"d
Message-Id: <6gad6p$7ec@post.gsfc.nasa.gov>

Rick,

    Are these constants in intent only, or are they constants as defined by
Constants.pm? If the former, then PF_INET should be replaced by $PF_INET.

hth
Eric

Rick Schofield wrote in message <3520F404.AA679BFC@fmr.com>...
>This is a generic question but I'll use a specific example to
>illustrate my problem.
>
>(the following fragment is paraphrased from the chat2.pl as
>bundled with 5.002)
>
>use Socket;
>...
>if ( defined(PF_INET) ) {
>   $pf_inet = PF_INET;
>   $sock = SOCK_STREAM;
>}
>print "pf_inet = $pf_inet\n";
>
>OUTPUT:
>    pf_inet = PF_INET
>
>My question:  How do I form the proper syntax to look into the
>value of PF_INET?





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

Date: Mon, 06 Apr 1998 11:16:53 +0000
From: Fabrizio Pivari <pivari@geocities.com>
Subject: ANNOUNCE: IndexMaker 6.1: an index.html maker from PDF,HTML,VRML and other files
Message-Id: <3528B9A4.F9004C6C@geocities.com>

Hi,

I'm glad to announce the version 6.1 of IndexMaker a perl script to make

an index.html file from PDF, HTML, VRML and other files.
At the moment, it uses the /Author field, the first /Title field and in
the /Subject field every matched PDF files, the <TITLE> </TITLE>
field and  the META
Description and Author fields in every matched HTML files the Info
node field in every matched VRML 1.0 files the WorldInfo node field
info and title in every matched VRML 2.0 files and the name of the file
in the others.

What's new with version 6.1
In configuration file you can customize your e-mail address like
password
for anonymous ftp

This is the URL where you can find the tool
http://www.geocities.com/CapeCanaveral/Lab/3469



--
Fabrizio Pivari
mailto:pivari@geocities.com
http://www.geocities.com/CapeCanaveral/Lab/3469/
Member of ANFACE Software
http://www.geocities.com/CapeCanaveral/Hangar/4794/





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

Date: Mon, 6 Apr 1998 13:11:11 +0200
From: "Hi" <nospam@noanswer.com>
Subject: Can I execute Perl scripts with Front Page 98 ?
Message-Id: <3528b856.0@news1.ibm.net>

Is it possible to execute perl scripts with FrontPage 98 (under NT 4.0)
before uploading to Unix system ?
Thanks




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

Date: Sun, 05 Apr 1998 16:41:12 -0700
From: Denis Goddard <dgoddard@us.oracle.com>
Subject: Re: Cross platform 'distributed' perl?
Message-Id: <35281698.B3A52C91@us.oracle.com>

andrew@ugh.net.au wrote:
> 
> At some stage someone wrote:
> 
>  >host can hand a more or less arbitrary chunk of perl code to
>  >a server on another host and get back results from an 'eval'?
> 
> Have you seen Penguin?
> 

Since Tom hasn't answered this yet... :)

FROM THE PENGUIN FAQ:

---------------------------------------------------------------------
5.  'Saaaay, what _is_ the design of Penguin?'

    Glad you asked.

    Consider two machines, foo and bar.  A user on foo (or perhaps
    a program on foo) wishes to execute a program on machine bar.
    However, imagine that the people running bar don't want just
    anyone running code on their machine for security reasons.
    This is the normal case on the Internet, and one which the
    World Wide Web attempts to emulate with HTTP and CGI.

   [...]

    Using Penguin, the user/program on foo 'digitally signs' the
    code that's earmarked for delivery to bar.  The signature
    encodes the code in such a way that it is impossible to alter
    the code or deny that the signer signed it.

    The code is then wrapped up into a packet and transmitted
    through a 'channel' to a Penguin process running on machine
    bar.  The channel's protocol layer is abstracted away
    enough that it becomes unimportant; Penguin code can just
    as easily be delivered through SMTP or AOL Mail as through
    TCP/IP, DECNet, AppleTalk, whatever.

    The Penguin process on bar unwraps the packet, which contains
    further verification and checksum information, and then
    'digitally unsigns' the code, a process which provides the
    code in 'clear' form while telling the receiver who digitally
    signed it.

    [...]

    The code executing side then becomes the master in the
    transaction, and can send code to the original sender,
    send the return value back in a data packet, and so forth.
    The process repeats as necessary until both parties are
    done; the channel then closes, and the Penguin transaction is complete.



-- 
     __  __  _  __     __
~~~~(__)|-< /-\(__ |__(-_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Denis Goddard, Senior Member, Tech. Staff  |"I see the heads of men arise
email: dgoddard@us.oracle.com              |with hungry minds and open eyes!"
ourworld.compuserve.com/homepages/d_goddard| -Rush, from 2112: _The Oracle_


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

Date: Mon, 6 Apr 1998 10:24:19 GMT
From: fdc@cliwe.ping.de (Frank D. Cringle)
Subject: Determining which flock strategy perl is using
Message-Id: <vtaf9zw8mk.fsf@cliwe.ping.de>

I am writing a small C program that creates/updates a Berkeley DB
database.  The database will then be accessible to Perl scripts using
DB_File.  Clearly the C program should use the same locking method
as the local perl installation (flock/fcntl/lockf).

Is it possible to extract the information from Config.pm?  For
instance, by setting -DUSE_FLOCK / -DUSE_FCNTL / -DUSE_LOCKF in a
Makefile generated by MakeMaker for the C program.  Presumably

  if ($Config{'d_flock'}) print '-DUSE_FLOCK';
  elsif($Config{'h_fcntl'} print '-DUSE_FCNTL';
  elsif ($Config{'d_lockf'}) print '-DUSE_LOCKF';
  else die 'You lose';

would work.  It seems a rather arbitrary mixture of d_ and h_ names,
though.  Is this reliable?  Any better ideas?

-- 
Frank Cringle,      fdc@cliwe.ping.de
voice: (+49 2304) 467101; fax: 943357


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

Date: Mon, 6 Apr 1998 08:47:30 +0100
From: "Mike Lacey" <Mike_Lacey@Cargill.Com>
Subject: Re: file locking in perl
Message-Id: <6ga1ag$lts@wind.cargill.com>

As I understand it - in Unix you have what's called "Advisory Locking" .
This means that you can read and write anything you have file system
permission to. What a successful flock() does is stop *other* processes
obtaining a successful flock().

So; no mandatory locks then, unless someone else knows different?

Regards

Mike Lacey, Cargill PLC, UK

Stephen Mubita wrote in message ...
>I would like a mandatory lock on a file (the passwd file), that allows
>reading but not writing.
>
>After successfully opening the file for appending I tried
>flock PASSWD_FILE, $LOCK_EX;
>it seemed to succeed, but I could write to the same file outside the
>program.
>
>I also tried
>Use Fcntl;
>$retval = fcntl(PASSWD_FILE, F_SETLK, F_RDLCK) or $retval = -1;
>but $ret_val is always -1 afterwards, and I can still write to the file.
>




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

Date: Mon, 6 Apr 1998 07:12:37 -0400
From: "Eric Winter" <ewinter@pop3.stx.com>
Subject: Re: file permissions
Message-Id: <6gadc6$7eh@post.gsfc.nasa.gov>

Mike,

    Barring other factors, the new directory will be owned by the effective
user ID of the process which creates it, meaning the process executing the
script.

hth
Eric

Michael Wentzel wrote in message <352165e7.0@news.cc.umr.edu>...
>I have a script that is being run with a POST method from a HTML document
>that will create a directory, on server side, if it does not exist then
>will create a file in this directory(this is to allow files that should
>be grouped together to reside in the same directory).  The problem is
>that the newly created directory has a owner id of 32766 and not the
>owner of the directory above, therefore when it tries to create a file in
>the newly create dir the script fails.  Any suggestions... The only thing
>I can think of is using 'exec "chown <user> <directory name>";'.
>
>
>Michael Wentzel
>wentzel@umr.edu




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

Date: Mon, 6 Apr 1998 07:16:46 -0400
From: "Eric Winter" <ewinter@pop3.stx.com>
Subject: Re: File Renaming Problem (Please Help...)
Message-Id: <6gadjt$7g1@post.gsfc.nasa.gov>

Daniel,

    rename() does not work across filesystems, just like "mv". I suspect
your spooldir is on another filesystem. You would then need to copy and
delete twice. Why not just move it straight to the destination directory
with the new name?

hth
Eric

Daniel Lortie wrote in message <35250CF7.D04BEC5D@nt.com>...
>Hi I am having trouble renaming a file and I have absolutely no idea
>why.
>
>Here is my code:
>--- start
>    foreach $file (@filestomove)
>    {
>      chomp;
>      $name = basename($file);
>      $destname = "$spooldir/$name";
>      $tmpname = $destname;
>      $tmpname =~ s/std/incomplete/g; #copy as incomplete before
>renaming as std
>      if (rename("$file","$tmpname") == 0) { print "ren1 failed: $!\n";
>}
>      if (rename("$tmpname","$destname") == 0) { print "ren2 failed:
>$!\n"; }
>      print "MOVING COMMAND: mv $file $destname\n";
>    }
>--- end
>
>I am trying to move a file from one directory to another (with an
>intermediate step which is necessary
>because the final directory has a daemon which will pick up any files
>matching *std*)
>
>Here is the output I get when I run the code
>--- start
>ren1 failed: No such file or directory
>ren2 failed: No such file or directory
>MOVING COMMAND: mv
>/nt/users/zcrks46c_1/firms/spool/tester/teak_FNR_b11ext_1d10_b11e_cf_failur
es_apr03_10_31.stdf
>
>
/nt/users/zcrks46c_1/firms/spool/stdf/teak_FNR_b11ext_1d10_b11e_cf_failures_
apr03_10_31.stdf
>
>--- end
>
>The problem is if I run the "MOVING COMMAND" manually there is no
>problem.
>If I rely on the "rename(src,dest) method it returns an error. Why Why
>Why???????
>
>




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

Date: Mon, 06 Apr 1998 08:14:11 GMT
From: doswald@xmission.com (David Oswald)
Subject: Re: frames
Message-Id: <35288e7e.480821561@news.xmission.com>

On Mon, 06 Apr 1998 00:10:40 -0400, dhaack@emerald.tufts.edu (Daniel
Haack) wrote:

>I have a cgi I am writing which basically has a button which calls a cgi
>from one frame...but I need all the output of the cgi to come up in
>another frame. Is this possible. Everytime I run it now it outputs to the
>frame the cgi is called from...

1.	This isn't a Perl question.

2.	The CGI faq is posted frequently on the CGI usenet group.  The
FAQ addresses this issue.  You will find your answer and a good
discussion in that FAQ and on the PROPER usenet group.


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

Date: Mon, 06 Apr 1998 04:59:24 -0600
From: m144103303@abonados.cplus.es
Subject: Help on Perl
Message-Id: <6ga91r$rjc$1@nnrp1.dejanews.com>

Hi, I'm trying to learn Perl with the fabulous lessons from Kira's Web Tolbox,
but as the lessons are for Perl under Unix and I'm running it under Windows95
I find some problems, the question is:
I have a form that it's supposed to email the response to me but I can't
open the mail program (Netscape Mail)in the script to create the message
Do I need something for opening and creating a new message with  Netscape's
mail program? , here is the code I've typed in:

$mailprog = 'c:\Archiv~1\Netscape\Commun~1\Program\netscape.exe -mail";
$recipient = 'xxx@something.com';
open (MAIL, "|$mailprog $recipient ") || die "Can't open $mailprog!\n";

Hope someone can help as soon as possible
Thank You
Chuck

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Mon, 06 Apr 1998 11:22:24 +0200
From: hthetmeyer@ifm.uni-kiel.REMOVE.de (Helmut Thetmeyer)
Subject: Re: internationalisation of MacPerl
Message-Id: <hthetmeyer-0604981122240001@bonito.ifm.uni-kiel.de>

In article <alecler-0304981518270001@dialup-638.hip.cam.org>,
alecler@cam.org (Andre L.) wrote:

>use locale;
>$s = "andri"; # e acute
>print uc($s); # prints 'ANDRI' (E acute)
>
>This works fine in MacPerl 5.1.9r4, under System 7.5.5.

Thank's a lot for this hint! It also works fine under MacOS 8.1. Where did
you find this feature? It should be documented in macperl.pod - that would
have saved me hours of searching.

Best wishes, Helmut

p.s. excuse me for considering to use something else than perl ;-)

-- 
Please remove ".REMOVE" from return address
PGP  finger:thetmeye@sally.ifm.uni-kiel.de


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

Date: Mon, 6 Apr 1998 11:45:18 +0100
From: "Tony Kenny" <tony@cyberscape.net>
Subject: Re: Newbie needs NT Help
Message-Id: <6gabob$mb6$1@svr-c-02.core.theplanet.net>

What is being sent to your browser?

If you can describe the problem in a little more detail I will probably be
able to help.  It may just need a small addition to your registry.

~TK

Jonathan Stowe wrote in message <35259b9c.9281501@news.btinternet.com>...
>On Sat, 04 Apr 1998 04:03:50 GMT, Edward Lowery
><telowery@bellsouth.net> wrote:
>
>>I've written Perl script for Unix and I need to run it from NT.  I've
>>downloaded the
>>ActiveState Perl32 program and installed it, but can't get my webbrowser
>>to do anything.
>Dont you just hate those petulant webbrowsen?
>>Any ideas?  I'm doing this on WIN 95.  I'm also trying this on IIS.
>This is almost certainly nothing to do with perl itself.  I would
>assume that you need to find out how to get your server to run your
>script - this is addressed in the IIS documentation.  If you have
>index server installed you could search for "associate".
>
>A more appropriate group for this sort of question is
>comp.infosystems.www.servers.ms-windows  but i would also venture that
>this is a FAQ in that group and may or may not be met with a
>favourable response depending on the history there.
>
>/J\
>Jonathan Stowe
>See the MetaFaq at
http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm




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

Date: Sun, 05 Apr 1998 11:11:17 -0600
From: Nathan Johansen <nathan@npj.com>
To: Per Gransxe <gransoe@get2net.dk>
Subject: Re: perl and CGI
Message-Id: <3527BB35.6CEB@npj.com>

Hi Per:

I've made a working sample of this for you to look at here:

	http://www.npj.com/additup.html

Here's a quick primer that will let you do what you want to do.  The
parse_form_data subroutine will collect web data from either a GET or a
POST (it figures it out from the headers) and then store them in a hash.

If you're not familiar with the Perl data types, then it would be good
for you to learn them:  (1) Scalar, (2) Array, (3) Hash.  If you are
familiar with them, then just skip down where I've included a sample
program like you were asking for.

Scalar data starts with a $ sign and is alphanumberic, with underscores:

	$myname = "Nathan Johansen";
	$myage  = 22;

Notice that for the string, I used double quotes.  I could also use
single quotes, but then I wouldn't be able to add things like a new
line:

	$myname = "Nathan Johansen\n";

Single quotes are explicit, meaning that whatever is in them is what is
stored, so Perl won't do any variable interpretation on the string.

	$myname = 'Nathan Johansen.  I am $myage.';

Will print exactly that, where as if I put it in double quotes, it would
replace $myage with the current value, which would be the number 22.

Arrays start with an @ symbol, they are lists of data indexed
sequentially starting at zero.  When referencing a piece of data in an
array, you change the @ to a $ sign, and use square [] brackets to
denote the index value.

	@names = ("Nathan", "Mark", "Alice", "Samantha");
        @ages  = (22, 28, 25, 29);

Stores the four names into the array @names and the four ages into
@ages.  To list the contents of @names, use something like this ($_ is a
special Perl symbol which you can learn about later, but notice that
here is is taking on the value of our counter each time through the
loop, and $#names is the number of the last index in the array):

	foreach (0..$#names) {
            print "$names[$_]\n";
        }

This will run through the array, printing out the value for each one. 
But if you know that you just want to see what the first term is:

	$myname = $names[0];

And so it goes.  A Hash is similar to an Array in that you have an
indexed list of keys which have associated values.  A hash starts with a
% sign.  For scalar references, it changes to a $ sign, and you use
curly {} brackets to specify the index value.  For instance:

	foreach (0..3) {
            %friends{$names[$_]} = $ages[$_];
        }

        print "My friend Nathan is $friends{'Nathan'} years old.\n";

So, anyway, there is your crash course on Perl data types.  Here is your
sample program.  Here is a simple HTML form:

--- begin HTML form ---

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Script to Add Two Numbers</title>
</head>

<body>
<h1>Script to Add Two Numbers</h1>

<p>Please type the two numbers that you wish to add in the boxes
provided, then press &quot;Submit&quot; to add them.</p>

<form action="additup.cgi" method="POST">
    <p><input type="text" size="5" name="field1"> 
    is the First Number.</p>
    <p><input type="text" size="5" name="field2">
    is the Second Number.</p>
    <p><input type="submit" name="B1" value="Submit"></p>
</form>
</body>
</html>

--- end HTML form ---

Save the form on your server as additup.html  --  Now you can write a
simple CGI script like this:

-- begin CGI script ---

#!/usr/bin/perl                # Make sure that this is the first line.

$webmaster = 'nathan@npj.com';
parse_form_data(*webdata);
$sum = $webdata{'field1'} + $webdata{'field2'};

# Now you've got the sum.  Spit out the answer:

print "Content-type: text/html\n\n";
print <<End_of_Data;

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Sum of Two Numbers</title>
</head>

<body>
<h1>Sum of Two Numbers</h1>

<hr>The sum of $webdata{'field1'} and $webdata{'field2'} is: $sum<hr>
<br>Please click the back button to do this again.
</body>
</html>

End_of_Data

exit(1);

sub parse_form_data {
   local (*FORM_DATA, $multi) = @_;
   local ( $request_method, $query_string, @key_value_pairs,
           $key_value, $key, $value, $multi);

   # $multi is a separator character, it will default to \0 if
   # nothing else is passed to the routine.  The value of this
   # varuable is to help format your data in the event that you
   # have more than one value for a particular field.  Say, a
   # group of check boxes, and they've selected three of them.
   # You've got all the checkboxes tagged with the same name,
   # so all the data will be appended together under that name,
   # separated by a \0 (or a comma, or a tab, or whatever you want).

   $request_method = $ENV{'REQUEST_METHOD'};

   $multi = "\0" if $multi eq '';
   if ($request_method eq "GET") {
       $query_string = $ENV{'QUERY_STRING'};
   } elsif ($request_method eq "POST") {
       read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
   } else {
      &return_error (500, "Server Error", "Server uses unsupported
method");
   }

   @key_value_pairs = split (/&/, $query_string);

   foreach $key_value (@key_value_pairs) {
       ($key, $value) = split (/=/, $key_value);
       $value =~ tr/+/ /;
       $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;
       if (defined($FORM_DATA{$key})) {
           $FORM_DATA{$key} = join ("$multi", $FORM_DATA{$key}, $value);
       } else {
               $FORM_DATA{$key} = $value;
       }
   }
}

sub return_error {
    local ($status, $keyword, $message) = @_;

    print "Content-type: text/html", "\n";
    print "Status: ", $status, " ", $keyword, "\n\n";

    print <<End_of_Error;

<HTML>
<HEAD>
    <TITLE>CGI Program - Unexpected Error</TITLE>
</HEAD>
<BODY>
<H1>$keyword</H1>
<HR>$message<HR>
Please contact $webmaster for more information.
</BODY>
</HTML>

End_of_Error

    exit(1);
}

# End of Program

--- end CGI script ---

So, save this on your web server as additup.cgi then from the command
line, do a:

	chmod 755 additup.cgi

Which will set the permissions properly.  If you don't do this then the
web server will say "FORBIDDEN" when you try to run your script.  Hope
that this helps, and have fun!


Nathan Johansen
nathan@npj.com

Per Gransxe wrote:
> 
> Hi everybody
> 
> I need some info on how to pipe data from a html-page via forms to a perl script.
> Enviroment variables and standard input and so on...
> 
> Can somebody for example send me a sample of a script and a html-code simply showing how to add two numbers (from <INPUT>-tags) and print the result on a new page.
> 
> Please post your answers by email as well posting to: gransoe@get2net . dk
> 
> Hope to hear from you sooooon,
> 
> Per.


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

Date: 6 Apr 1998 09:24:22 GMT
From: plambert$1@plambert.org
Subject: Perl/Tk presentation at the Perl Conference
Message-Id: <6ga706$bnj$2@nntp1.ba.best.com>

I was at the Perl conference last August (but am unfortunately unable to
attend this year's, since my fiance has, for some strange reason, forbidden
me from taking her to the conference for our honeymoon ;-) and there was
a really nice presentation on Perl/Tk which was the reason I got into it in
the first place.

The problem is, not only do I forget who the presenter was (a very pleasant
fellow from England) but I have also misplaced a large chunk of my 
materials from the conference.

The presentation involved an MUA written in Perl/Tk, based on a Netscape-ish
interface.

Anyone know where I can get more info on this?  Is the source of the MUA
he described available?  I'd love to get my hands on it...

Thanks!

--Paul Lambert



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

Date: Mon, 6 Apr 1998 07:48:41 GMT
From: Haaino Beljaars <Beljaars@fys.ruu.nl>
Subject: Please help me
Message-Id: <352888D8.DB0BD858@fys.ruu.nl>


--------------744D8037AF8BBD66BE674A85
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

On the bottem of this E-mail I have a simple script that deletes

all empty directories. The problem is that it deletes ALL empty directories.

How can I chance this program that it only deletes empty directories from the

user 'guest' but not the directory "/home/guest"?

If anybody can help me, I would be greatfully apprisiated!!!

#!/usr/bin/perl

    &smash("/");
    sub smash {
      my $dir = shift;
      opendir DIR, $dir or return;
      my @contents =
        map "$dir/$_",
        sort grep !/^\.\.?$/,
        readdir DIR;
      closedir DIR;
      foreach (@contents) {
        next unless !-l && -d;
        &smash($_);
        rmdir $_;
      }
    }



--------------744D8037AF8BBD66BE674A85
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>

<PRE>Hi,</PRE>

<PRE>On the bottem of this E-mail I have a simple script that deletes</PRE>

<PRE>all empty directories. The problem is that it deletes ALL empty directories.</PRE>

<PRE>How can I chance this program that it only deletes empty directories from the</PRE>

<PRE>user 'guest' but not the directory "/home/guest"?</PRE>

<PRE></PRE>

<PRE>If anybody can help me, I would be greatfully apprisiated!!!</PRE>

<PRE></PRE>

<PRE>#!/usr/bin/perl

&nbsp;&nbsp;&nbsp; &amp;smash("/");
&nbsp;&nbsp;&nbsp; sub smash {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $dir = shift;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opendir DIR, $dir or return;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my @contents =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map "$dir/$_",
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sort grep !/^\.\.?$/,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; readdir DIR;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; closedir DIR;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (@contents) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next unless !-l &amp;&amp; -d;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;smash($_);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rmdir $_;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
&nbsp;&nbsp;&nbsp; }</PRE>
&nbsp;</HTML>

--------------744D8037AF8BBD66BE674A85--



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

Date: Mon, 06 Apr 1998 10:01:09 -0700
From: Marcia L Sussman <pi83@dial.pipex.com>
Subject: Re: Post - is lwp the only answer?
Message-Id: <35290A55.4839@dial.pipex.com>

Sorry I was so vague -
I have a search engine which will only accept POST data.
I have a form for this on Yahoo, but they now tell me
that they will only send out GET data.
Therefore I need to write a Perl routine to take the incoming
GET query string and send it to our database POST.
I know that the lwp module will do this, but our host
wont/can't let me install it...

Any other ideas?

Thanks for your help

Eugene Sotirescu wrote:
> 
> I've got some ideas, but I wouldn't know if they apply to your question
> since I don't really understand what you want to do.
> By 'sending Post' you mean using the POST method in a form? Or sending
> British Post (American Mail)?
> Or am I missing something?
> 
> Marcia L Sussman wrote:
> 
> > Is there any alternative to lwp for sending Post?
> > The hosts of my site won't install lwp, I tried uploading
> > the modules but get errors in http::Date
> > -so I can't get past use LWP::UserAgent;
> > anyone any ideas??? -Thanks
> > --
> > Marcia Vigar <marcia.vigar@reed.co.uk>


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

Date: 05 Apr 1998 19:29:26 -0400
From: Bucky LaDieu <nega@vt.edu>
Subject: problems w/ miniperl during compilation of 5.004_04
Message-Id: <m2ogyfrgo9.fsf@negapluck.async.vt.edu>

basicly miniperl doesnt work. it doesnt seem to be able to interperet
perl, thus './miniperl configpm tmp' craps out with a 'syntax error on 
compilation'.  if i replace miniperl with my current perl the
compilation procces contiunes just fine. I dont see this as a viable
solution though.  Im not sure what configure info I should include, so 
I haven't included any. ;) Ill be happy to send out what every config
info is necessary though.

bucky


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

Date: Sun, 5 Apr 1998 00:53:33 -0800
From: "Ion Chalmers Freeman" <ion@aroma.com>
Subject: Re: Urgent: Perl Win32 vs Unix Perl
Message-Id: <35274515.0@news.prostar.com>

Justin,
    Why use the common gateway interface? As long as you have the FrontPage
server extensions, why not move your perl scripts to ASP? That should
assuage the ISP's fears.
    Is this less stable? I'd think it'd be more.
    Is it slower? This, I'd buy.
Ion Chalmers Freeman, MCP
ion@aroma.com
http://foxinternet.net/web2/ion
"Opportunities for getting it right the first time are rife ' -
Peter N. Spotts, Christian Science Monitor, 3/26/98



Creede Lambard <$_=qq!fearless@NOSPAMio.com!;y/A-Z//d;print> wrote in
message <6g5o6s$og5@bgtnsc03.worldnet.att.net>...

J. Probert wrote in message <3525e058.418441@news.saix.net>...
>Hello all,
>
>I have a situation in which I need to make a decision urgently, and
>any guidance will be much appreciated.
>


<snip>

>The service provider who quoted on the hosting of this site is busy
>preparing their side for the upload, and have informed me that all the
>Perl scripts will be placed on their Unix machine, the rest of the
>Frontpage stuff will be on an NT machine.
>Their reason is that Perl Win32 is "buggy, and more than capable of
>causing NT to crash, and Perl is more stable on Unix", and they are
>not prepared to put their other clients hosted on that NT machine at
>risk.
>

Find a different service provider. If they're the only game in town I
suppose you'd have to follow their rules, but I don't think Perl on Win32 is
any more buggy than any other piece of software. I don't know the relative
stability of Perl/Unix vs. Perl/Win32, but enough people are using
Perl/Win32 and getting enough work done that it can't be as horrible as they
make it out to be.

Of course if you have to make massive changes to your web site, you have
access to Perl to do it . . .    :D








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

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

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