[10112] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3705 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 13 20:07:14 1998

Date: Sun, 13 Sep 98 17:00:18 -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           Sun, 13 Sep 1998     Volume: 8 Number: 3705

Today's topics:
    Re: ANN: Backwards.pm <uri@sysarch.com>
        expression in a variable problem (Margaret Robbins)
    Re: expression in a variable problem (Sean McAfee)
        grep difficulties <jhunter@igg-tx.net>
    Re: grep difficulties <J.D.Gilbey@qmw.ac.uk>
        Help with file test operators (Brian Springstead)
    Re: Help with file test operators (Sean McAfee)
    Re: Help with file test operators <vincent@compclass.com>
        Is it better to use one big script that can do 5 tasks  (Serial # 0)
    Re: Is it better to use one big script that can do 5 ta <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Perl gurus opinion needed. <162@southgaylord.com>
        Perl, Tk, GTK, and Graphix in General <eddthompson@ssi.parlorcity.com>
        Problems with File::Path <apollock11@hotmail.com>
        Question about the URI::URL module <niting@raleigh.ibm.com>
    Re: QUESTIONS (was: Perl Programmer Needed) <vincent@compclass.com>
    Re: read a file through HTTP <jason.holland@dial.pipex.com>
    Re: Search textfile? <mattias@mjolby.nu>
    Re: Search textfile? <rick.delaney@shaw.wave.ca>
    Re: Seeking Perl program to transfer files between mach (Jasmin F. Patry)
    Re: Suidperl is obstructed, but by what? <joreb@algonet.se>
        Using File::Find under -T switch <joreb@algonet.se>
    Re: Very slow cgi-bin execution <uri@sysarch.com>
    Re: warning: accept failed (Protocol error) <eashton@bbnplanet.com>
        what good is flock $LOCK_NB? <szhou@marlin.utmb.edu>
        Who posts original posts on CLPM? (Asher)
    Re: Who posts original posts on CLPM? (Ronald J Kimball)
    Re: Win32::Console For Password Entry (Andrew M. Langmead)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 13 Sep 1998 14:03:55 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: ANN: Backwards.pm
Message-Id: <x73e9vzy7o.fsf@sysarch.com>

>>>>> "MD" == Mark-Jason Dominus <mjd@op.net> writes:

  MD> In article <35fbaaa2.3365144@news.btinternet.com>, Jonathan Stowe
  MD> <Gellyfish@btinternet.com> wrote:
  >> And I just thought MJD's proposal was a joke ;-}

  MD> Nope.

  MD> When I propose Sideways.pm, that's a joke.

well, Backwards.pm is no joke but my code can occassionally be funny :-)

now that i published it, will you who asked for it test it and help me
CPAN it? i have never submitted to CPAN and i need to know what high
standards of code quality, documentation and API it needs to pass
muster? :-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Sun, 13 Sep 1998 20:27:38 GMT
From: margaretrobbins@compuserve.com (Margaret Robbins)
Subject: expression in a variable problem
Message-Id: <#jEw5T139GA.272@ntdwwaaw.compuserve.com>


Hi.
I'm trying to do a search on a list, based on user-input search
strings. So I take their input and build a simple expression in
a string, but when I use it as an expression, it fails. In other
words, when $line contains both "test1" and "test2",

if ($line =~ /test1|test2/)
{
	print(STDERR "match\n");
}
 
matches, but 

$pat = "/test1|test2/";
if ($line =~ $pat)
{
	print(STDERR "match\n");
}

never does. 

I've scoured faqs, camel book, and sample code, and upgraded from
version 5.001 to 5.003 (Win95). Doubtless something silly; I'm a C
programmer who's been doing Perl for less than a week. Any tips would
be most appreciated.

Margaret in Schneverdingen



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

Date: Sun, 13 Sep 1998 20:53:10 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: expression in a variable problem
Message-Id: <WgWK1.2541$F7.10883615@news.itd.umich.edu>

