[10973] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4573 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 7 15:27:18 1999

Date: Thu, 7 Jan 99 12:00:20 -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           Thu, 7 Jan 1999     Volume: 8 Number: 4573

Today's topics:
        "internal server error" <webpages@email.com>
    Re: $0 as .//programName  ? <xah@web-central.net>
        [ANNOUNCE] new module Puppet::LogBody <domi@barrayar.grenoble.hp.com>
        [ANNOUNCE] New version of Tk::Multi <domi@barrayar.grenoble.hp.com>
        [ANNOUNCE] new versions of Puppet::Log module <domi@barrayar.grenoble.hp.com>
        Announce: Apache::Roaming-0.1000 <joe@ispsoft.de>
        ANNOUNCE: HTML::Validator <si@iki.fi>
        Announce: PDF-1.08 antro@my-dejanews.com
    Re: Arrays from File Handles Problem (Larry Rosler)
    Re: Case Modification (Matthew Bafford)
    Re: Case Modification <staffan@ngb.se>
    Re: Case Modification (brian d foy)
    Re: Extended version of "hex" <staffan@ngb.se>
    Re: How do I split this...? (brian d foy)
    Re: HP-UX Install problem <kerry.allsup@bridge.bellsouth.com>
    Re: If Larry Wall's listening out there.... (David Formosa (aka ? the Platypus))
    Re: Improve speed of a perl-script ... and efficiency i (Dan Wilga)
        messageboard <vdweiden@casema.net>
        Perl Programmer Needed steamy@my-dejanews.com
        Permission probs <r2-d2@REMOVEbigfoot.com>
    Re: Q on search & replace in larger strings <staffan@ngb.se>
    Re: Randal's code [was Re: How do I delete tmp files ba (Larry Rosler)
    Re: Randal's code [was Re: How do I delete tmp files ba (Randal L. Schwartz)
        Use of flags? (Laran Coates)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 07 Jan 1999 20:04:18 +0100
From: Eirik Johansen <webpages@email.com>
Subject: "internal server error"
Message-Id: <36950532.AF3E1068@email.com>

Hi !

I've just started learning Perl and I recently modified a CGI-skripy,
but now it won't work and I don't know why. Would someone be as kind as
to rund it un their Unix shell (I don't have Unix) and tell me which
line makes the error.

Thanks so very much !

Regards

Eirik Johansen

#!/usr/bin/perl

# This script will take information from a form
# and place it in a mail to the desired recipent

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

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ tr/%40/@/;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}

$mailprog = '/usr/sbin/sendmail';

# this opens an output stream and pipes it directly to the sendmail
# program. If sendmail can't be found, abort nicely by calling the
# dienice subroutine (see below)

open (MAIL, "|$mailprog -t") or &dienice("Can't access $mailprog!\n");

# here we're printing out the header info for the mail message. You must

# specify who it's to, or it won't be delivered:

print MAIL "To: $FORM{$recipient}\n";

# In case the owner of the form has any questions, I'll set the
# reply-adress as my own

$reply = 'webpages@email.com';

print MAIL "Reply-to: $reply\n";

# print out a subject line so you know it's from your form cgi.
# The two \n\n's end the header section of the message. Anything
# you print after this point will be part of the body of the mail.

print MAIL "Subject: $FORM{$subject}\n\n";

# here you're just printing out all the variables and values, just like
# before in the previous script, only the output is to the mail message
# rather than the followup HTML page.

foreach $key (keys(%FORM)) {
print MAIL "$key = $FORM{$key}\n";
}

# when you finish writing to the mail message, be sure to close the
# input stream so it actually gets mailed.

close(MAIL);

# now print something to the HTML page, usually thanking the person
# for filling out the form, and giving them a link back to your homepage

print <<EndHTML;
<h2>Thank You</h2>
Thank you for writing. Your mail has been delivered.<p>
Do you want a form like this one? Then visit <a
href="http://webpages.findhere.com" target="_top">The Webpage of
Webpages</a>
</body></html>
EndHTML
;

