[9677] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3271 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 27 22:07:21 1998

Date: Mon, 27 Jul 98 19:00:21 -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, 27 Jul 1998     Volume: 8 Number: 3271

Today's topics:
        Breaking out of a block (David Cantrell)
    Re: Breaking out of a block (monty hindman)
    Re: file system operations on open files (Mark-Jason Dominus)
        Im Willing to pay or give a free DOMAIN for a custom cg <method98@iname.com>
        Loop Problem Juli@my-dejanews.com
        Newbie Q: Registry.pm <tdean@gte.net>
    Re: newbie string questions. (Martien Verbruggen)
    Re: Perl does not know how to build README file <matt@whiterabbit.co.uk>
    Re: Perl use in html documents <matt@whiterabbit.co.uk>
    Re: Perl use in html documents <ryanpc@lbin.com>
        Pid number of called process?? kreed@my-dejanews.com
        Premature end of script headers (chris)
    Re: Premature end of script headers (Kelly Hirano)
    Re: REQ: tpj ray tracer ".map" files (Mark-Jason Dominus)
    Re: Search Script? Please Help <matt@whiterabbit.co.uk>
    Re: seeing if a file exists. (Martien Verbruggen)
        SF,CA - JOB: Unix/Perl people (sysadmin/programming) fo (remove_this)
    Re: Simple (I hope) Apache/NT/Perl question (Craig Berry)
    Re: subs in separate files? <melinda@acm.org>
    Re: What a Crappy World <perth@flash.net>
    Re: Y2K problem in PERL with localtime() (Craig Berry)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 27 Jul 1998 15:50:18 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Breaking out of a block
Message-Id: <35bca0a3.341007112@thunder>

Subject: Breaking out of a block

If you look at the code below, I hope you can see what I'm _trying_
to do ... I want to break out of the block I've marked unless
chdir($i) succeeds.  And yes, I _do_ realise that the interpreter
doesn't like the 'break_out' ;-)

foreach $i (@files)
  { if(-d $i)
      { # Do some stuff                        <---
        break_out unless(chdir($i));           <---
        # Do some more stuff                   <---
      }
     else
      { # Do some different stuff
      }
  }

I've tried various mixtures of last, next, and even <SHUDDER> goto
without any luck, and really don't want to have to use ...

    if(-d $i)
      { # Do some stuff
        if(chdir($i))
          { # Do some more stuff
          }
      }

because it looks ugly ;-)  Does anyone have any suggestions?

--
Dave the Puzzled


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

Date: Tue, 28 Jul 1998 01:56:34 GMT
From: montyh@umich.edu (monty hindman)
Subject: Re: Breaking out of a block
Message-Id: <mdav1.5417$24.32178212@news.itd.umich.edu>

David Cantrell (NukeEmUp@ThePentagon.com) wrote:
: Subject: Breaking out of a block

: If you look at the code below, I hope you can see what I'm _trying_
: to do ... I want to break out of the block I've marked unless
: chdir($i) succeeds.  And yes, I _do_ realise that the interpreter
: doesn't like the 'break_out' ;-)

: foreach $i (@files)
:   { if(-d $i)
:       { # Do some stuff                        <---
:         break_out unless(chdir($i));           <---
:         # Do some more stuff                   <---
:       }
:      else
:       { # Do some different stuff
:       }
:   }

: I've tried various mixtures of last, next, and even <SHUDDER> goto
: without any luck, and really don't want to have to use ...

:     if(-d $i)
:       { # Do some stuff
:         if(chdir($i))
:           { # Do some more stuff
:           }
:       }

: because it looks ugly ;-)  Does anyone have any suggestions?

: --
: Dave the Puzzled

--

I'm pretty new to Perl so forgive me if this is off base, but it seems
like what I've just been working on might be what you need:

BLOCK:{
    $x = 1 ;  #do some stuff
    last BLOCK if $x == 1 ; #break out here
    $x = 2 ;  #do some more stuff
}
print "$x\n" ; #prints "1", so it worked

-- Monty


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