In article <#jEw5T139GA.272@ntdwwaaw.compuserve.com>,
Margaret Robbins <margaretrobbins@compuserve.com > wrote:
>I'm trying to do a search on a list, based on user-input search
>strings. So I take their input and build a simple expression in
>a string, but when I use it as an expression, it fails. In other
>words, when $line contains both "test1" and "test2",

>if ($line =~ /test1|test2/)
>{
>	print(STDERR "match\n");
>}
 
>matches, but 

>$pat = "/test1|test2/";
>if ($line =~ $pat)
>{
>	print(STDERR "match\n");
>}

>never does. 

What you want to do is this:

$pat = "test1|test2";
if ($line =~ /$pat/) { ... }

>I've scoured faqs, camel book, and sample code, and upgraded from
>version 5.001 to 5.003 (Win95). Doubtless something silly; I'm a C
>programmer who's been doing Perl for less than a week. Any tips would
>be most appreciated.

The relevant documentation is in the perlop manpage.

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: Sun, 13 Sep 1998 15:36:39 -0500
From: Jeff Hunter <jhunter@igg-tx.net>
Subject: grep difficulties
Message-Id: <35FC2CD7.B9FD6C5@igg-tx.net>

Can someone explain why this doesn't work:

#!/usr/bin/perl

$host=`uname -n`;
$uic=`grep "$host" /path/to/somefile.txt`;
print "$uic \n";


I get the host variable, but the the grep doesn't work. Something to do
with variables
not being exported to the shell? I tried single and no quotes around
$host, no joy. I read the FAQ and two O'Reilly books on perl, nothing
that clearly addresses grep with a variable found.
How can I make this work?


Jeff


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

Date: Sun, 13 Sep 1998 22:41:56 +0100
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>
Subject: Re: grep difficulties
Message-Id: <35FC3C24.6D59223D@qmw.ac.uk>

Jeff Hunter wrote:
> 
> Can someone explain why this doesn't work:
> 
> #!/usr/bin/perl
> 
> $host=`uname -n`;
> $uic=`grep "$host" /path/to/somefile.txt`;
> print "$uic \n";
> 
> I get the host variable, but the the grep doesn't work. Something to do
> with variables
> not being exported to the shell? I tried single and no quotes around
> $host, no joy. I read the FAQ and two O'Reilly books on perl, nothing
> that clearly addresses grep with a variable found.
> How can I make this work?

How about adding the command
  chomp $host;
after the first line?  This will remove the trailing newline returned
by the `uname -n` and should allow the grep to function correctly.

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

            Julian Gilbey             Email: J.D.Gilbey@qmw.ac.uk
       Dept of Mathematical Sciences, Queen Mary & Westfield College,
                  Mile End Road, London E1 4NS, ENGLAND
      -*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-


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

Date: 13 Sep 1998 19:02:11 GMT
From: bspring@j51.com (Brian Springstead)
Subject: Help with file test operators
Message-Id: <slrn6vo6el.66u.bspring@j51.com>

Can someone tell me why when I run this script I get:
The file exists
The file is zero length

Shouldn't it be NOT zero length?!?!  Would you be so kind as
to tell what I am doing wrong and how I can fix it?  
Thanks in advance.

#!/usr/bin/perl

$fileout = "foo";

open(OUT,">$fileout") || die;

print OUT "This file is now not empty\n";

stat($fileout);
print "The file exists\n" if -e _;
print "The file is zero length\n" if -z _;
print "The file is NOT zero length\n" if -s _;    


Brian
-- 
Brian Springstead | Remember no man is a failure who has friends.
     IAWL fan     | Thanks for the wings!
 bspring@j51.com  |                         Clarence



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

Date: Sun, 13 Sep 1998 19:22:56 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Help with file test operators
Message-Id: <kYUK1.2532$F7.10824566@news.itd.umich.edu>

