[6303] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 925 Volume: 7

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 11 05:07:22 1997

Date: Tue, 11 Feb 97 02:00:25 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 11 Feb 1997     Volume: 7 Number: 925

Today's topics:
     *** NEW WAY TO PROMOTE YOUR WEB YOURSELF *** (Tony Ellison)
     Calling a .html page from perl script <Charles@hnnet.demon.co.uk>
     Re: Can I remove a require? <domi@marlis.grenoble.hp.com>
     CFD and ANNOUNCE:  IO::Format 0.01 <beck@qtp.ufl.edu>
     Re: CGI: System calls (Tad McClellan)
     Effective Perl Programming: excerpt(s) online <joseph@5sigma.com>
     File Mager Perl Script <umoraes@mercurioterm.com>
     Re: Get filename from variable-length path? (Tad McClellan)
     Re: how to change of a given string? <tchrist@mox.perl.com>
     How to check an environmental variable akench@cvimail.cv.com
     Re: How to check an environmental variable <bart@easics.be>
     Re: Increasing variable names (ie - $line1,$line2, etc) (Dave Thomas)
     Re: Need help - just starting perl <cplee@thegrid.net>
     Re: on the fly graphs (Nathan V. Patwardhan)
     Re: OraPerl for Perl4 on Alpha running Oracle 7.3 ??? (John D Groenveld)
     Perl Compiler for a large project (Aimee Schneider)
     Perl For NT Question.... (Michelle Feigen)
     Perl NT Command Line (Neal Hansch)
     Re: problem sending mail from perl using cron (Nathan V. Patwardhan)
     Re: problem sending mail from perl using cron (Benjamin J Trott)
     Question about File Descriptors <cam@chch.planet.org.nz>
     Re: Search Engine in Perl (Brian S Hiles)
     Re: Settle an argument - to die or not to die? <phil@comp.vuw.ac.nz>
     Re: SIGCHLD and process ID <domi@marlis.grenoble.hp.com>
     Re: Sybperl & group by query (Abigail)
     using sendmail (Sean W. Ellis)
     Re: using sendmail <e8726057@student.tuwien.ac.at>
     WIN32-Perl-script loops and wait for a file (Elfriede Heilmeier)
     Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)

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

Date: 11 Feb 1997 05:49:47 GMT
From: ellison@ingress1.murdoch.edu.au (Tony Ellison)
Subject: *** NEW WAY TO PROMOTE YOUR WEB YOURSELF ***
Message-Id: <5dp19r$ooe@newsfeed.ingress.net>


                INTERNET PROMOTION OUTLET

           (http://www.shoplet.com/pr/index.html)


More important than how great your site looks is making sure that
people come to visit. There are many search engines, directories and
sites on the Internet.  Listing your site on all of them can be very
time consuming and frustrating task.  Now, you can enlist your site
with 50, 100, or 150 top search engines in two minutes for as low as
(Offer Expires Dec 31, 1996):


        * Index In Top 50 Search Engines for only  $9.95

        * Index In Top 100 Search Engines for only  $19.95

        * Index In Top 150 Search Engines for only  $29.95



We will provide you with the confirmation of each search engine that
your site was indexed successfuly. We will also offer to monitor your
site activity before and after.

We accept, Visa, Amex, MasterCard, and Discover.


For more please see:  http://www.shoplet.com/pr/index.html


Thank you,

Tony Ellison

President




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

Date: Tue, 11 Feb 1997 08:59:29 +0000
From: Charles Norton <Charles@hnnet.demon.co.uk>
Subject: Calling a .html page from perl script
Message-Id: <lmaYVBAxTDAzEwiX@hnnet.demon.co.uk>

Can anyone tell me how to call an html page from a perl script used on a
web page.

I have been told there is a way to use the print command, but I can't
see how.

The only way I have found so far, is to open the .html file, read it a
character at a time and print out the characters which results in the
 .html page being displayed.

Thanks

Charles Norton



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

Date: 11 Feb 1997 09:55:47 +0100
From: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: Can I remove a require?
Message-Id: <vkzsp3390x8.fsf@marlis.grenoble.hp.com>

"Mark Brodziak" <mark.brodziak@wpcorp.com.au> writes:

> 
> Hi;
> 
> I have a require statement in my code.  I want to be able to require
> several different control files; each file has a similar structure, named
> ctl, within it.  However, I strike a small problem as when I try to
> subsequently require the next control files, it ignores it as there is
> already a require with the same structure within it.  
> 
> Can I remove my first require before going on to the next control file?
> 
Use the "do" command instead of require.

-- 
Dominique_Dumont@grenoble.hp.com


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

Date: 10 Feb 1997 19:55:00 -0500
From: Sullivan Beck <beck@qtp.ufl.edu>
Subject: CFD and ANNOUNCE:  IO::Format 0.01
Message-Id: <reh3ev4f9gb.fsf@qtp.ufl.edu>



I am experimenting with a module to easily work with perl formats.  I get
really annoyed that I can't easily pass them in and out of subroutines (or
even worse... modules in a different namespace).  I used to have the same
problems with filehandles, but thanks to the IO:: package of Graham Barr's,
that's in the past.