sub dienice {
($errmsg) = @_;
print "<h2>Error</h2>\n";
print "$errmsg<p>\n";
print "</body></html>\n";
exit;
}



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

Date: Thu, 07 Jan 1999 11:40:24 -0800
From: "Xah Lee" <xah@web-central.net>
Subject: Re: $0 as .//programName  ?
Message-Id: <7732jd$379$1@remarQ.com>

> On Mon, 04 Jan 1999 10:53:07 -0800, Xah Lee <xah@web-central.net> wrote:
>   > Can someone explain that why $0 returns the program name with ".//"
>   > prefixed?

In article <76t2hm$hjf$1@aurwww.aur.alcatel.com> , klassa@aur.alcatel.com
(John Klassa) wrote:
> It depends on how you call it...  For example:
>
>  % ./foo
>  --./foo--
>
>  % foo
>  --/homes/klassa/bin/foo--

And by experimentation, I found this sensitivity fantastically reflexive:

[shell13.ba.best.com xah /users/u1/xah 517]$tempPerl_dir/script_name.pl
--tempPerl_dir/script_name.pl--
[shell13.ba.best.com xah /users/u1/xah 518]$./tempPerl_dir/script_name.pl
--./tempPerl_dir/script_name.pl--
[shell13.ba.best.com xah /users/u1/xah 519]$.//tempPerl_dir/script_name.pl
--.//tempPerl_dir/script_name.pl--
[shell13.ba.best.com xah /users/u1/xah 520]$.///tempPerl_dir/script_name.pl
--.///tempPerl_dir/script_name.pl--


Xah Lee's sig quote contained:
> GNU: helping the moronic unix community move forward.

John Klassa responded:
> For somebody who continues to come to a fairly Unix-oriented newsgroup for
> help, your continued Unix-bashing is rather quizzical.