In article <slrn6vo6el.66u.bspring@j51.com>,
Brian Springstead <bspring@j51.com> wrote:
>Can someone tell me why when I run this script I get:
>The file exists
>The file is zero length

>Shouldn't it be NOT zero length?!?!

One word:  buffering.

>Would you be so kind as
>to tell what I am doing wrong and how I can fix it?  

One word:  $|.

(OK, two more:  "man perlvar")

>$fileout = "foo";
>open(OUT,">$fileout") || die;
>print OUT "This file is now not empty\n";
>stat($fileout);
>print "The file exists\n" if -e _;
>print "The file is zero length\n" if -z _;
>print "The file is NOT zero length\n" if -s _;    

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: Sun, 13 Sep 1998 13:11:08 -0700
From: Vincent Lowe <vincent@compclass.com>
Subject: Re: Help with file test operators
Message-Id: <35FC26DC.CE67E624@compclass.com>

Brian Springstead wrote:
> 
> Can someone tell me why when I run this script I get:
> The file exists
> The file is zero length
> 
 ...at a glance, I'm guessing that it's a buffering problem.  You write
to the file, but no flush has taken place.  There are about three
ways (I can think of from horseback) you can fix this.

 1) you can close the file before you stat();
 2) you can select() the OUT filehandle and set $| to 1;
 3) you can use the FILE module to do the same thing in a more readable
    fashion.

> #!/usr/bin/perl
> 
> $fileout = "foo";
> 
> open(OUT,">$fileout") || die;
> 
> print OUT "This file is now not empty\n";
> 
 
 close OUT; # quickest fix without a use...

> stat($fileout);
> print "The file exists\n" if -e _;
> print "The file is zero length\n" if -z _;
> print "The file is NOT zero length\n" if -s _;
> 

-- 
| vincent@compclass.com    | "Birds rising in flight is a sign
|                          | that the enemy is lying in ambush..."
| 248.557.2754             |                                Sun Tzu
+--------------------------+-----------------------------------------
| Aqueduct Information Services     http://www.aquecorp.com/vincent


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