Anyway, I wrote a module patterned after these IO modules for working with
formats and I would like to get some feedback on them.

The module can be obtained from my home page:
  http://www.qtp.ufl.edu/~beck

I definitely consider this an alpha test version but the simple test cases
I have written seem to work properly.

The module installs as IO::Format and IO::FormatFile (the latter inherits
everything from IO::File but it replaces the ->write method to use the
IO::Format formats).

Some questions I would like to get some feedback on:

1.  Is this useful/necessary?  I think so, but I may be a minority.

2.  Formats now cannot use my() variables at all.  If I type:
        my($a)="a";
        $string='format JUNK =
          @<
          $a
          .';
        eval $string;
        $~ = JUNK;
        write;
    I at least have access to the my() variables of the current subroutine,
    but by moving the write into a module, I no longer have access
    to the my() variables even from the routine where I defined the
    format.  This is unfortunate, but I know of no way around it.  I'm
    not at all familiar with writing .xs extensions, but could one be
    written which would have access to the my() varialbes of a calling
    routine?

3.  In perl, there is only one accumulator ($^A) and formline adds to it,
    but it is only written out when write is called and then it is cleared.
    In IO::Handle, the accumulator is essentially done away with (it is
    immediately printed out to a file associated with a file handle).

    I have not yet implemented the formline command.  It's not any harder
    then the format command, but I would like some feedback on what it
    should do.  Should it store everything in one global accumulator?
    Should it immediately write it to a file?  Or should each filehandle
    have it's own accumulator which formline adds to but it is not written
    out until an actual write command is called?  I tend to favor the 2nd
    since I don't see any real big reason to have the accumulator, but if
    there is a good reason for one of the other behaviors, I'd like to
    hear them.

4.  What (if any) extensions would be useful?


Some notes about the release:

o  This is alpha test software.  Don't write software for landing the next
   space shuttle using it!

o  At this point, the stdout.t test doesn't work when called via "make test".
   It has to do with how Test::Harness is trapping the output I think
   because it works ok if I call it explicitely.

o  I will not make any serious attempts to remain backward compatible with
   this release!  This release is primarily a call for discussion release.
   Once I have a better idea what others would like in this module, it will
   approach it's final form (whatever that may be).


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

Date: Mon, 10 Feb 1997 20:21:04 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: CGI: System calls
Message-Id: <g2lod5.9p.ln@localhost>

Petr Ged Kunc (ged@fi.muni.cz) wrote:
: I have such problem:

: I'd like to connect to Oracle 7 database using PERL.
: Sytem calls works right when I run PERL script from UNIX command line,
              ^^^^^^^^^^^                        ^^^^^^^^^^^^^^^^^^^^^^
: but they don't work as CGI-scrips.
           ^^^^^^^^^^^^^^^^^^^^^^^^

This is a dead giveaway that you have a CGI problem, not a perl
problem.

comp.lang.perl.misc is not the CGI newsgroup.

comp.infosystems.www.authoring.cgi is the CGI newsgroup. 

Try asking there.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Mon, 10 Feb 1997 23:20:51 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Effective Perl Programming: excerpt(s) online
Message-Id: <33000FA7.710A@5sigma.com>