Date: 27 Jul 1998 20:15:37 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: file system operations on open files
Message-Id: <6pj579$2sm$1@monet.op.net>
Keywords: chute escrow fowl officious


In article <6pit0b$k4p$1@nnrp1.dejanews.com>,
 <benglazer@my-dejanews.com> wrote:
>until ( open(PASSWD, "+</etc/passwd") && flock(PASSWD, $LOCK_EX) ) {
>  close(PASSWD);

Bad move.  Closing the filehandle releases the lock.  I'm not sure
exactly what you're trying to accomplish here, but whatever it is,
you're not accomplishing it.

>Unfortunately, the chmod, link, and unlinks at the end seem a little sketchy
>to me, since they seem to be doing some fundamental file system stuff to
>files whose handles are still open.  

It's fine.  It's perfectly OK to link, unlink, rename, or chmod a file
that is open.  On Unix systems, filenames and files are quite
separate, and the system won't get confused.  A frequently asked Unix
question is `how can I find out the name of an open file', and the
answer is that you can't, because once the file is open the system
doesn't care what the name is any more.

Not to say that all this means that the code you showed actually
works, because it doesn't.  As I pointed out above, you lost the lock
anyway, and this:

>unlink "/etc/passwd";
>link "/etc/.passwd$$", "/etc/passwd";

leaves a window during which there's no password file, which is an
incredibly huge disaster.  Even discounting transient errors and
security problems, your program might get swapped out to disk in
between these two lines, or it might receive a fatal signal, or your
computer might crask, and any of those things could leave you without
a password file for an extended period.  The `rename' call was
invented for exactly this purpose; use it.

Finally, most programs that operate on the password file do not use or
respect `flock'-style locking; `vipw', for example, will disregard
your locks even if you had done them correctly.  Instead, these
programs look for the presence of /etc/ptmp to determine whether or
not the file is locked.

Try it this way:

	until (sysopen PTMP, "/etc/ptmp", O_CREAT | O_EXCL | O_RDWR, 0644) {
	  sleep 1;
	  die "Couldn't lock /etc/passwd; aborting" if ++$tries > 5;
	}

	# Operate on /etc/ptmp as much as you want

	close PTMP;
	unless (rename "/etc/ptmp", "/etc/passwd") {
	  warn "Couldn't update /etc/passwd from /etc/ptmp; backing out.\n";
	  unlink "/etc/ptmp" or warn "Couldn't unlink /etc/ptmp: $!!";
	  exit 1;
	}

> In addition, it seems a bit odd that PASSWD is never unflocked.

Filehandles are unlocked automatically when they're closed, and
they're closed automatically at the end of your program.  Usually when
you do flock-style locking, it's good practice to unlock them by
closing the filehandles, rather than by explicitly using LOCK_UN.



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

Date: Tue, 28 Jul 1998 10:38:00 +1000
From: "method98" <method98@iname.com>
Subject: Im Willing to pay or give a free DOMAIN for a custom cgi!
Message-Id: <6pj6hr$cle$1@reader1.reader.news.ozemail.net>

Can Anyone Make a Hidden Cgi that clicks on sponser
undectably to the user viewing the web page and the sponsers
itself... I am willing to pay Webmasters or Hosters $400 USD with my
credit card, or buy a DOMAIN to anyone how can make this cgi-script
and the DOMAIN is for 1 year.

IT MUST BE 110% UNDECTABLE TO THE SPONSERS AND THE USERS!!!

if you can make this, email a.s.a.p

method98@iname.com


Regards







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

Date: Mon, 27 Jul 1998 23:57:36 GMT
From: Juli@my-dejanews.com
Subject: Loop Problem
Message-Id: <6pj45h$u47$1@nnrp1.dejanews.com>

while (defined ($line = <SAM>) ) {
# if cusip matches write line to file
   if ($line =~ /$cusip/) {
	    push (@file, $line);
	    $found = 1;
   }
# else match all the variables, write line(s) to file
   else {
   	foreach $nameitem (@name){
	 foreach $familyitem (@family){

		  if (($line =~ /$nameitem/) &&
  	    	     ($line =~ /$familyitem/)) {

		  push (@file, $line);		  $found = 1;  }  }  }	}  }
What I am trying to do here, is 1st match a $cusip to $line. If they match
push the line to a file. The problem I'm having is, if the first $line, or
second $line, or any $line up to the matching $line, doesn't match $cusip,
you drop down into the second loop, and at that point all unmatching $lines
are pushed to the file, until the matching $line is found, then that $line is
finally pushed to the file. I don't understand why this is happening, b/c in
the second loop, $nameitem, and  $familyitem do not have any values to match
$line, and therefore shouldn't be pushed.  This information is coming from a
form, and is compared against lines in a file.	So if you just choose the
cusip, then $nameitem, and $familyitem do not have any values.
juli@my-dejanews.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 27 Jul 1998 21:03:27 -0400
From: "tdean" <tdean@gte.net>
Subject: Newbie Q: Registry.pm
Message-Id: <6pj83m$e6d$1@news-2.news.gte.net>

I am using ActiveWare Perl for Win32 on NT4SP3. I am trying to write a perl
script that will retrieve the IP that is dynamically assigned by my ISP. I
have discovered that when using DialUp Networking, a registry value of type
REG_SZ called DhcpIPAddress is created in the registry key  path as shown
below. This registry key path also contains about 8 other registry value
entries. Once you disconnect this registry value is dynamically removed from
the registry. The perl script below runs but it prints  " the unnamed value
is undefined". What am I doing wrong? How do you retrieve the data contents
of a specific registry value, if you know in advance which registry value
within a registry key you want? Any help or assistance would be greatly
appreciated. TIA


use Win32::Registry;
my $Register =
"SYSTEM\\CurrentControlSet\\Services\\NdisWan5\\Parameters\\Tcpip";
my $hkey, $value;
$HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die $!;
$hkey->QueryValue($subkey,$value);
print "the unnamed value is : ";
if ($value eq '')
 {
 print "undefined\n";
        }
else
        {
 print "$value\n";
 }
$hkey->Close();


replace at with @ and dot with .




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

Date: 28 Jul 1998 00:08:28 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: newbie string questions.
Message-Id: <6pj4ps$chg$1@nswpull.telstra.net>

In article <n7afp6.8o1.ln@localhost>,
	tadmc@flash.net (Tad McClellan) writes:
> rainkid (rainkid@rainkid.com) wrote:
>: Ok, i have  avariable, say $para, that contains a whole paragraph of text.
>: what is the command that would cut $para so i stops when it sees a certain
>: character?
>: for example... let say i want &para to be the first sentence and not the
>: whole paragraph so how would i set $para so i contains all the characters
>: from the first to the first period?
> 
> 
>    $para =~ s/^([^.]*\.).*/$1/s;

Just to add a warning to this:

This indeed gives all characters from the start of the string, up to
and including the first full stop (period for the US). But...

$para = 'I can think of a way this breaks, e.g. like this.';

The original poster asked for 'the first sentence', and a warning
should be given that that is not at all trivial. Even looking for a
full stop followed by spacing and a capital letter won't always work
(think of Dr. Spock, Rev. Doolittle, St. Joan).

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Tue, 28 Jul 1998 01:56:28 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: Chuanlarp Satchavarodom <josephs@fenix2.dol-esa.gov>
Subject: Re: Perl does not know how to build README file
Message-Id: <35BD21BC.42C7E940@whiterabbit.co.uk>

I seem to remember this same topic cropping up on clpm last week - I
don't remember if it was resolved or not.

Try a search on http://www.dejanews.com using keywords "readme" "perl"

Matt
--






Chuanlarp Satchavarodom wrote:
> 
> Dear All,
> 
>        I downloaded perl recently tried to compile it.  The configuration
> went okay, but I when I tried to make it.  The making process stopped almost
> immediately saying that it does not know how to make perl README file.
> How do I resolve this?  Thank you so much.
> 
> Joseph

-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


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

Date: Tue, 28 Jul 1998 01:43:59 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: Eric S Keyes <eskeye01@homer.louisville.edu>
Subject: Re: Perl use in html documents
Message-Id: <35BD1ECF.EA736E81@whiterabbit.co.uk>

You need to use a Server Side Include for this type of operation.

If you take a look at comp.infosystems.www.authoring.cgi you'll probably
find lots of references to this.  Another good place to look is
http://www.cgi-resources.com

Best wishes

Matt
--




Eric S Keyes wrote:
> 
> I somewhat can use perl and the book I am learnign from does not help with
> this.
> 
> My problem in an example:
> 
> <html>
> <body 'bla bla bla'>
> Welcome to my page.
> 
> <* Run a perl script to insert data here*>
> 
> Thank you and please read my guestbook.
> </body>
> </html>
> 
> To clarify I would like to load a script into the html doc, right now
> all I know is how to to is make the perl script create a new html doc and
> I do not want to do this.
> 
> Please help.
> 
> Eric S. Keyes
> @}-,-}- BlkRose @}-,-}-
> 
> Mail: erickeyes@louisville.edu
> Web : http://www.louisville.edu/~eskeye01
> 
> "You can push the meek around but those with a strong will, never budge."