Date: Sun, 13 Sep 1998 18:52:39 GMT
From: Free-4-All@Cryogen.com (Serial # 0)
Subject: Is it better to use one big script that can do 5 tasks or 5 smaller scripts for each task?
Message-Id: <35fc08e5.579185@news.iaehv.nl>

Hello,

I'm making a script that does the following:

- let users choose their username when they sign up, their password
  will be sent by e-mail
- when users log in the script will check the username/password
  combination
- the script can let the user change their personal information
- if they forget their password the script can send it to them
- the script can also delete someone's account

I was thinking, if someone want to log in they will have to load this
huge script while they are only using a small part of it. Won't it be
better to make 5 little scripts for each of the task described
above???


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

Date: 13 Sep 1998 22:19:16 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Is it better to use one big script that can do 5 tasks or 5 smaller scripts for each task?
Message-Id: <83sohvepff.fsf@vcpc.univie.ac.at>

Re: Is it better to use one big script that can do 5 tasks
or 5 smaller scripts for each task?, Serial
<Free-4-All@Cryogen.com> said:

Serial> Hello, I'm making a script that does the following:

Serial> - let users choose their username when they sign up,
Serial> their password will be sent by e-mail - when users
Serial> log in the script will check the username/password
Serial> combination - the script can let the user change
Serial> their personal information - if they forget their
Serial> password the script can send it to them - the script
Serial> can also delete someone's account

Serial> I was thinking, if someone want to log in they will
Serial> have to load this huge script while they are only
Serial> using a small part of it. Won't it be better to make
Serial> 5 little scripts for each of the task described
Serial> above???

(In German the apposite answer here is "yein".)

This reply brought to you by the words "module", "reusable",
and "library".

You'll also need to be hugely careful about access
permissions, what different parts of the
authentication/sign-up etc. process need to be able to do.

You don't say in what kind of environment this is going to
run (e.g. telnet? WWW?), so it's difficult to say much more.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Sun, 13 Sep 1998 14:44:12 -0600
From: Box 162 <162@southgaylord.com>
Subject: Re: Perl gurus opinion needed.
Message-Id: <35FC2E8B.3F12CD80@southgaylord.com>





Doug Wheeler wrote:

> It seems (from some quick research) that all the "hacks" relating to being
> available for hire (cabs, horses, etc.) are derived from "hackney." All the
> forms relating to unskilled cutting (and other unskilled work) are from the
> word "hack." I would definitely put computer hacker (and hack writer) into
> the second category.

Not "hack writer."  A "Hack writer" was a freelancer (available for hire) as
opposed to one with a real writing job.  However, the happy (??) coincidence
of the dual meaning of "hack" worked quite well with the term "hack writer"
since a freelancer was often looked down on by the regular newspaper writers.
So saying "He just a hack." fit both meanings of "hack."  "For hire," and "to
chop or mangle."





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

Date: 13 Sep 1998 22:00:04 GMT
From: "Enki" <eddthompson@ssi.parlorcity.com>
Subject: Perl, Tk, GTK, and Graphix in General
Message-Id: <01bddf62$7211cc40$661e89ce@eddthomp>

I'm just starting to learn perl and I'm interested most with a gui to
some of the programs I'm writing and I heard that you could make 
calls to Tk or GTK.
How do yo do this or where can I find out how to do this right?
Are there any other methods availible?

For Your info I have some knowledge of Tcl and very little C
but couldn't stand C


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

Date: Sun, 13 Sep 1998 14:41:35 -0700
From: "Alvin Pollock" <apollock11@hotmail.com>
Subject: Problems with File::Path
Message-Id: <6thdp8$mha$1@agate.berkeley.edu>

I'm on Windows 95 and I'm having trouble creating directories using
File::Path.
The problem is not with File::Path specificallay but apparently with my test
to
check whether or not the directory exists. If the directory does not exist,
the program
works fine, but if it does exist I get an error (of course) from mkpath
which
tries to create it. I don't want to call mkpath if the directory exists but
my -e test
doesn't seem to work. Help! Can anybody see what I'm doing wrong? Here's the
code:

sub MakePath {
    print STDERR "$OUTPUTDIR\n";   # This is just so we know what we're
looking for.
    &mkpath ($OUTPUTDIR) unless -e $OUTPUTDIR;
}

And here is the error message:

c:\zip\files\warwick\039pt\
mkdir c:\zip\files\warwick\039pt\: File exists at
c:\sgml\ead2html\eadinit.pl line 271

Thanks for any helpful eyes that might figure this out.

Alvin Pollock
apollock11@hotmail.com








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

Date: Sun, 13 Sep 1998 15:30:23 -0700
From: "Nitin Gupta" <niting@raleigh.ibm.com>
Subject: Question about the URI::URL module
Message-Id: <6thgum$nfs$1@ausnews.austin.ibm.com>

I am trying to convert relative url's to absolute one's and am using the
URI::URL::abs() method for this. I have run into a wall trying to figure out
that why, when my base url does not have a trailing slash ('/'), all the
absolute referencing just goes haywire and works perfectly when I supply the
trailing slash!!

Let's say I have a page http://myserver.com/pages (note that this is a
directory and the server will automatically supply the default (index.html)
page) and this file has links to file_a.html and file_b.html

now because I have no trailing slash, the URI::URL::abs() method returns the
absolute links as:
http://myserver.com/file_a.html (it totally removed the 'pages' directory!)
http://myserver.com/file_b.html ( ----same as above---- )

 ....instead of returning:
http://myserver.com/pages/file_a.html
http://myserver.com/pages/file_b.html

 ...if my original base url was entered as http://myserver.com/pages/ (with
the trailing slash) then I get the correct results! Is this a bug in the
URI::URL module?