Well, I finally came up for air and have started to post samples
from the book.  As of right now there is one item ("Understand
the difference between my and local") online in Acrobat format.
There should be 2-3 more later in the week.  Check back frequently
if you're interested.

Once I have the Acrobat versions up I'll see about HTML.  I have to 
ask my fiancee to help me figure out WebMaker before the latter gets 
done, so please wish her smooth, stress-free days at work!

The URL is:

  http://www.5sigma.com/perl/book.html

A/W is getting geared up to promote the book in a major way.  Guess
I better hurry up and finish my edits and the list of the items.

Feel free to email comments.  Praise is always appreciated.  Gripes
are heard and usually responded to.  :-)

	-joseph

-- 
Joseph N. Hall   http://www.5sigma.com/joseph/  mailto:joseph@5sigma.com
Proprietor, 5 Sigma Productions          P.O. Box 6250 Chandler AZ 85246
Perl training & software, C++/C/etc. software, web stuff, original music 
*Effective Perl (A-W Spring '97) .. http://www.5sigma.com/perl/book.html


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

Date: Tue, 11 Feb 1997 02:56:15 -0800
From: umoraes <umoraes@mercurioterm.com>
Subject: File Mager Perl Script
Message-Id: <3300504F.5B23@mercurioterm.com>

Hi,
     I'm looking for a file manager script (writen in perl) that i can
use to erase, rename, ... in my site

     Please, leave a message here or send an e-mail to:
     umoraes@mercurioterm.com


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

Date: Mon, 10 Feb 1997 20:37:13 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Get filename from variable-length path?
Message-Id: <p0mod5.9p.ln@localhost>

Carl Payne (cpayne@xmission.xmission.com) wrote:
: Hello, wise folk,
         ^^^^^^^^^

Hey! That's discrimination.

I'm going to read it anyway. So there!


: I have a situation where I'm given up to several hundred MB 
: of directory listings and I need to parse the filenames 
: (and ONLY the filenames) from those lists for a seperate routine.
: The problem is, some files have very short paths, like:
: 80/product.list
: and some have very long paths, like this:
: datashop/desktop/routine.registered/objwires/SET/xx291970/AN-12_dv2363.x


Naw. That's not a problem ;-)


: (gee, I hope that line isn't >80 cw)

: The file records these in a huge blob, several dozen MB a day.  I can't
                              ^^^^^^^^^
: exactly just print "the filename column" because it's in a different
: place each line.  I also can't search based on the "." because some 
: directories have periods in them.

How about searching based on the last slash?  (see below)


: The question is: how do I extract *JUST* the filename and send it
: to a seperate file where all the filenames live for future processing?

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

foreach (
'80/product.list)--',
'datashop/desktop/routine.registered/objwires/SET/xx291970/AN-12_dv2363.x)--'
) {
   print "$_\n";
   print "$1\n" if m#.*/(.*)\)--#;
}
-------------


: Is there a way to reach a delimiter and count backwards?  

Yes, but you don't need to go to all that much trouble ;-)


: This file
: has each full path terminating in a )-- (paren,dash,dash), so if I
: could find )--and count back to the next slash, might that do it?


Hope the above helps!


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 11 Feb 1997 03:02:17 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how to change of a given string?
Message-Id: <5donfp$bm4$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, luis@ged.com writes:
:	I need to change the Case of a string that a client inputs for
:instance ibm would be IBM, apple would be Apple.  The string is obtained
:from the login that permits the user to enter the page.  (Its a cgi perl
:page)

  man perlfunc | egrep -i '(upper|lower)-*case'

--tom
-- 
Tom Christiansen      		tchrist@perl.com
echo $package has manual pages available in source form.
echo "However, you don't have nroff, so they're probably useless to you."
    --Larry Wall in Configure from the perl distribution


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

Date: Tue, 11 Feb 1997 11:53:12 +0500
From: akench@cvimail.cv.com
Subject: How to check an environmental variable
Message-Id: <199702110653.LAA29535@bandar.CV.COM>

Hi Perl Gurus,

Is there a way to check if a environmental variable
exists or no. Checking this way 
"if ($ENV{'variable'}) "
works only if that environmental variable has a value.
How can I check if it is declared but has no value?

thanks and regards,


Atul Kench

(akench@cvimail.cv.com)



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

Date: Tue, 11 Feb 1997 09:13:52 +0100
From: Bart Willems <bart@easics.be>
To: akench@cvimail.cv.com
Subject: Re: How to check an environmental variable
Message-Id: <33002A40.5DE4@easics.be>