-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


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

Date: Mon, 27 Jul 1998 18:43:31 -0700
From: ryan pc gibson <ryanpc@lbin.com>
To: Eric S Keyes <eskeye01@homer.louisville.edu>
Subject: Re: Perl use in html documents
Message-Id: <35BD2CC3.6A572413@lbin.com>

If you are running a web server that supports Server Side Includes
(SSI) as Netscape Enterprise does, you could insert the following HTML
into your page:

<!--#exec cmd="perl html_welcome.pl"-->

	It usually is more secure to break your HTML into a static header,
footer etc. and server them from a CGI Perl script along with your
dynamic text.

	- ryan*(pc)	


Eric S Keyes wrote:
> 
> I somewhat can use perl and the book I am learnign from does not help with
> this.
> 
> My problem in an example:
> 
> <html>
> <body 'bla bla bla'>
> Welcome to my page.
> 
> <* Run a perl script to insert data here*>
> 
> Thank you and please read my guestbook.
> </body>
> </html>
> 
> To clarify I would like to load a script into the html doc, right now
> all I know is how to to is make the perl script create a new html doc and
> I do not want to do this.
> 
> Please help.
> 
> Eric S. Keyes
> @}-,-}- BlkRose @}-,-}-
> 
> Mail: erickeyes@louisville.edu
> Web : http://www.louisville.edu/~eskeye01
> 
> "You can push the meek around but those with a strong will, never budge."