this is the code I am using:

$url1 = new URI::URL $receivedURL, $URL;
$expandedURL = $url1->abs($URL);

 ...where $URL is the base url and $receivedURL is pages/index.html (in the
above e.g.)

-Nitin




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

Date: Sun, 13 Sep 1998 12:56:05 -0700
From: Vincent Lowe <vincent@compclass.com>
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <35FC2355.2FF3FBE8@compclass.com>

Ronald J Kimball wrote:
> 
> That was hilarious!  Although it was rather frightening that several
> people responded apparently unaware that it was in jest.  Some people
> just don't understand satire.
> 
 ...actually the problem was that it's far too close to believable.  The
only clean giveaway was the identity of the author.

 Perhaps this is a perfect candidate (along with some of the more
comprehensive deconstructions) for a clpm style guide.

 ---v

-- 
| vincent@compclass.com    | "Birds rising in flight is a sign
|                          | that the enemy is lying in ambush..."
| 248.557.2754             |                                Sun Tzu
+--------------------------+-----------------------------------------
| Aqueduct Information Services     http://www.aquecorp.com/vincent


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

Date: Sun, 13 Sep 1998 18:12:17 +0000
From: Jason Holland <jason.holland@dial.pipex.com>
To: shane michael harwood <sharwood@cs.uiowa.edu>
Subject: Re: read a file through HTTP
Message-Id: <35FC0B01.E01516C1@dial.pipex.com>

shane michael harwood wrote:
> 
> is there a way for a CGI script to get the contents
> of a file that isn't on the same server as the cgi script
> 
> i want to do something like this.
> 
> $file= $FORM{'filename'};
> open(PIRFILE, $file);
> $contents = <PIRFILE>;
> close (PIRFILE);
> 
> with $file equal to something like http://cs.uiowa.edu/sample.pir


Hello,

Unless you don't have access to the other machine running the HTTPD
server, why not just use NFS or something similar to make the remote
file system accessible to the local machine?

Bye!

-- 
sub jasonHolland {
    my %hash = ( website =>
'http://dspace.dial.pipex.com/jason.holland/',
                 email   => 'jason.holland@dial.pipex.com' );
}


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

Date: Sun, 13 Sep 1998 18:42:29 +0200
From: "Mattias Kristoffersen" <mattias@mjolby.nu>
Subject: Re: Search textfile?
Message-Id: <6tgs0i$ill$1@zingo.tninet.se>


Rick Delaney skrev i meddelandet <35FBEC43.4A6DC632@shaw.wave.ca>...
>It might have helped if you posted the code that worked for the simple
>case.  Something as simple as changing one line of it would probably
>help.
>
>Here's one line that should work.  There are many others.
>
>perl -lane '$cnt++ if $F[0] eq 'text1';END{ print "$cnt\n" }'
>
>--
>Rick Delaney
>rick.delaney@shaw.wave.ca


Ok this is the
search function. Now i only want the first word on every line to be
searched.


if ($contents{'act'} eq "search") {
open (BOOK, "$databas") || do {&no_open;};
&header;
print <<"HTML";
<HR>
<strong>Svkresultat fvr "$contents{'keyword'}"</strong> <A
HREF="$bookurl">[ny svkning?]</A>
<HR>
<P>
HTML
$count=0;
@sorted = sort(<BOOK>);
foreach $pair (@sorted)
{

 if ($pair =~ /$contents{'keyword'}/gi)


     $count++;
     @hit[0] = split(/=/, $pair);
     print "E-postadressen $hit[0] finns redan.\n";
    }

}
if ($count==0)
  {
   print "Den dr ledig!";
  }
close(BOOK);
print <<"HTML";
<P><HR>
HTML
&footer;
exit;
}




/mattias




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

Date: Sun, 13 Sep 1998 17:15:19 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Search textfile?
Message-Id: <35FBFF28.B18E75AB@shaw.wave.ca>