akench@cvimail.cv.com wrote:
> 
> Hi Perl Gurus,
> 
> Is there a way to check if a environmental variable
> exists or no. Checking this way
> "if ($ENV{'variable'}) "
> works only if that environmental variable has a value.
> How can I check if it is declared but has no value?
> 


if (defined($ENV{'variable'}))
    ^^^^^^^

Bart
-- 
===================================================================
Bart Willems              ===              Easics               ===
ASIC Design Engineer      ===  VHDL-based ASIC design services  ===
                             ===================================
mailto:bart@easics.be                     http://www.easics.com/
(PLEASE DON'T REPLY TO smap@easics.be !)

Tel: +32-16-298 408
Fax: +32-16-298 319         Kapeldreef 60, B-3001 Leuven, BELGIUM


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

Date: 11 Feb 1997 06:18:07 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Increasing variable names (ie - $line1,$line2, etc)
Message-Id: <slrn5g03jl.57h.dave@fast.thomases.com>

On Mon, 10 Feb 1997 15:01:14 -0600, basslerp@musu2.slu.edu <basslerp@musu2.slu.edu> wrote:
> Question:  I have a situation where I there are to be a varied number of
> lines to be read in, but then for each line to be split up and defined as
> associative arrays ($line1{URL}, $line1{TITLE}, etc).  The problem is
> trying to define such initial variables names (like $line1, $line2). The
> easiest way would be to simply create an array @line, and then just go
> $line[1], $line[2], etc.  However, as far as I know, you couldn't create
> associative arrays out from these array values.  If possible, then
> problem solved.  If not, what would be the easiest way to go about
> defining/creating these variables?

You _could_ have increasing variable names using soft references:

   my $name = 'line0000';
   
   while (something) {
      $name++;
      $$name = <>;
   }
   
However, you can also have arrays of hashes:

@input = (
'URL=url1 TITLE=title1 NAME=name1',
'URL=url2 TITLE=title2 NAME=name2',
'URL=url3 TITLE=title3 NAME=name3');

# Build array of hashes, one entry per input line, with
# eask hash holding key/value pairs from that line
my $count = 0;

for (@input) {
  while (m/(\w+)=(\w+)/g) {
    $details[$count]{$1} = $2;
  } 
  $count++;
}

# Print results
for my $row (@details) {
  for my $key (sort keys %$row) {
    print "$key=$$row{$key} ";
  }
  print "\n";
}

__END__

Regards

Dave


-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 11 Feb 1997 05:50:16 GMT
From: "Casey Lee" <cplee@thegrid.net>
Subject: Re: Need help - just starting perl
Message-Id: <01bc17df$9f8b1790$0655bece@cyber>

Try this...

#!/usr/bin/perl

foreach (split(/\s+/, `/bin/ls *.htm`)) {       
    ($filename, $extension) = split(/\./,$_);
    rename($_,"$filename.html");
}

That should do it...

----------------------------------------------------------------------------
---
Casey P. Lee                             casey@thegrid.net
System Administrator                        (805)781-6601
The Grid Network                    http://www.thegrid.net

Konrad Rokicki <acidik@geocities.com> wrote in article
<32FC9C59.66E0@geocities.com>...
> I'd like to learn Perl but I could someone help me out with my first
> script? I do some html editing and my files are all named .htm. So when
> I go to put them on the server I have to rename them all one by one. I'd
> like to write a script to rename all the .htm files in any directory to
> .html files. Here's what I have so far.. 
> 
> #! /usr/local/bin/perl
> # htm2html - Fast multifile rename
> 
> $addl = "l";    
> 
> 'ls *.htm > temp001';
> open (DATFILE, "temp001");
>  while (<STDIN>) {
>    if (/*.*/) {
> #    ^^^^^^^^^
> # I'm really unsure here.. how do I extract each line from the txt file
> # # and use it as a variable?
> 
> $1 = $file;
> }
>    foreach $file
>      'mv $file $file+$addl'; 
> #      ^^^^^^^^^^^
> # I'm confused here too..
> 
> These are the biggest problem sfor me..
> Don't waste your time on the small syntax errors.. I'll figure them out
> Thanks a LOT. Konrad.
> 


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

Date: 11 Feb 1997 02:10:22 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: on the fly graphs
Message-Id: <5dokee$7le@fridge-nf0.shore.net>

Richard S. Boswell (sboswell@tamu.edu) wrote:

: I'm trying to write a program that will generate gifs of graphs on the fly
: for web publishing.  I need to generate simple graphs (line,bar,pie) for a
: simulation model.  There is the possibility of thousands of graphs, so to
: conserve disk space, we only want to generate graphs that are needed by a
: certain user.

You might look at GD.pm, and pgplot from a CPAN near you!
http://www.perl.com/perl/CPAN/

--
Nathan V. Patwardhan
nvp@shore.net
"[news:alt.fan.jwz]"


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

Date: 10 Feb 1997 21:12:45 -0500
From: groenvel@tholian.cse.psu.edu (John D Groenveld)
Subject: Re: OraPerl for Perl4 on Alpha running Oracle 7.3 ???
Message-Id: <5dokit$ghd@tholian.cse.psu.edu>

The newest versions of DBI and DBD::Oracle (Oraperl.pm) are archived on CPAN.
See http://www.perl.org/CPAN/modules/00modlist.long.html for details.

Happy perling,
John
groenvel@cse.psu.edu 


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

Date: 11 Feb 1997 06:54:09 GMT
From: aimee@interport.net (Aimee Schneider)
Subject: Perl Compiler for a large project
Message-Id: <5dp52h$dqq@park.interport.net>


Hi all.

 Has anyone out there used the perl compiler (either perl->C or
perl->bytecode) on a large-ish perl project and succeeded? Are there any
common pitfalls you could relate? Or conversely, if you wound up
abandoning it for reasons of complexity or whatever, those experiences
would be helpful too.

usenet or mail to the below address would be fine.

Thanks a lot in advance,
Eric
roark@phantom.com


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

Date: Tue, 11 Feb 97 06:40:07 GMT
From: shelle@interaccess.com (Michelle Feigen)
Subject: Perl For NT Question....
Message-Id: <5dp487$2so_008@interaccess.interaccess.com>

Does anyone have information pages on the generalities of working with Perl 
for NT.  Not installing...It's AFTER that that I need a little help.

Sorry...Actually got a customer not using UNIX.  

TIA

Michelle ----,-'-(@

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Michelle Feigen      ----,-'-(@      shelle@interaccess.com
                     MEAN PEOPLE SUCK!    
          http://homepage.interaccess.com/~shelle/
       http://homepage.interaccess.com/~shelle/grafx/       
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Tue, 11 Feb 1997 05:58:03 GMT
From: tch@acpub.duke.edu (Neal Hansch)
Subject: Perl NT Command Line
Message-Id: <330009ac.24810675@news.duke.edu>

Ok, here's a stupid question:

I am running NT Workastation with Perl 5 and I have associated ".pl"
with the perl.exe  :

When I do "perl program.pl > test.txt"  it outputs the program results
in the file just fine.

When I do "program.pl > test.txt" there is no output in the file (only
difference is I left the perl call out).

Why?

Any help greatly appreciated,
Neal

PS- I am very experienced with Perl on UNIX but trying to make the
move to NT. Please respond to "tch@acpub.duke.edu".




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

Date: 11 Feb 1997 02:09:13 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: problem sending mail from perl using cron
Message-Id: <5dokc9$7le@fridge-nf0.shore.net>

Benjamin J Trott (btrott@scuacc.scu.edu) wrote:

:    open(F, $f);
I suspect that this is your problem, and might be clarified if you
return some errors.  It's likely that your script doesn't know where to
find $f - you should probably do:

open(F, "$basedir/$file") || die("NO:$!\n");

:    @lines = <F>;
:    close(F);
:    foreach (@lines) { chop if (/\n$/); }

why not do: 

foreach  $line (@lines) {
   if($line =~ /\n/) {
      chop($line);
   }
}


:    foreach (@lines) { print MAIL "$_\n"; }

I don't think $_ has a value because the filehandle is already closed.
Why not send $_ to STDOUT for debugging?

foreach $line (@lines) {
    print MAIL $line;
}

Also, remove the unlinking until your script works.  It will make your
life easier.  :-)

--
Nathan V. Patwardhan
nvp@shore.net
"[news:alt.fan.jwz]"


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

Date: Mon, 10 Feb 1997 20:29:07 -0800
From: btrott@scuacc.scu.edu (Benjamin J Trott)
Subject: Re: problem sending mail from perl using cron
Message-Id: <btrott-ya023380001002972029070001@news.cds.sloc.net>

Hello...

Thank you for your reply and your suggestions... they helped quite a bit
(in that they made the script function as it should)... I am still a bit
confused, though...


In article <5dokc9$7le@fridge-nf0.shore.net>, nvp@shore.net (Nathan V.
Patwardhan) wrote:

> Benjamin J Trott (btrott@scuacc.scu.edu) wrote:
> 
> :    open(F, $f);
> I suspect that this is your problem, and might be clarified if you
> return some errors.  It's likely that your script doesn't know where to
> find $f - you should probably do:
> 
> open(F, "$basedir/$file") || die("NO:$!\n");

Thank you!! That did it... and it also helped me to feel like a real idiot,
as I absolutely should... :)