-- 
::__            ____________ ryan pc gibson __________________
::__ webmaster: ___                                       ____
::_________________ lightbinders, inc., san francisco, ca ____


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

Date: Tue, 28 Jul 1998 00:30:49 GMT
From: kreed@my-dejanews.com
Subject: Pid number of called process??
Message-Id: <6pj63q$mr$1@nnrp1.dejanews.com>

This should be real easy but I can't figure it out.

I've got a server that needs to be run in background.  I need to know
what Pid number is assigned to it as there can be many copies of
the same program running.  From the command line you can
execute:

     somecommand &

And it will tell you the pid number, but I need an automated way to
store that number.

I've tried doing this with Perl so that I can place the Pid number of
that process into a file for later access.

What I can't figure out is how to get the Pid number of the
process itself, using fork all I ever get is the Pid number of the
child that is calling the process.

Something like:

unless ( $pid = fork ) {
        unless (fork) {
                `/usr/local/bin/somecommand &`;
                exit 0;
        }
        exit 0;
}
waitpid ($pid, 0);
print "Pid number of the actual somecomand is $pid\n";

This is of course returning the child process that is calling the somecommad
module not the pid process of the somecommand itself.

Any suggestions... TIA...


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 28 Jul 1998 01:59:15 GMT
From: tulkas@relaypoint.net (chris)
Subject: Premature end of script headers
Message-Id: <6pj4ic$84d$1@fir.prod.itd.earthlink.net>

The website that I administer/program was transferred from a
PC/BSD/Apache server to a Sun Solaris 2.5.1 server. Perl scripts that
worked on the Apache server all give the same error now: Premature end
of script headers. Can anyone explain this?