[posted & mailed]

Mattias Kristoffersen wrote:
> 
> Rick Delaney skrev i meddelandet <35FBEC43.4A6DC632@shaw.wave.ca>...
> >Something as simple as changing one line of it would probably
> >help.
> 
> Ok this is the
> search function. Now i only want the first word on every line to be
> searched.
> 
 ...
> foreach $pair (@sorted)
> {
> 
>  if ($pair =~ /$contents{'keyword'}/gi)

See?  Try:
    if($pair =~ /^\s*$contents{'keyword'}\b/i) {# /g is unnecessary
# I put your missing curly back in

Read about the wonderful adventures of \b in perlre.

> 
>      $count++;
>      @hit[0] = split(/=/, $pair);

That looks a little odd.  Are you sure that's what you want?  Doesn't
the warning from -w bother you?

>      print "E-postadressen $hit[0] finns redan.\n";
>     }
> 
> }

If you just want the counts, you can replace this whole thing with

    $count = grep(/^\s*$contents{'keyword'}\b/i, @sorted);

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Sun, 13 Sep 1998 20:29:14 GMT
From: jfpatry@undergrad.math.uwaterloo.ca (Jasmin F. Patry)
Subject: Re: Seeking Perl program to transfer files between machines (sort of like TFTP)
Message-Id: <Ez8owq.Eu0@undergrad.math.uwaterloo.ca>

Jeremy Mathers <pynq@midway.uchicago.edu> wrote:
>I frequently have the need to transfer files between two Unix machines which
>are side by side - i.e., such that using FTP is too much bother. 
[...]
>However, and this is the point, in the spirit of "Don't reinvent the wheel",
>I'd like to know if there is already an off-the-shelf solution for this.

Quoted from http://src.doc.ic.ac.uk/packages/mirror/ :

    Mirror was designed to duplicate a directory hierarchy between two
    machines. It avoids copying files unnecessarily by comparing the file
    time-stamps and file sizes before transferring.   Mirror was writen by Lee
    McLoughlin <lmjm@icparc.ic.ac.uk>. 

    The latest version is Mirror 2.9 which will run on Un*x, Wind*ws 95 and
    Wind*ws NT.   Its sole requirement is Perl 4, or better still, Perl 5. 

I've used this quite successfully to transfer files between a staging and
production web server on a regular basis.  If your task requires duplicating
one or more directory hierarchies (or if you can reformulate the task such that
this description applies), then this may do the job for you.

HTH,
Jasmin Patry


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

Date: Sun, 13 Sep 1998 19:22:20 +0200
From: "Ekenberg" <joreb@algonet.se>
Subject: Re: Suidperl is obstructed, but by what?
Message-Id: <6tgv0l$jno$2@cubacola.tninet.se>


>> Suidperl is installed in the same directory as Perl itself, and made
>> executable.
>
>Shouldn't it be setuid root, as well?


Yes, and it is, the permissions are:
-rws--x--x

So that's not it.
Anybody got any suggestions?

/Johan Ekenberg







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

Date: Sun, 13 Sep 1998 19:20:32 +0200
From: "Ekenberg" <joreb@algonet.se>
Subject: Using File::Find under -T switch
Message-Id: <6tgv0k$jno$1@cubacola.tninet.se>

I'm running a script under the perl -T switch, and the script makes use of
the File::Find module.

This results in an error message:
"Insecure dependency in chdir while running with -T switch at
usr/lib/perl5/File/Find.pm line 109."

How can I get around this problem?
I really need to use the File::Find module...

All help appreciated!
/Johan Ekenberg




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

Date: 13 Sep 1998 14:15:19 -0400
From: Uri Guttman <uri@sysarch.com>
To: delouw@bigfoot.com
Subject: Re: Very slow cgi-bin execution
Message-Id: <x71zpfzxoo.fsf@sysarch.com>