I do have a few other questions about what you wrote, though...

> 
> :    @lines = <F>;
> :    close(F);
> :    foreach (@lines) { chop if (/\n$/); }
> 
> why not do: 
> 
> foreach  $line (@lines) {
>    if($line =~ /\n/) {
>       chop($line);
>    }
> }

Are these different? Because I didn't think they were at all (except that
yours would seem to look for newlines anywhere, and chop even if the
newline is in the middle of the string)... I like writing it in a shorthand
notation... less typing... :) but if the results are different, then
perhaps I should change, hmm?


> :    foreach (@lines) { print MAIL "$_\n"; }
> 
> I don't think $_ has a value because the filehandle is already closed.
> Why not send $_ to STDOUT for debugging?
> 
> foreach $line (@lines) {
>     print MAIL $line;
> }

A similar thing here, I guess... isn't mine just shorthand, except that I
have the newline tacked on? And isn't $_ an element of the array @lines
here, not a value coming out of the filehandle? If I'm wrong, do please
tell me!


> Also, remove the unlinking until your script works.  It will make your
> life easier.  :-)

Actually, I didn't really have to... because your suggestion made my life
easier! Thanks again...

bye,
Ben Trott
btrott@scuacc.scu.edu


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

Date: Tue, 11 Feb 1997 14:59:18 +1300
From: Cameron Hart <cam@chch.planet.org.nz>
Subject: Question about File Descriptors
Message-Id: <32FFD276.3FCE6866@chch.planet.org.nz>

