[7194] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 819 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 7 00:17:20 1997

Date: Wed, 6 Aug 97 21:00:22 -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           Wed, 6 Aug 1997     Volume: 8 Number: 819

Today's topics:
     Bug in FileHande <cphillip@kerr.phys.utas.edu.au>
     Re: Can filehandles be stored in a hash? (Paul Vermette [NiD/BiM])
     debugging problems (memory and CPU usage) <rmcguigan@ramresearch.com>
     Re: EASY PROBABLY: removing names from paths <sibsib@hotmail.com>
     Emailing form data <pegit.swedmap@mbox300.swipnet.se>
     Re: Have array, will (won't?) sort <seay@absyss.fr>
     HELP: htpasswd (Shun-Ping Chan)
     Re: Help: no syscall on AIX? <jhi@alpha.hut.fi>
     how do I entries in a text file in PERL? <swarsi@zeus.nmp.com>
     Re: Input a record in the middle of an Array (Tim  Smith)
     Re: JAPH (was: function pointer dereferencing) (Eric Arnold)
     Re: List of variables (Charles DeRykus)
     NT 4.0 and perl sockets mail program... (FREAKSHO)
     Re: pack() in middle w/o changing rest? (M.J.T. Guy)
     perl counter script (Nada Taghavi)
     Re: perl counter script (Adam Rogoyski)
     Re: Perl Truncation (Tim  Smith)
     Re: pesky "unknown file type" window on WinNT (Tina Marie Holmboe)
     Problems writing or appending files in cgi area with Be (Bernard Gibbons)
     Re: reading a file and having embeded variables intepre (Tad McClellan)
     selfterminating daemon <marcus@student.adb.gu.se>
     Server Push in Perl??? (Yves Dagenais)
     Web Architect <cgaston@lds.com>
     Re: why doesn't `echo ~username` return a homedir? <zenin@best.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 7 Aug 1997 11:01:00 +1000
From: Chris Phillips <cphillip@kerr.phys.utas.edu.au>
Subject: Bug in FileHande
Message-Id: <Pine.GSO.3.94.970807105306.2747A-100000@kerr.phys.utas.edu.au>

Hi All,

I think I have come across a (minor) bug in FileHandle.pm  (Solaris and
Perl) in perl-5.003. 

I cannot easily install perl-5.004 at the moment, so could someone run
this simple script on perl-5.004, and I will submit a bug report if
you find a similar thing.

---------------------------------------------------------------
#!/usr/local/bin/perl -w
 
use strict;
use FileHandle;
 
my $fh = FileHandle->new();

------------------------------------------------------------------
This produces the output:

Close on unopened file <GEN0> at /usr/local/perl5/lib/FileHandle.pm line
255.

Obviously FileHandle is trying to close the unused FileHandle. I
realise the above script is stupid, but I have a script that loops 
over each element of @ARGV, assuming this contains a list of files.
The program "die"s if the file does not exists etc, which gives the
above error.

(Please respond via email as well. Some posts get lost on the way
to Australia).

Cheers
Chris Phillips

-------------------------------------------------------------------
Department of Physics, Radio Astronomy Group, University of Tasmania
email: Chris.Phillips@utas.edu.au
Phone:  (03) 62262405 (Work),  (03) 62485285 (Telescope)
        (03) 62278324 (Home),  (03) 62262410 (Fax)



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

Date: 6 Aug 1997 12:47:42 GMT
From: e5ir@jupiter.sun.csd.unb.ca (Paul Vermette [NiD/BiM])
Subject: Re: Can filehandles be stored in a hash?
Message-Id: <5s9rpe$csu@sol.sun.csd.unb.ca>

Michael Borowiec (mikebo@MCS.COM) wrote:
: I have a script which will open many hundreds out output files.
: I would like to be able to do an open, then store the filehandle
: in a hash, indexed by a component of the filename, like so:

: > unless (defined($openhash{$filename})) {
: > 	open($handle, "> $dbdir/$filename") ||
: > 		die("Cannot open $dbdir/$filename: $!");
: > 	$openhash{$filename} = $handle;
: > }

if you used FileHandle instead, all you would have to store is a reference
to an object..

ie   $handle = new FileHandle(">$file");

this could be easily stored in a hash.


: then later...

: > print($openhash{$filename} "some stuff\n");

: However, when I try to do this I get:
: String found where operator expected at ./script line XXX,
:     near "} "some stuff\n""
:         (Missing operator before  "some stuff\n"?)
: Signal SEGV: No such file or directory
: Abort(coredump)

: I tried using scalar() around the de-referenced filehandle, but I get
: the same error. Suggestions?

: > print(scalar($openhash{$filename}) "some stuff\n");
: Argh!
: - Mike

--
              '''                    ______      _____
             (o o)                 /_____ /\   /_____ /|  / \        /|
 .------oOOO---(_)---------------. |   __  \/| |_    _|/  |\   \    /| |
|    Paul Vermette [NiD/BiM]    | |  |__|  |/   |  | |   |  \   \/  | |
|          e5ir@unb.ca          | |       /\    |  | |   |    \/    | |
| B O D i E S  i N  M o T i O N | |   __  \/|   |  | |   |  \    /  | |
`-------------------oOOO--------' |  |__|  |/  /|  |/ /| |  | \//|  | |
            |__|__|               |_______/   |______|/  |__|/   |__|/
             || ||                /BODIES/   ////IN//   ////MOTION//
            ooO Ooo               //////   ////////   ////    ////


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

Date: 6 Aug 1997 15:23:20 GMT
From: "Ryan" <rmcguigan@ramresearch.com>
Subject: debugging problems (memory and CPU usage)
Message-Id: <01bca27d$98b91790$6e6fa1cd@www>

This is running on a winnt machine

Where the heck is this thing leaking memory, it eats up 30 megs of memory. 
I declare all my variables as my or local, so they should be eliminated
every time it runs through the code.  Right?  

Also, in task manager under processes, perl.exe jumps between 1 to 75 %
(CPU usage), runs fine for a while, then when it tries to parse a larger
file the system process jumps to 95% and stays there untill I stop the perl
process.  If only checking the large file by itself, works fine.  But how
should that matter?  It goes through the list of files one at a time.  What
is going on here?

Thanks to anyone who tries to help me


##____________________________________________________
##extracts all links and checks them
##
sub checklinks {
    ($dir) = @_;
    $dir = "" unless (!$FORM{'subs'});
    @excludes = split(/\,/, $FORM{'exclude'});
    print "<table><tr><td>\n";
    print "Checking Links!<br><BR><BR>\n";
 #$dirfile contains a VERY LONG list of files
    open (FILELIST, "$dirfile") || die print "Cant open the dir list";
    while (<FILELIST>) {
        while (-f $lock) {&killProcess}
        local @URLS; #should dissappear at}  right? shouldn't eat memory
        $currentfile = $dir.$_;
        &parselinks;
        &checkURLS;
    }
    print "Out of a total of $numurls, $numbad were bad.\n";
    print "</table></td></tr>\n";
    close (FILELIST);
}#----------------------------------------------------

##____________________________________________________
##Checks All URLS
##
sub checkURLS {
    my @badURLS;
    my $badexist;
    foreach (@URLS) {
        while (-f $lock) {&killProcess}
        $numurls ++;
        my $sitelocation = $currentfile;
        $sitelocation =~ s/\\/\//g;
        $sitelocation =~ s/$root/$ourURL/ig;
        my $url = $_;
        my $checkurl = new URI::URL($url);
        $checkurl = $checkurl->abs($sitelocation);
        if (!(head($checkurl))) {
            push (@badURLS, $url);
            $badexist = 1;
            $numbad ++;
        }
        sleep(.05);
    }
    if ($badexist) {
        print "<font size=+2>$currentfile</font><br>\n<blockquote>\n<font
color=#ff0000>\n";
        foreach $bad (@badURLS) {print "$bad <br>\n"}
        print "</font></blockquote><br>\n";
    }
}#----------------------------------------------------

##____________________________________________________
##Parses All Links
##
sub parselinks {
    my $htmldata = HTML::Parse::parse_htmlfile($currentfile);
    for (@ { $htmldata->extract_links(qw(a img)) } ) {
	local ($link) = @$_;
        if ($link =~ /mailto\:/ig) {$link = ""}
        foreach (@excludes) {if ($link =~ /$_/ig) {$link = ""}}
        push (@URLS, $link) unless ($link eq "");
    }
}#----------------------------------------------------


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

Date: Wed, 06 Aug 1997 13:35:22 -0400
From: Scott Blanksteen <sibsib@hotmail.com>
Subject: Re: EASY PROBABLY: removing names from paths
Message-Id: <33E8B5DA.A153A1CB@hotmail.com>

Tad McClellan wrote:
> 
> Shaun O'Shea (lmisosa@eei.ericsson.se) wrote:
> : I have an array of file paths and I want to remove everything except the
> : file name and extension.
> 
>    s!.*/!!;

Tad gets my vote for line-noise of the week :-)

Scott

-- 
Scott I. Blanksteen
sib (at) worldnet (dot) att (dot) net


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

Date: Wed, 06 Aug 1997 22:00:13 +0200
From: Pinne <pegit.swedmap@mbox300.swipnet.se>
Subject: Emailing form data
Message-Id: <33E8D7CD.730@mbox300.swipnet.se>

Hi Html gurus !

Sorry if you see this posted several times,
but I can't see it at all.
Can anyone help me on this:
I need to send email from a html-page
via the mailto HREF.
I know that i somehow can set the subject in
the mailto href.
Can I do this in plain html and pass the data
from the form fields via a message tag or something ?
Like this:

<FORM>
<P>Firstname:<INPUT NAME="firstname" TYPE="text" SIZE="25"></P>

<P>Lastname:<INPUT NAME="lastname" TYPE="text" SIZE="25"></FORM>
</BODY>
</HTML>

<ADDRESS><A HREF="mailto:pinne@pegit.se"><adress>pinne@pegit.se</adress>
<message>
"firstname=formfieldvalue.firstname"
"lasttname=formfieldvalue.lastname"
</message></A></ADRESS>.

If not what would be the best way to do it,
Javascript or Java.
I don't want to use cgi-scripts.
Thanks a lot and in advance for any answer.
Please reply by email.
/regards


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

Date: Wed, 06 Aug 1997 12:05:20 +0200
From: Doug Seay <seay@absyss.fr>
To: parkhurs@indiana.edu
Subject: Re: Have array, will (won't?) sort
Message-Id: <33E84C60.6F6E48BA@absyss.fr>

[posted and mailed]

D.F. Parkhurst wrote:
> 
> I'm new at Perl, so this is probably an easy question.
> 
> I have a program that was translated from awk to perl.  It
> includes an array $r ($r{1}, etc.) of floating point numbers that
> I want to sort.
> 
> The llama book shows a numeric sort in the form
> 
> @sortedlist = sort { $a <=> $b } @unsortedlist,
> 
> but that sorts a list and produces a list.
> 
> How do I sort an array of numbers to get an array?

Vocabulary problem here.  $r{1} is not an "array".  It is an
"associative array" which is usually called a "hash" these days (much
shorter name).  Simply put, you cannot sort a hash.  It is implemented
by a hash table (hence the name), and hash tables are unordered. 
Usually what people do is sort the keys of the hash with something like

my @sorted_r = sort { $r{$a} <=> $r{$b} } keys %r;

Once you get past your vocabulary problem, this is all FAQ material. 
Check the FAQ for more details.

- doug


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

Date: Wed, 6 Aug 1997 20:21:06 +0100 (BST)
From: mscyspc@scs.leeds.ac.uk (Shun-Ping Chan)
Subject: HELP: htpasswd
Message-Id: <33E8CE40.6AA5@scs.leeds.ac.uk>

I'm trying to write a Perl script that's accepts a user's username and
password from a HTML form and then uses the htpasswd to store this data
in crypted format.

I have piping it, but with no luck:

	open(FILE, "| htpasswd .htpassword $username") || ...
	print FILE "password";
	print FILE "password";
	close FILE;

I've also tried using the crypt command in perl which does give me a
crypt password.  However, when I try to access a dir with my user ID, it
compares my ID to that crypted password and refuses me access.

	($username,$password) = @_;

	$salt = time % $$;
	$string = crypt($ARGS[0],$salt);

	print "$username:$password\n";

Can anyone help?  Any help would be much appreciated.

Shun-Ping Chan


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

Date: 06 Aug 1997 12:46:24 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Help: no syscall on AIX?
Message-Id: <oee67tjzlsf.fsf@alpha.hut.fi>


Sorry but as you yourself noticed there is no syscall() in AIX.
Full stop.

For many things Perl is at the mercy of the underlying system.
Library calls (UNIX manual section 3) Perl could fake but system
calls (section 2, syscall being one of them) are by definition
'unfakeable'.

AFAIK there is no such concept as syscall() in all of AIX:
the system calls are not accessible through a simple indexed
jump table, the whole linker/loader does some very AIXish
magic to do system calls.

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: Thu, 07 Aug 1997 00:58:28 -0400
From: Suhail Warsi <swarsi@zeus.nmp.com>
Subject: how do I entries in a text file in PERL?
Message-Id: <33E955F4.AAC23D9C@zeus.nmp.com>

How can I delete data (some, not all) from a text file using PERL? I
find it easy enough to write to and read from a text file, but can't
figure out how to delete.



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

Date: 6 Aug 1997 01:21:26 -0700
From: trs@azstarnet.com (Tim  Smith)
Subject: Re: Input a record in the middle of an Array
Message-Id: <5s9c66$q0u@web.azstarnet.com>

In article <33E858AA.794B@htsa.hva.nl>,
Jeroen Kustermans  <kusterma@htsa.hva.nl> wrote:
>Is there a way to input a record in the middle of an Array?

Look at the splice function in perlfunc.

Tim



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

Date: 6 Aug 97 18:32:07 GMT
From: eric.arnold@sun.com (Eric Arnold)
Subject: Re: JAPH (was: function pointer dereferencing)
Message-Id: <ERIC.97Aug06183207@m-e-ir1.sun.com>

In article <8cu3h5tsd4.fsf@gadget.cscaper.com>
	Randal Schwartz <merlyn@stonehenge.com> writes:

>>>>>> "Tom" == Tom Grydeland <tom@mitra.phys.uit.no> writes:
>
>Tom> The funny thing is, since I happened upon one of the previous
>Tom> incarnations of the above JAPH, I've tried numerous other ways to
>Tom> define a subroutine named q( ) or q(,).  All in vain.  Any takers?
>
>*{" "} = sub { print "won't the traceback look neat?\n" };
>*{","} = sub { print "and comma two!\n" };

Well, you won't be able to redefine just q(), since the call for the above
stuff looks like:
	&{" "}( 1, 2 );
so 
	*{"q"} = sub { print "q(@_), happy now?\n" };
or simply
	*q = sub { print "q(@_), happy now?\n" };
which is really no different than
	sub q { print "q(@_), happy now?\n" };
is called as
	&q( 1, 2 );
However, 
	q( 1, 2 );
still gets parsed as the quote function.

So, though you can now define really sick and twisted subroutine names,
this doesn't seem a solution for what you want (as if you needed it ;-).

-Eric


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

Date: Wed, 6 Aug 1997 17:57:29 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: List of variables
Message-Id: <EEI77t.LJJ@bcstec.ca.boeing.com>

In article <33E78FB5.B2B4EFB1@psu.edu>, Linda Littleton  <lrl@psu.edu> wrote:
 >Is there a way in Perl to get a list of all currently defined variables
 >within a program? What I'm looking for is something like a function call
 >that would return a list of the names of all current variables. Thanks.
 >

dumpvar.pl may help, e.g., 

  require "dumpvar.pl"
  &dumpvar('package_name');  


Note: &dumpvar('main') will dump  the current Perl operating 
environment %SIG, %ENV, etc. along with your user defined 
variables. So you'll need a bit of hunting to find them amid 
all the other buried treasures :)


HTH,
--
Charles DeRykus
ced@carios2.ca.remove_it.boeing.com.  
 

  



 




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

Date: 6 Aug 1997 16:48:52 GMT
From: FREAKSHO@mail.carnivore.net (FREAKSHO)
Subject: NT 4.0 and perl sockets mail program...
Message-Id: <5sa9tk$83h$1@yakuza.fc.net>

I have a perlsript running a shopping cart. In the script there is a routine 
for mailing the invoice via sockets. The process works once and then will not 
work again. Has anyone had the same problem?
Thanks in advance.
-- 
Nuroagony
freaksho@carnivore.net
"Hey everybody,  there's a shitcloud comin' run for your lives"



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

Date: 6 Aug 1997 17:39:46 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: pack() in middle w/o changing rest?
Message-Id: <5sact2$1h0$1@lyra.csx.cam.ac.uk>

Trudno zhit' v derevne bez nagana. <alex@kawo2.rwth-aachen.de> wrote:
>Hi,
>
>is it possible to pack() something in the middle of string
>without changing the rest? I am doing a small hash-database 
>for absence plan with fixed sized records which are 52 characters 
>long (52 weeks / year) and like to set/change some character, 
>signalling that a person was absent on that week.

You probably want the substr function, used as an lvalue (i.e. on the left
hand side of an assignment).   This allows you to replace a substring
with another string, of a possibly different length.   For example

        $a = 'abcdefghijklmnopqrstuvwxyz';
        substr($a,10,5) = 'LMN';

leaves  $a == 'abcdefghijLMNpqrstuvwxyz'.

See   perldoc -f substr, or (if you have an older Perl) the substr entry
in perlfunc.


Mike Guy


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

Date: Wed, 6 Aug 1997 15:08:42 GMT
From: ntaghavi@severn.wash.inmet.com (Nada Taghavi)
Subject: perl counter script
Message-Id: <EEHzEI.HnF.0.-s@inmet.camb.inmet.com>

	I know how to write a web counter in Perl, but need to do something
slightly more complicated now.  My site frowns on CGI scripts, so I need to
write a Perl script to count the number of accesses but only update that
count to the web pages once a day.  Any suggestions welcome.  Thanks.

Nada


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

Date: 6 Aug 1997 18:18:09 GMT
From: ifqa242@spice.cc.utexas.edu (Adam Rogoyski)
Subject: Re: perl counter script
Message-Id: <5saf51$mei$3@geraldo.cc.utexas.edu>

Nada Taghavi (ntaghavi@severn.wash.inmet.com) wrote:
: 	I know how to write a web counter in Perl, but need to do something
: slightly more complicated now.  My site frowns on CGI scripts, so I need to
: write a Perl script to count the number of accesses but only update that
: count to the web pages once a day.  Any suggestions welcome.  Thanks.

   How are you going to count the hits to your page without running some
sort of program to keep track of it.  If you can do this you can run your
program on crontab that only updates the page one a day.  man crontab for
more info on that.


--
           __/\__.           [-Temperance-]              .__)\__
      !    \ oO /         . :[Adam Rogoyski]: .           \ oO /    !
      .    /_\/_\       .  :[ apoc@laker.net ]:  .        /_\/_\    . 
             \/    .  :[ http://www.laker.net/apoc ]:  .    \/


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

Date: 6 Aug 1997 01:15:47 -0700
From: trs@azstarnet.com (Tim  Smith)
Subject: Re: Perl Truncation
Message-Id: <5s9brj$nim@web.azstarnet.com>

In article <33e60ee0.11053929@news.amrcorp.com>,
Carol Lynn Smith <carols@sdt.com> wrote:
>How do I chop off at 50 characters not including a return or ^I?

This seems to work:

#!/usr/bin/perl -w
use strict;

my $string = 'x' x 20 . "\t" . 'y' x 20 . "\n" . 'z' x 20;
print $string, "\n";
$string = substr $string, 0, 50 + $string =~ tr/\t\n//;
print $string, "\n";

Enjoy,

Tim



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

Date: 6 Aug 1997 09:18:12 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: pesky "unknown file type" window on WinNT
Message-Id: <5s9fgk$2mn$4@news1.sol.no>

In article <33E7DC8F.4F7C@powerquery.com>,
	Mike Wellems <mike@powerquery.com> writes:

> I am new to Perl and have been trying to write simple programs, but all
> of them fail.  I don't have my own server, just access to a cgi-bin. 
> When I try to run a prog, Netscape brings up an unknown file type window
> (application/x-perl).  How do I stop this?  The server is Windows NT.

  This is definetly not a Perl problem - so a chat with your system
administrator seems to be in order. Maybe the server isn't set up to execute
Perl-scripts ?

  Have a talk with whomever is in charge of that server.

--
 Tina Marie Holmboe                          tina@mail.scandinaviaonline.se

 The opinions expressed above are mine, and should in no way or under any
 circumstances be associated with Scandinavia Online AB unless this disclaimer
 is explicitly revoked.


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

Date: Thu, 07 Aug 1997 01:42:33 GMT
From: bernard510@hotmail.com (Bernard Gibbons)
Subject: Problems writing or appending files in cgi area with Best Internet
Message-Id: <5sb957$qak$1@news.wco.com>

>I'm not sure if this is a perl problem or a cgi one.

>My ISP is Best Internet and they make cgi available anywhere within the user'spublic_html area with scripts being identified by .cgi extensions.
>
>Their rules say "if you need to create files, make a separate writable directory".
>
>I have a directory called perlscripts with permission 711 (same as my public_html) directory. Below that I have set up a subdirectory called perlfiles.  I've tried every set of permissions I can think of here but every time I run my cgi script the sytem error message (which I get via $!) comes up permission denied.
>
>Same problem writing or appending.
>
>Reading is fine.
>
>Can anybody come up with any suggestions? I have run out of ideas and the Best Internet support is the slowest I have ever encountered.
>
>Please email me if you have any ideas.
>
>Bernard Gibbons
>
>bernard510@hotmail.com


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

Date: Tue, 5 Aug 1997 06:43:52 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: reading a file and having embeded variables intepreted(sp).
Message-Id: <ol37s5.in.ln@localhost>

Chris Oxenreider (oxenreid@state.net.no_spam) wrote:

: Ok, so im having a bit of brain block.  I would like to do something with
: perl, i am quite sure it can be/has been done.

: I would like to take the output of a perl program and put the contents of
: variables in to a form read in via the open statement, and output the
: result.

: Now, i cant seem to figure out how to do this.  The output of this program
: just prints the variable names, with out interpretation. (ie $f_name is
                                  ^^^^^^^^^^^^^^^^^^^^^^^

Good thing too.

I wouldn't want perl to put arbitrary interpretations on _input data_.

If it changed:
   That will be $1 please.
to
   That will be <something that matched in a previous pattern> please.

I would get annoyed (and likely poorer too ;-)


You need to tell perl what to do with data that is read in (it is not
perl code, so perl leaves it alone)


: printed as
: $f_name and not as chirs)  The solution is something obvious, and i am
: missing
: it, please help.  Thanks in advance.


: Examples:
: ---
: #!/usr/local/bin/perl

Where's every Perl programmer's closest friend?

   #!/usr/local/bin/perl -w


: #
: $f_name = "chris";
: $l_name = "battenberg";
: $bgcolor = "pink";

: open (FILE, "/path/to/file.html") || die "can not open $!\n";

: while (<FILE>) {

   s/\$(\w+)/${$1}/;  # a 'Symbolic Reference', see perlref man page


:   print "$_";
: }


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Wed, 06 Aug 1997 07:51:31 -0600
From: Marcus Engene <marcus@student.adb.gu.se>
Subject: selfterminating daemon
Message-Id: <870871212.13158@dejanews.com>

Hi.

I wrote before about my buggy daemon, written in perl. If anyone'd
like
to have a look at it I'd be most pleased. It's located at

 http://w3.adb.gu.se/~marcus/mcp.pl

The problem was that the program (when having child-processes, in the
source refered to as slaves) does terminate after 10 minutes or so, by
a SIGINT, or SIGKILL (depending on if I trap the SIGINT). It does so
without any errormessage. Usually the termination occures in the
$mcpselect->can_read(2) statement (in the sleep).

Kisses & hugs
please kill my bugs

/Marcus

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 06 Aug 1997 19:44:55 GMT
From: yves@streamwave.com (Yves Dagenais)
Subject: Server Push in Perl???
Message-Id: <33e8d360.2340981@news.synapse.net>

Hello,

I am trying to write a script for doing a server push.  I have
successfully made one in Shell, but when trying to do the same thing
in Perl, it does not display the data as it is comming done.  In Perl,
it waits till the whole script running and then displays only the last
part.

Any suggestions?  If you have a working example of a Perl server push,
can you send it to me?  

Any input would be appreciated.
Thanks in advance,

Yves


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

Date: Wed, 06 Aug 1997 15:34:31 -0400
From: Chris Gaston <cgaston@lds.com>
Subject: Web Architect
Message-Id: <33E8D1C6.CA4A410B@lds.com>

Logical Design Solutions, a leader in the design and development of
Interactive Business Communications has an immediate full-time opening
in their Morristown, NJ office for a Web Architect.

Job Description:
In this visible role, the ideal candidate will possess experience in
configuration of Internet technologies as part of a multi-tiered
information technology architecture.  Keeping up-to-date with
current technology trends is essential, as is the ability to evaluate
appropriate technology components for development and delivery
environments.  This individual must also have the ability to integrate
application support technologies with preexisting client IT
infrastructure.  Experience with C/C++, Perl, HTML, Java, CGI and
knowledge of Internet protocols and standards is required.
Knowledge of Active X a plus.

Send resume with cover letter and salary requirements or contact:

Technical Recruiter
Logical Design Solutions
Phone: (201) 971-0100
Fax:   (201) 971-0103
email: recruiter@lds.com

For further info:   http://www.lds.com




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

Date: 6 Aug 1997 10:01:45 GMT
From: Zenin <zenin@best.com>
Subject: Re: why doesn't `echo ~username` return a homedir?
Message-Id: <5s9i29$joj$2@nntp2.ba.best.com>

Peter De Gersem <Peter.DeGersem@esat.kuleuven.ac.be> wrote:
	>snip<
> Executed in the shell (ksh) itself, it works (i.e., username is a valid
> user).
	Korn shell isn't the shell Perl uses, sh is.

> Any ideas on how I can make this work?
	Yes. :)

> Does the backticks operator bypass shell
> tilde-expansion? I use perl 5.003_00 on Solaris 2.5.1.
	No, it doesn't.  However sh doesn't support ~ expansion.  At least
	the Solaris version doesn't (FreeBSD uses bash as sh, so it does
	work).

	If you want to throw out portability, you can force it to use ksh:

	print `ksh -c "echo ~user"`;

-- 
-Zenin
 zenin@best.com


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 819
*************************************

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