>>>>> "AML" == Andrew M Langmead <aml@world.std.com> writes:

  AML> NOSPAMdelouw@bigfoot.com (Luc de Louw) writes:
  >> I'm wordering, that the execution of a small perl script is very
  >> slow.  Is it possible to speed up with some settings?

  AML> CPU/memory/IO upgrade
  AML> mod_perl
  AML> algorithm redesign
  AML> rewrite in something that can compile to machine language.

  AML> Of these solutions, the only one that could deal with perl may be
  AML> "algorithm redesign" one. Since you say it is a short script, why
  AML> not post it here and let a bunch of people take a look at it and
  AML> make suggestions.  -- Andrew Langmead

<PLUG>
there are other solutions including fast engines' fastserv product which
uses the fastcgi protocol to greatly speed up cgi applications. check
out http://www.fastserv.com. i do work for that company.
</PLUG>

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Sun, 13 Sep 1998 23:39:07 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: warning: accept failed (Protocol error)
Message-Id: <35FC553A.20DE6949@bbnplanet.com>

Jonathan Stowe wrote:
> >Hi guys ..
> >i am running a Netscape Fasttrack 2.01 server .. recently i am getting
> >this error :

Hi. This is a well known bug in Netscape Server. Please contact Netscape
Support or search on help.netscape.com for more information. There is no
fix other than to upgrade your server.

Enjoy.

e.


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

Date: Sun, 13 Sep 1998 17:26:21 -0500
From: "Mozilla/4.04" <szhou@marlin.utmb.edu>
Subject: what good is flock $LOCK_NB?
Message-Id: <35FC468D.30859AD@marlin.utmb.edu>

correct me if i'm wrong, but when you lock-nb a file handle, then
immediately use while($temp = <FILE>) to read the contents line-by-line,
is it possible for another process to write to the file at that time,
too? but of course this problem would be solved with lock-ex. but what
good is lock-nb?


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

Date: 13 Sep 1998 17:46:52 GMT
From: asher@magicnet.net (Asher)
Subject: Who posts original posts on CLPM?
Message-Id: <slrn6vo0rs.79e.asher@localhost.localdomain>

There has been some discussion of who posts questions to CLPM and 
who answers them.  Is there a correlation between a person's 
operating system and his posting behavior?

Check out:
http://www.magicnet.net/~asher/comp.lang.perl.misc.html
for the answer.


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

Date: Sun, 13 Sep 1998 16:06:19 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Who posts original posts on CLPM?
Message-Id: <1dfaxur.1hj0f6xjtx3a2N@bay1-432.quincy.ziplink.net>

Asher <asher@magicnet.net> wrote:

> Check out:
> http://www.magicnet.net/~asher/comp.lang.perl.misc.html
> for the answer.

I find it interesting that in the breakdown by newsreader, 9 followups
were posted with MacSOUP, and yet in the breakdown by operating system
only 2 followups were posted from a Macintosh.

I think your program needs some tweaking.  :-)

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 13 Sep 1998 16:16:41 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Win32::Console For Password Entry
Message-Id: <Ez8D7t.K98@world.std.com>

shawn_campbell@my-dejanews.com writes:

>I went to the archives for this solution.  It is exactly what I need.  One
>problem however; if the user
>enters a zero, the line-
>   $key = $Console->InputChar(1) || die "Error reading character";
>fails.  What if my user has a zero in their username or password?
>Note- I have tried every other character on the keyboard, and only the zero
>fails.


Try:

defined($key = $Console->InputChar(1)) || die "Error reading character\n";

In perl the number zero, the string "0", and the empty string are all
false, anything else is true. Since the string "0" is a valid return
value from InputChar(), checking whether it is true is probably not
appropriate.

(I'm assuming InputChar() returns undef if it fails, a perfectly
reasonable thing to do. I guess it could also return an empty string
instead. If it did, then test as length($key=Console->...))
-- 
Andrew Langmead


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

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

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