Linux users take note: think twice before you attach your brazen pro-linux
sig; you might get whacked by your Solaris or you-know-what-x brethren.
(after all, if GNU's Not Unix, then what is Linux? wah ha ha.)

--

and byyyyy the waaayy, in accordance with the canon of perl mongers' tao of
newsgroup netiquette, here's the mandatory, nonsensical, and off-topic part
relished by all: did you know the etymology of the Apache webserver?

Answer: patch, patch, patch, patch, patch and we have "a-pache".

Xah
xah@best.com
http://www.best.com/~xah/PageTwo_dir/more.html
"Unix: the world's most impressive shit pile."


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

Date: 7 Jan 1999 19:42:03 GMT
From: Dominique Dumont <domi@barrayar.grenoble.hp.com>
Subject: [ANNOUNCE] new module Puppet::LogBody
Message-Id: <7732mb$6go$1@play.inetarena.com>


Hello

The Puppet::LogBody results from a split of the Tk part and the functional
part of Puppet::Log.

Here's the readme file from this new module:

This class implements a log facility which can either print on STDOUT
or warn on STDERR (or hide) the log message. But in any case, the log
message will be stored in the class so that all log messages can be
retrieved later by the user.

Suggested DSLI entry :
Puppet::
  LogBody          bdpO  Logging facility                    DDUMONT

Note:

This class does *not* use Tk. If you want a Tk based log facility, you
can use Puppet::Log instead, they have the same interface.

About Puppet body classes

Puppet classes are a set of utility classes which can be used by any object.
If you use directly the Puppet::*Body class, you get the plain functionnality.
And if you use the Puppet::* class, you can get the same functionnality and
a Tk Gui to manage it. 

Cheers


-- 
Dominique_Dumont@grenoble.hp.com




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

Date: 7 Jan 1999 19:42:11 GMT
From: Dominique Dumont <domi@barrayar.grenoble.hp.com>
Subject: [ANNOUNCE] New version of Tk::Multi
Message-Id: <7732mj$6gp$1@play.inetarena.com>


Hello

Happy new year to everyone. 

Here's the newest version of the Tk::Multi set of widgets. This version now
features a new Tk::Multi::Toplevel which does most of the work to create a 
new Multi widget in its toplevel window.

Here's the README file:

Tk_Multi is a set of Tk composite widget to allow you to manage
several scrolled Text or Canvas (or your own Multi widget) widgets in
your Toplevel window. 

The manager allows you to hide or show any managed text window through
a menu.

Tk::Multi::* widgets uses Adjuster to increase, decrease the window
size, and a menu to print its content.

Suggested DSLI entry for the Ptk module list:

Multi::
  Manager     bdpO  Manages the Multi widget in a Multi frame  DDUMONT 
  Toplevel    bdpO  Multi manager in a Toplevel widget         DDUMONT 
  Canvas      bdpO  A Canvas in the Multi frame                DDUMONT 
  Text        bdpO  A  text wirdget in the Multi frame         DDUMONT 

This module was written with perl5.00502 and now works fine with
Tk800.012.

See the embedded documentation in the module for more details.

Comments and suggestions are always welcome.

Note that this module is in beta state. Its interface may still change
(but I don't think so)

I'd like people who actually use this module for their application to
drop me a short note about what they're using this module for.

Many thanks to Larry W. Virden, Achim Bohnet for all the tests, patches
(and reports) they made. Many bugs were fixed and improvements were 
included thanks to their efforts.


TO DO (well, bugs...): 
----------------------

- There's some kind of geometry or size conflict between the Adjuster,
the frames that are created by the Multi::Manager and the user who
tries to resize the window. Hopefully, I'll find a way to sort this
out, but I'd appreciate some help on this.

- The Adjuster does not follow closely the mouse pointer. This is an
Adjuster bug. I can't do much about it.

- The print pop-up menu should be replaced by a modified version of
Albert W. Dorrington's  PrintDialog. 


Legal mumbo jumbo:
------------------

 Copyright (c) 1997-1999 Dominique Dumont. All rights reserved.
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.


Cheers

-- 
Dominique_Dumont@grenoble.hp.com




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

Date: 7 Jan 1999 19:41:51 GMT
From: Dominique Dumont <domi@barrayar.grenoble.hp.com>
Subject: [ANNOUNCE] new versions of Puppet::Log module
Message-Id: <7732lv$6gg$1@play.inetarena.com>


Hello

Starting from this version, Puppet::Log was splitted between a "core" 
functionnality (in Puppet::LogBody), the Tk part (in Tk::Multi::Toplevel) 
and the glue (this class). Version 1.010 is compatible with previous versions.

Here's the README file of the new version of Puppet::Log:

This class implements a log facility with an optional Tk display. 

I.e once the class is created, you can log messages in it, but the Tk
display does no need to be created at the same time. You may invoke
later only when you need it.

When the Tk display is not invoked, the log can be either printed on
STDOUT or warned on STDERR (or stay hidden). But in any case, the log
message will be stored in the class so that all log messages can be
retrieved later by the user or by the Tk display when invoked.

Once the Tk display is invoked, it will be updated by new logs.

Suggested DSLI entry in the Tk Module list, section 'Modules using Tk':
Puppet::
Log            bdpO  Logging facility based on Tk                  DDUMONT

About Puppet::* classes

Puppet classes are a set of utility classes which can be used by any object.
If you use directly the Puppet::*Body class, you get the plain functionnality.
And if you use the Puppet::* class, you can get the same functionnality and
a Tk Gui to manage it. 


Cheers

-- 
Dominique_Dumont@grenoble.hp.com




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

Date: 7 Jan 1999 19:41:08 GMT
From: Jochen Wiedmann <joe@ispsoft.de>
Subject: Announce: Apache::Roaming-0.1000
Message-Id: <7732kk$6dm$1@play.inetarena.com>


Hi,

I'd like to announce Apache::Roaming, a PUT/GET/MOVE/DELETE handler
designed for making Apache a server for Netscape roaming profiles,
as supported by Netscape Communicator 4.5.

The source is based on Vincent Partington's (vincentp@xs4all.nl)
mod_roaming, an Apache module for the same purpose. The main
advantage of Apache::Roaming is that it is subclassable. For example
the first release includes a package Apache::Roaming::LiPrefs, that
can create, parse and modify the liprefs files users are loading
down. So you can fix the users proxy settings, for example.
The main disadvantages, compared to mod_roaming are obvious:
Mod_perl is required and it is slower. See

  http://www.xs4all.nl/~vincentp/software/mod_roaming.html

for details on mod_roaming. Apache::Roaming is available from any
CPAN mirror, in particular

  ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/Apache


Bye,

Jochen


-- 
Jochen Wiedmann						joe@ispsoft.de
XMas is like M$: You're wasting a lot of time for	+49 7123 14887
and are doing funny things you've never expected to do.
The difference is January ...




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

Date: 7 Jan 1999 19:42:28 GMT
From: Sami Itkonen <si@iki.fi>
Subject: ANNOUNCE: HTML::Validator
Message-Id: <7732n4$6gq$1@play.inetarena.com>


  DESCRIPTION

HTML::Validator is a module that checks the validity of HTML (or SGML)
files. For this is uses nsgmls and document type definition (aka dtd) files.
LWP is used to validate files obtained from the web.

A sample validator script is provided with the module.


  REQUIREMENTS

The needed non-perl files are:

 - nsgmls (see <URL:http://www.jclark.com/sp/howtoget.htm>)

 - dtd files (not included). I use W3C's SGML library, which can be downloaded
   from <URL:http://validator.w3c.org/sgml-lib.tar.gz>


  HOME PAGE

The home page is located at <URL:http://www.iki.fi/si/HTML-Validator>,
which contains up-to-date information.


  DOWNLOADING

The module itself can be downloaded from CPAN
<URL:http://www.perl.com/CPAN/authors/id/S/SA/SAIT/HTML-Validator-0.04.tar.gz>
or from the home page
<URL:http://www.iki.fi/si/HTML-Validator/HTML-Validator-0.04.tar.gz>

-- 
 Email: si@iki.fi, WWW: <URL:http://www.iki.fi/si/>




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

Date: 7 Jan 1999 19:43:05 GMT
From: antro@my-dejanews.com
Subject: Announce: PDF-1.08
Message-Id: <7732o9$6h2$1@play.inetarena.com>

New Release: 1.08

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
PDF            bdpO  Access information in a PDF file             ANTRO

The PDF library is a proposed library for access the information
contained inside a PDF file. PDF stands for Portable Document Format and is
a standard proposed by Adobe ( See http://www.adobe.com/ for more details ) .

Install "as usual" with:

        perl Makefile.PL
        make
        make install

Then, you can try the scripts in the example directory that tests
if a file is a PDF ( not looking at the .pdf extension :-), the PDF
version used to write them, their number of pages and the various
Info ( Author, Creation date, etc. ).

PREREQUISITES:

A Perl distribution :-)

NEWS:

Added support for the iso latin1 chars in the Getinfo ( Thanks to Thomas
Drillich for the patch )

For the people that have trouble with the "standard" install procedure under
wintel platform,
now is available a quick and dirty install.bat in the main directory

AVAILABILITY:

The library is available at

<http://www.geocities.com/CapeCanaveral/Hangar/4794/>

and at all CPAN mirror

Enjoy

Antonio "Antro" Rosella

<anface@yahoo.com>
<anface@geocities.com>
<antro@technologist.com>


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

Date: Thu, 7 Jan 1999 11:07:56 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Arrays from File Handles Problem
Message-Id: <MPG.10fea5e674b4ca7d9898f9@nntp.hpl.hp.com>

In article <3694F9FD.918A304B@ispn.com> on Thu, 07 Jan 1999 12:16:29 -
0600, Eric Estabrooks <estabroo@ispn.com> says...
 ... 
> try
> 
> if (($file[1] ne '\n') && ($file[1] ne '\r\n')) then
>   print "exists\n";
> }

Those had better be double-quotes for this to have a chance!

> or chomp the line before you if check for blank

That is far better advice.

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


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

Date: Thu, 7 Jan 1999 13:52:53 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Case Modification
Message-Id: <MPG.10fecc8d6f591ff9989779@news.scescape.net>

In article <3694FD5F.8A789676@xsite.net>, andy@xsite.net pounded in the 
following:
=> Pardon me if this is too obvious...

I think it's in the FAQ, and I know it's archived at DejaNews.

=> How can I go about taking a string (for example):
=> 
=> "THIS IS A TEST"
=> 
=> and modifying it so that only the first letter of each word is
=> capitalized? Any help would be appreciated.

This does, of course, depend on your definition of 'word'.  If we use 
Perl's definition, the regex

     s/(\w+)/\L\u$1/g;

will do the job.  Of Course, Text Like This Is Usually Much Harder To 
Read Than text capitalized like this.

If you want the above snippet to work with locale specific characters, 
you'll need to add

     use locale;

to the top of your script.

Hope This Help(s|ed)!

=> Andy B

--Matthew


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

Date: Thu, 07 Jan 1999 20:18:19 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Case Modification
Message-Id: <3695087B.D263AAAE@ngb.se>

Hi!

> How can I go about taking a string (for example):
> 
> "THIS IS A TEST"

$test = "THIS IS A TEST"
$test =~ s/\B(\w+)/\L$1\E/g;
print $test

should yield

This Is A Test

Maybe not the most efficient, but it should work.
if the string is lowercase, do

$test =~ s/\b(\w)/\u$1/g;

Staffan


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

Date: Thu, 07 Jan 1999 14:35:40 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Case Modification
Message-Id: <comdog-ya02408000R0701991435400001@news.panix.com>

In article <MPG.10fecc8d6f591ff9989779@news.scescape.net>, dragons@scescape.net (Matthew Bafford) posted:

> In article <3694FD5F.8A789676@xsite.net>, andy@xsite.net pounded in the 
> following:

> => How can I go about taking a string (for example):
> => 
> => "THIS IS A TEST"
> => 
> => and modifying it so that only the first letter of each word is
> => capitalized? Any help would be appreciated.
> 
> This does, of course, depend on your definition of 'word'.  If we use 
> Perl's definition, the regex
> 
>      s/(\w+)/\L\u$1/g;
> 
> will do the job. 

perlfaq4 points out a situation in which this approach won't work,
and there are probably others.  the trick is recognizing the 
beginning of a word which isn't so simple.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Thu, 07 Jan 1999 20:02:18 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Extended version of "hex"
Message-Id: <369504BA.19E73E92@ngb.se>

> For example, I want to obtain the decimal value of
> "0xFFF1FFF2FFF3FFF4".
> I don't want obtain a result like "1,2345678912453e19"

Primitive solution: Write a lhex subroutine, that does something like
this

## lhex subroutine -- for loooooooooooong hex's
sub lhex {
    my $in = shift;
    my $out;
## Remove 0x
    $in = substr($in, 2);  
## Now take the first bit to be read; after this length($in) % 8 = 0
    $out = hex( "0x" + substr($in, 0, length($in) % 8) );
## Now iterate and add the rest. This is a primitive version of Horners
## scheme, I think (x=2^32).
    while($in){
## 4294967296 is 2^32, i.e. 0xFFFFFFFF.
	$out = $out * 4294967296 + 
           hex( "0x" + substr($in, 0, 8) )
	$in = substr( $in, 8 )
    }
    return $out;
}

This should work (though I haven't tried it). I dont know what the
ordinary perl limit is on ints, so maybe you have to use some module for
larger integers. The number 0xFFF1FFF2FFF3FFF4 is around 2^64, i.e.
10^22, and I don't know what perls limit is. Check CPAN.

Staffan


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

Date: Thu, 07 Jan 1999 14:04:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: How do I split this...?
Message-Id: <comdog-ya02408000R0701991404220001@news.panix.com>

In article <772s6s$d6a$1@news.monad.net>, rocky@blues.jpj.net (Rocky) posted:

> blocka|blockb|blockc can be long

>   while (<FILE>) {
>     chop;
>     ($foo, $bar, @baz) = split /\|/;
> 
> blocka and blockb always will be one word, while blockc's data will be
> usually 3 to 5 words, separated by a space. I need the stuff in blockc
> to be put into array @services, separated by commas, just as if I had
> done this:
> 
> @baz=(firstthing,secondthing,thirdthing);

first split on the | character:

   ($blocka, $blockb, $blockc) = split /\|/;

then split block c as necessary:

   @services= split /\s+/, $blockc;

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Thu, 07 Jan 1999 14:02:24 -0500
From: Kerry Allsup <kerry.allsup@bridge.bellsouth.com>
Subject: Re: HP-UX Install problem
Message-Id: <369504C0.E8EA3C50@bridge.bellsouth.com>



"J. T. Greenaway" wrote:
<snip>
> ./perl.h: 1259: too much defining - use -H option
<snip>


This is a common HPUX 9.04 problem.  Do man cpp, look for the -H option.

HTH, 
Kerry


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

Date: 7 Jan 1999 19:02:33 GMT
From: dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
Subject: Re: If Larry Wall's listening out there....
Message-Id: <slrn79a169.8dn.dformosa@godzilla.zeta.org.au>

In article <772kb4$go3$1@brokaw.wa.com>, Elf Sternberg wrote:
>In article <76urmk$ncd$1@news.akl.netlink.net.nz> 
>    "Andrew Mayo" <andrew@geac.co.nz> writes:
>

>>A further, related issue is that arguments appear to be passed by
>>reference,
>
>	Um, no.  Arguments are pass-by-value unless wery serious care
>is taken to do otherwise.

I dont think your right here.

#!/usr/bin/perl

print $i,"\n";

&inc ($i);

print $i,"\n";

sub inc {
  $_[0]++;
}

Prints a blank line and 1.



-- 
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html



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

Date: Thu, 07 Jan 1999 14:36:00 -0500
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: Improve speed of a perl-script ... and efficiency info.
Message-Id: <dwilgaREMOVE-0701991436000001@wilga.mtholyoke.edu>


Personally, I've found that once the size of a string being pattern
matched exceeds about 1000 bytes, the time required to do the matches
starts to go WAY up. Using DProf, I found that the time increases
considerably for each character added after that magic number.

So if you're doing something where you are searching or matching on large
strings, see if there is some way you can split them up a bit.

> > Marcel Beekmans  writes:
> >
> >   MB> I'm building an application for the web. It is a very big
> >   MB> appliction, it is about 10,000 code-lines. The speed of the
> >   MB> appliction is really bad.  What can I do?  (It is not impossible
> >   MB> to cut the file into 2 or more separate files).
> >
> >
> >

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: Thu, 7 Jan 1999 20:15:02 +0100
From: "robin" <vdweiden@casema.net>
Subject: messageboard
Message-Id: <77314f$9sb$1@news.casema.net>

hello,

I was wondering somebody can tell me how to create a simple messageboard.
I mean just a normal page with links thats\ link to that message
and buttons
-post new message
-reply

is that a hard thing?

thanks

robin




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

Date: Thu, 07 Jan 1999 18:48:22 GMT
From: steamy@my-dejanews.com
Subject: Perl Programmer Needed
Message-Id: <772vhl$8va$1@nnrp1.dejanews.com>

I have a small internet business and I am attempting to use the freeware
Perlshop (www.arpanet.com/PerlShop/PerlShop.html) as my shopping card
software.  I like it for its broad flexibility and theoretical ease of use. 
I've done a good deal of the work in setting it up - debugged the program,
set up appropriate HTML pages, etc. - but I am having trouble getting the
HTML and the perl/cgi to work together.  Rather than bang my head against
this wall, I am looking for someone to hire who can finish getting this
program up and running. If you are interested, please contact me at the above
e-mail address or steamy@steamyrte.com. Thanks, Stephanie Delaney Steamy
Romance and Tea Emporium www.steamyrte.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 7 Jan 1999 18:53:17 -0000
From: "Artoo" <r2-d2@REMOVEbigfoot.com>
Subject: Permission probs
Message-Id: <772vtp$k72$1@plug.news.pipex.net>

Hi all

I have a problem with permissions, the CGI scripts I've written will only
create a directory with-in a directory with chmod 0777 and will also only
create files with-in a directory with chmod 0777.  It all works if asked to
create a directory or file within a DIR with chmod 0777, but not otherwise.

Do any of you know if it is possible to do either of the following:
1. let perl create a mapping file/dir, so that a directory will be called
from another location when asked for but appear as if it was in the location
asked for.

2. Set a user or group within the script so that the dir doesnt have to be
777 but can be 775 or 755 as it knows it is user x or part of group x?

Thanks for any help
Artoo




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

Date: Thu, 07 Jan 1999 20:11:59 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Q on search & replace in larger strings
Message-Id: <369506FF.19C5E32E@ngb.se>

For you both: Add a 'g' after the s///, as i assume your not matching
each key only once??? And why the 'i'? What does this really do?

Staffan


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

Date: Thu, 7 Jan 1999 11:17:07 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Randal's code [was Re: How do I delete tmp files based on age?]
Message-Id: <MPG.10fea811cd0480bc9898fa@nntp.hpl.hp.com>

In article <m1n23vxfzl.fsf@halfdome.holdit.com> on 07 Jan 1999 07:25:02 
-0800, Randal L. Schwartz <merlyn@stonehenge.com> says...
 ...
>     unlink grep -A > $hold_time, map "$dirname/$_", readdir DIR;

Wouldn't the following be more perspicuous (and perhaps trivially 
faster):

      unlink grep -A "$dirname/$_" > $hold_time, readdir DIR;

One might also avoid trying to unlink included directories:

      unlink grep -f "$dirname/$_" && -A _ > $hold_time, readdir DIR;

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


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

Date: 07 Jan 1999 11:47:05 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Randal's code [was Re: How do I delete tmp files based on age?]
Message-Id: <m1iueivpae.fsf@halfdome.holdit.com>

>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:

Larry> Wouldn't the following be more perspicuous (and perhaps trivially 
Larry> faster):

Larry>       unlink grep -A "$dirname/$_" > $hold_time, readdir DIR;

Faster in that it'd be deleting files in the current directory instead
of in $dirname? <grin> No, you just changed functionality there, and
you broke it.

Larry> One might also avoid trying to unlink included directories:

Larry>       unlink grep -f "$dirname/$_" && -A _ > $hold_time, readdir DIR;

Ditto.  You need to give a usable pathname to unlink, and you broke
it.

If you don't see from the example, readdir returns FOO, -A is testing
"that_dir/FOO" (correct), but now you're trying to unlink "FOO" again
(wrong).

print "Just another 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: 7 Jan 1999 19:50:44 GMT
From: lcoates@bu.edu (Laran Coates)
Subject: Use of flags?
Message-Id: <77336k$gjp$1@news1.bu.edu>

Does anyone have any advice on the use of flags to handle while loops etc.?
Things like certain common pitfalls or mistakes in the use of flags would be
much appreciated and very helpful.  

Thanks to all for your help.

Laran Coates
lcoates@bu.edu


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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