Chris
tulkas@relaypoint.net



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

Date: 27 Jul 1998 17:13:09 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: Premature end of script headers
Message-Id: <6pj52l$fpg@Xenon.Stanford.EDU>

In article <6pj4ic$84d$1@fir.prod.itd.earthlink.net>,
chris <tulkas@relaypoint.net> wrote:
>The website that I administer/program was transferred from a
>PC/BSD/Apache server to a Sun Solaris 2.5.1 server. Perl scripts that
>worked on the Apache server all give the same error now: Premature end
>of script headers. Can anyone explain this?

did you test the scripts on the solaris box from the command line to make
sure everything works?

check your error log. it is likely that there are some error messages that
are being spit out before your content-type line.
-- 
Kelly William Hirano	                    Stanford Athletics:
hirano@cs.stanford.edu	                 http://www.gostanford.com/
hirano@alumni.stanford.org      (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20


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

Date: 27 Jul 1998 20:24:49 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: REQ: tpj ray tracer ".map" files
Message-Id: <6pj5oh$2tu$1@monet.op.net>


>In article <6pip7r$cut$1@goblin.uunet.ca>, smcnabb@interlog.com (Steve
>McNabb) wrote:
>+ can someone please email me the .map files from the current issue
>+ of the perl journal?  I'm itching to try it, but my (clueless)
>+ browser seems to think they are image map files, and all I can get
>+ it to "save link as" is an irritating error message -- no matter
>+ how much I swear at it. :)

It's not your browser's fault; it's the server.  If the file ends in
 .map, it interprets it as an image map.