Hi there,

I am wondering if the is a perl command or library that will enable me
to perform the inverse of fileno? i.e. given a file descriptor returns
the name of the file handle.

Alternatively is there any way I can close a file by its file
descriptor?

Please reply by email if possible,

thanks,

Cameron.


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

Date: 10 Feb 1997 23:14:22 GMT
From: bsh20858@news.fhda.edu (Brian S Hiles)
Subject: Re: Search Engine in Perl
Message-Id: <5doa4e$vmc@tiptoe.fhda.edu>

Senthilvel Rangaswamy (senthil@ece.vill.edu) wrote:
: Hi All:
: Does anybody know where I can find a search engine written in Perl.
:
: "Out the 10Base-T, through the router, down the T1, over the leased line,
:  off the bridge, past the firewall.... nothing but Net."

http://www.informatik.th-darmstadt.de/~neuss/ice/ice.html # perl search engine

P.S. like your .sig!
P.P.S. I am sure there are more in any CPAN archive.

-Brian
--
   ,---.     ,---.     ,---.     ,---.     ,---.     ,---.     ,---.   
  /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \  
 .'  / \  `.'  / mailto:bsh20858@challenger.atc.fhda.edu \  `.'  / \  `.
__,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.__


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

Date: 11 Feb 1997 18:41:10 +1300
From: Phil Abercrombie <phil@comp.vuw.ac.nz>
Subject: Re: Settle an argument - to die or not to die?
Message-Id: <6wafpbgart.fsf@debretts.comp.vuw.ac.nz>

Chris Schoenfeld <chris@ixlabs.com> writes:

> 
> I write a lot of large-scale CGI tied to databases and the like.
> 
> I prefer to print a nice HTML message and die when I trap an bad error,
> that is, an error where something has definitely gone wrong, and the
> output will suffer at the least.

Steve Maguire has a lot of sensible things to say about this in his
book "Writing Solid Code".  (To summarise, he largely agrees with
you).

        -phil

-- 
 Phil Abercrombie
 +64 4 495 5126


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

Date: 11 Feb 1997 09:58:18 +0100
From: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: SIGCHLD and process ID
Message-Id: <vkzrain90t1.fsf@marlis.grenoble.hp.com>

Meena <meena@gwcom.com> writes:

> 
> Hi,
> 	I am new to perl. I am trying to write a watchdog monitor
> script in perl. This is supposed to run few processes after forking
> them.
> 
> 	Now whenever a child dies, the parent process try to bringup
> the child process back. The skeleton of my program is given below.
> 
> 	The problem in this script is, when I get the SIGCHLD, my
> signal handler doesn't know from which child process the signal
> was generated.
> 
> 	Is there a way for the parent process's signal handler
> to know which child process died? so that it can bringup the
> right process.
> 

Use wait or watpid (I don't remember which).

Hope this helps

-- 
Dominique_Dumont@grenoble.hp.com


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

Date: Tue, 11 Feb 1997 01:39:44 GMT
From: abigail@ny.fnx.com (Abigail)
Subject: Re: Sybperl & group by query
Message-Id: <E5F0M8.DIp@nonexistent.com>

On Mon, 10 Feb 1997 14:08:57 -0800, Sivakumar wrote in comp.lang.perl.misc,comp.databases.sybase:
++ Hi,
++ 
++ I have a query which has formatted headings and group by, computed by
++ clauses. I dont want to do any processing in perl. just want to dump
++ the output in the same format as returned by the query (thru isql).
++ i tried using 'sql()' fn. the heading is gone and the formatting is 
++ lost. only option is to run the whole query thru isql. is there any
++ other way using Sybperl (perl5/sybperl 2.06). thanks 


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

my $user    = "sa";
my $server  = "SERVER";
my $passwd  = "password";
my $command = "select * from sysobject where type = 'U'";
my $output  = `isql -U$user -S$server -P$passwd <<EOF
$command
go
EOF`;



No sybperl needed, just isql.



Abigail



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

Date: Tue, 11 Feb 1997 04:39:30 GMT
From: bits@icsi.net (Sean W. Ellis)
Subject: using sendmail
Message-Id: <32fff75c.2997809@snews.zippo.com>


I have a real problem.  I got some code to take down information and
send me some email, but it uses the Unix sendmail program which 
A:  Is no longer on the server I go to and 
B:  Will not be on the NT system the page will eventually end up on.
I need to take information and send an email or save this information
to a file to be downloaded.

I would rather have the email, how do I implement with something other
than sendmail or how do I implement on NT server?

Thank you,

Sean Ellis
bits@icsi.net


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

Date: Tue, 11 Feb 1997 10:06:00 +0100
From: Klaus Johannes Rusch <e8726057@student.tuwien.ac.at>
Subject: Re: using sendmail
Message-Id: <33003678.E86@student.tuwien.ac.at>

Sean W. Ellis wrote:

> B:  Will not be on the NT system the page will eventually end up on.
> I need to take information and send an email or save this information
> to a file to be downloaded.
> 
> I would rather have the email, how do I implement with something other
> than sendmail or how do I implement on NT server?

Probably a good question on a Windows NT newsgroup [FUP to
comp.os.ms-windows.nt.misc], as this is not at all related to Perl,
unless you intend to re-implement sendmail for Windows NT.

Klaus Johannes Rusch
--
e8726057@student.tuwien.ac.at, KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/


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

Date: Tue, 11 Feb 1997 09:31:04
From: elfriede.heilmeier@urz.uni-bamberg.de (Elfriede Heilmeier)
Subject: WIN32-Perl-script loops and wait for a file
Message-Id: <elfriede.heilmeier.25.000984D8@urz.uni-bamberg.de>

Hallo,

using WIN32 Perl on NT Workstation I have a Perl-script that
waits in a loop for a file that a C-Program creates. The C-Program
is a Serverprogram.
Because the Perl-Script is looping for ever if the C-Program was not 
started, I want to insert some lines in the Perl-Script that test 
the existance of the C-Program in the task list.

How to arrange this?
Thanks in advance.

Yours 
E. Heilmeier


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

Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Jan 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.

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 V7 Issue 925
*************************************

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