If you go back (to
<URL:http://www.plover.com/~mjd/perl/RayTracer/src/>) you'll find that
the .map files have been renamed so that they're now .maze files which
you should be able to download normally.  Also, there's now an
`everything.tar' file that you can pick up that has everything in it.

In cases like this, contacting the author is usually a good bet. 

In article <fl_aggie-2707981840570001@aggie.coaps.fsu.edu>,
I R A Aggie <fl_aggie@thepentagon.com> wrote:
>Try:
>% lwp-rget <URL>
>You *do* have lwp installed?

I'm afraid that under the circumstances, that wouldn't have been very
effective.



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

Date: Tue, 28 Jul 1998 01:55:01 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: Daniel Newman <impulse@usa.net>
Subject: Re: Search Script? Please Help
Message-Id: <35BD2164.42D21CD1@whiterabbit.co.uk>

Best way to do this would be to loop through the list of titles and see
which ones are mentioned in the user's input.

foreach $a(@paragraph_key_words) {
	if ($user_input =~ /\Q$a/ig) {
		push (@relevant_topics,$a);
	}
}

This is quite an inflexible approach, though.  Really you'd want to
check each individual word in the paragraph title to get a match
percentage.

Matt
--





Daniel Newman wrote:
> 
> I've got a quick question, how could i do the following?
> 
> i want a big text file that has different seperated "paragraphs" each
> with its own "keywords".  After
>           a user inputs some sentences i want a script to find the
> keywords and then output a HTML page with
>           the paragraphs from the text file that apply.
>           For example:
>           a user types in:
> 
>           "I want to go to a medium sized college. I want to major in
> computer science. I have  a 4.0
>           GPA and I got  a 1480 on my SATs."
> 
>           the HTML page would display the 4 paragraphs titled(the full
> paragraphs, not links to them):
> 
>           MEDIUM SIZED COLLEGES
>           COMPUTER SCIENCE
>           GPA INFORMATION
>           SAT SCORE INFORMATION
> 
> Thank you very much!
> 
> -Daniel Newman
> impulse@usa.net

-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


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

Date: 28 Jul 1998 00:19:31 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: seeing if a file exists.
Message-Id: <6pj5ej$dth$1@nswpull.telstra.net>

In article <35bc2928.457026@news.ukonline.co.uk>,
	oliver.cook@bigfoot.com (Ollie Cook) writes:
> I'm having some trouble at the moment with a shopping cart that i'm
> writing, and would really appreciate it if some of you could shed some

another shopping cart? :)

> light on the matter, which none of my manuals have been able to do.
> Basically, I just want it to fill an array with zeros if the file
> doesn't exist, and if the file does exist to read in the data from
> that file. However, the code that I'm using at the moment makes the
> 'if' run even if the file doesn't exist. I'll copy the code in here:

Gosh. That needs a bit of formatting

>  # Fill Out Amount, Either From File, Or Set To Zero
>
>	if (-e "$visitordir/$ENV{'REMOTE_ADDR'}") 

Are you running under -w? Did you try using strict? Both are very good
practices.

Does $ENV{'REMOTE_ADDR'} contain anything at all? If it doesn't, then
you will just test for the existence of $visitordir. Maybe you should
consider using the -f test. Either that, or test that
$ENV{REMOTE_ADDR} does indeed contain something useful.

>	{
>   	open (DATAIN,"$visitordir/$ENV{'REMOTE_ADDR'}");

You should always, always check the return value of an open.

open(ZZ, $file) || die "Cannot open $file: $!";

>   	@readin = <DATAIN>;
>   	close(DATAIN);
>   	$readloop = "0";

Why are you quoting the 0?

>   	foreach $loopie (@readin) 
>		{
>    		$readloop++;

Because here you are treating it as a number.

>    		($initem[$readloop], $inquant[$readloop]) = split (/_/, $loopie);
>    		$amount[$readloop] = $inquant[$readloop];
>   	}
> 	}
>  	else 
>	{
>   	$count = "0";

Again: no need to quote a number if you want to use it as a number.
Only quote numerics when you want to treat them as a string. Perl will
'convert' silently between strings and numerics, but it might not
always do exactly what you want.

>   	for $doh (1..$looper) 
>		{
>    		$count++;
>    		$amount[$doh] = "0";
>   	}
> 	}

There are other ways of setting an array to all zeroes, although I
can't think of any real use for that right now. You should probably
read the perldata documentation:

# perldoc perldata

> I hope someone can give me a clue on this one, and if you're disgusted
> by my code, please don't be - I'm just learning.

That's why there are pointers in there to improve it :)

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Tue, 28 Jul 1998 01:51:19 GMT
From: RL <"jobs(remove_this)"@isyndicate.com>
Subject: SF,CA - JOB: Unix/Perl people (sysadmin/programming) for SF Internet  Company
Message-Id: <35BD2DFE.4B032C68@isyndicate.com>

iSyndicate is developing innovative ways to aggregate and distribute
content on the web. Our content partners and clients include many of the
biggest and best brands on the net. 

We are looking for two more top-notch developers to join our team. One
could be more sysadmin, the other more programming, although a good mix
of both is preferable. 

If programming is your artform, your means of expression, and your 
hobby, as well as your job, you're who we want. If you pride yourself in 
writing clean, readable, elegant, efficient code, you're who we want. 

Required Skills 

- Solid experience in Perl
- Unix Sysadmin ability 
- At least 2 years programming experience, or a Computer Science 
degree, or (preferably) pure brilliance and dedication to the art of 
programming. 
- Proven ability to devise practical, elegant solutions and turn them
into 
clean, well-documented code. 
- Ability and desire to fully test, install, and document.
- Ability to contribute your ideas to a team of techies and non-techies. 

The following experience is a big plus: 

- SQL databases 
- CGI scripts 
- Object-oriented programming 
- Use of a variety of Perl modules 
- mod_perl 

Our environment is Solaris, so Unix experience is a must. 

We prefer regular full-time employment, with stock options, flexibility 
in hours, some work-at-home possibilities, etc. We are located in the 
SOMA/South Park area of San Francisco. 

Please send a resume as an ascii text inclusion if possible. 

Agencies: only respond if you have a particular person who seems 
perfect. Send their resume with your contact information.

Reply to jobs(remove_this)@isyndicate.com


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

Date: 28 Jul 1998 01:46:19 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Simple (I hope) Apache/NT/Perl question
Message-Id: <6pjahb$o6v$3@marina.cinenet.net>

Ivan Fernandez Lobo (lobo@pinon.ccu.uniovi.es) wrote:
: Ok Mr. Moderated !! But I still think the question isn't off-topic.

Please stop saying that, you're only hurting your cause.  It is well
established that server configuration problems, CGI apps that run at the
command line but not through http, and the like are off-topic for this
group.  This group is entirely devoted to questions about how to use the
Perl language itself to solve problems, how to build Perl, how Perl should
change, and the like.

: How do you explain people looking for the solution to this problem start
: searching in this Newsgroup ?

Simple laziness ("My version of the question has the word 'Perl' in it, so
I'll start there"), failure to do minimal homework, failure to read FAQs,
failure to browse the group and see nearly identical questions being
redirected, and more simple laziness. 

: Well, have fun keeping the integrity of this Newsgroup.

It's not fun.  I'd prefer to talk about Perl here.  But doing stuff like
this is part of how I pay for the privilege of using the group.  Eternal
vigilance, and all that. :)

: Next time I'll try to find a group where the penalty for making a
: mistake is not so hard. 

What was so hard?  You misposted, I and others told you where you should
be posting.  If you're too fragile to deal with that, you quite frankly
won't last long on Usenet.

: P.S. By the way do those usenet rules say something about allowed mistakes ?

Yes, you're certainly allowed to make mistakes.  We're allowed to correct
them.  And the grand social experiment that is Usenet lurches onward.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Mon, 27 Jul 1998 20:02:10 -0500
From: "Quinn, M.S." <melinda@acm.org>
To: jdporter@min.net
Subject: Re: subs in separate files?
Message-Id: <35BD2312.C56900F5@acm.org>

Thank you for your reply.  I am just now beginning
to understand it, but have pasted it into my
perl reference notebook.  Thanks also to Ken Williams
who gave me some enlightening pointers.
Melinda Quinn  melinda@acm.org
  
John Porter wrote:
> 
> Quinn,M wrote:
> >
> > How do I get "use" and/or
> > "require" to search the CURRENT DIRECTORY for the
> > subroutine.
> 
>         use lib ('.');
> 
> Check out the 'lib' pragmatic module:
> 
>         % perldoc lib
> 
> also in the Camel on page 457.
> 
> --
> John Porter


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

Date: Mon, 27 Jul 1998 19:30:35 -0500
From: Perth <perth@flash.net>
Subject: Re: What a Crappy World
Message-Id: <35BD1BAA.7F04AA4B@flash.net>

this one is rather ammusing to me personally since almost this exact discussion
took place on livesoftware.javascript.examples.  the ending to it all was:

we are all here to learn whether we are experienced or unexperienced doesnt matter.
some of us are there to bounce ideas off eachother even if they are ludicrous and
can be answered by an faq. others of us are here to be forced to think about how we
would personally solve the problem thus making us teach ourselves. programmers are
always pushing the envalope, and sometimes that requires taking a look at even the
most basic things in greater detail (including the ones on faqs). after all is said
and done we may even append something to the faq that was missed in the beginning.
the point is  we are here to learn one way or another.

(the second ending to this thread was a chanting of "hare krishna" and a planned
newsgroup outing to the local airport where all perticipants would shave thier
heads, sell flowers, and promote peace to all nations of the world)   :)

Lloyd Zusman wrote:

> cberry@cinenet.net (Craig Berry) writes:
>
> > John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:
> > : In article <6n99mj$ndk$1@marina.cinenet.net>,
> > : Craig Berry <cberry@cinenet.net> wrote:
> > : >And yet, each and every person who asks a faq on clpm is indeed 'carrying'
> > : >the very answer they seek, inches away from their fingers as they type the
> > : >question.
> > :
> > : [ ... ]
> >
> > [ ... ]
> >
> > : 2. Even if it is true, asking the question is still not necessarily due
> > : to malice.
> >
> > Willfull negligence is close enough to malice that I see little use for a
> > distinction between them in this case.
>
> Well, perhaps you also don't make a distinction between *willful*
> negligence and negligence born of *ignorance*.  After all, in many
> cases in our society, "ignorance of the law is no excuse", and perhaps
> you're applying this criterion here, as well.
>
> If you truly don't make a distinction here between these two cases,
> then the rest of my post will not be relevant to you.
>
> However, if you *do* make such a distinction, then I ask you to
> consider the possibility that many of the people who pose a
> frequently-asked-question here on c.l.p.m might be totally ignorant
> that they are "'carrying' the very answer they seek".
>
> In both cases ("willful negligence" and "negligence born of
> ignorance") it's perfectly reasonable that the person be told that the
> answers are readily available to him or her.  However, in the second
> case (the "ignorance" case), I believe that the person should be
> steered to the docs and FAQ's with patience and polite consideration.
>
> [ Note that nowhere am I saying that this person should necessarily
>   be given the answer(s) to the question(s) being posed here in
>   c.l.p.m. ]
>
> And I also believe that if it's impossible, due to insufficient data,
> to determine whether the negligence is willful or ignorant, that it is
> better to err on the side of patience, politeness, and consideration.
>
> And even in the first case (the "willful" case), I am opposed to those
> few who deal with the person using insults.
>
> > [ ... ]
> >
> > But every perl user can either install it, grab the installation tarfile
> > and yank out just the docs, or browse them on the Web.  Inability to do at
> > least one of these seems unlikely in anyone legitimately claiming to be a
> > 'programmer'.
>
> Well, in the "ignorance" case I discussed above, we could very well
> have people who are fully capable of programming or of learning to
> program well, but who aren't presently aware of netiquette or the
> readily accessible docs and FAQ's.
>
> > : >I'd put it in the legal
> > : >category of 'criminal negligence' -- any reasonably thoughtful and
> > : >competent person is expected to avoid such a mistake,
> > :
> > : Expected by whom? Someone who already knows the answer?
> >
> > The law posits a 'reasonably prudent person' against whom decisions by
> > real people are measured.  Reasonably prudent people can and will find the
> > Perl docs, and can and will refrain from asking faqs on clpm.
>
> You're right that the law posits a 'reasonably prudent person' in many
> cases.  And it's perfectly justifiable to steer all reasonably
> prudent people who come here to the docs and FAQ's.
>
> It's also the case that those who are adults in society are expected
> to actually *behave* as adults, and it's generally considered to be
> non-adult, childish behavior to engage in gratuitously insulting
> behavior.  The concept of a posited "reasonably prudent person"
> against whom all are measured applies in this case, also.  Reasonably
> prudent people can easily choose to refrain from using childish
> insults when steering others towards the docs and FAQ's.
>
> > [ ... ]
> > :
> > : Fine. You are free to consider it whatever you wish. May you be happy in
> > : your assumption that everyone is doing it just to piss you off.
> >
> > No, they're doing it because they are inconsiderate and uncivilized, wrt
> > the civilization that is (was?) Usenet.  I don't think it's personal; it
> > simply matters to me.
>
> It's clear that you truly believe that those who come here in this
> manner with frequently asked questions are inconsiderate and
> uncivilized w/r/t usenet.  But keep in mind that it's equally
> inconsiderate and uncivilized (w/r/t the larger, human society in
> which we all live) to engage in gratuitous insulting behavior.
>
> In other words, those few who do so here are just as uncivilized as
> those they are attempting to criticize.
>
> --
>  Lloyd Zusman   ljz@asfast.com
>  perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
>  $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
>  $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'





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

Date: 28 Jul 1998 01:35:23 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Y2K problem in PERL with localtime()
Message-Id: <6pj9sr$o6v$2@marina.cinenet.net>

Erdem Ozsaruhan (EOZSARUH@nsf.gov) wrote:
: I didn't do my homework and learned that localtime() returns 
: the current year - 1900
: 
: That's how PERL handles it.

A behavior which it inherited from underlying C and UNIX library
functions.

: And below is how UNIX handles it as you yourself pointed out!!!

Note that *by default*, the date command provides a 4-digit year.  You
have to override the format and use %y rather than %Y to get 2 digits.

: There is no right or wrong!

Well, using 2 digits (year % 100) for the date is pretty clearly
problematic, at the very least.  That's what this whole ruckus is about,
after all.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

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

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