[12819] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 229 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 22 18:07:20 1999

Date: Thu, 22 Jul 1999 15:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 22 Jul 1999     Volume: 9 Number: 229

Today's topics:
    Re: ****Perl tutorials!!!!**** <kurumi@foad.org>
    Re: Aliasing long expresions (Neko)
    Re: checking if address is active <gellyfish@gellyfish.com>
    Re: checking if address is active (Steve .)
    Re: compile failed (doug edmunds)
    Re: concatenate (Tad McClellan)
    Re: concatenate (Larry Rosler)
        dereferencing sapronov@my-deja.com
    Re: doing an ls in PERL (globbing) (Tad McClellan)
    Re: doing an ls in PERL (globbing) <sariq@texas.net>
    Re: Executing system commands (Tad McClellan)
    Re: Geekspeak Programming Contest <marshalc@americasm01.nt.com>
    Re: getting the decimal portion of a floating point num <bivey@teamdev.com>
    Re: Help! <debot@xs4all.nl>
    Re: HTML on NT; how do I add docs? <gellyfish@gellyfish.com>
    Re: perl cgi <gellyfish@gellyfish.com>
    Re: Returning file handle from a subroutine (Tad McClellan)
    Re: RFC 1867, file upload <gellyfish@gellyfish.com>
    Re: searching man pages, perldoc's, FAQ's, README's, HO <dchristensen@california.com>
        teach-me grig@mic.ro
        USENIX Tcl/Tk Conference Call for Papers-Paper submissi (Moun Chau)
        waitpid crashes perl (Anno Siegel)
        What does this statement mean? kkmmperl@my-deja.com
    Re: What does this statement mean? <mlopresti@bigfoot.com>
    Re: What does this statement mean? <sariq@texas.net>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Jul 1999 16:39:57 -0500
From: kurumi <kurumi@foad.org>
Subject: Re: ****Perl tutorials!!!!****
Message-Id: <37978FAD.54C843E2@foad.org>

David Cassell wrote:
> 
> IlIIIIIIII wrote:
> >
> > at http://devlib.cjb.net, a great web site
> 
> Oh yeah.  A great web site.  Yuck.
> 
> Enough glitter to make you long for the <blink> tag.
> Enough traife to gag a pig.
> A list of programming directories that lists Perl/CGI as if
>     there is no other use for Perl.
> If you foolishly click there, you get a blank page.  [Okay,
>     I have Java and JavaScript disabled like any sane person
>     visiting a never-before-seen site.]
> It has a vote-for-your-favorite-language area which DOESN'T
>     WORK under the above conditions.
> 
> Another exciting virtualave.net production...  And people
> ask me why I'm not all excited about the Web.  :-(
> 
> David
> --
> David Cassell, OAO                     cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician

More about our Mr. IlIIIIIII:

DejaNews shows about 500 posts for him with the word "site" in the
title.
Almost all of them are (presumably) the same pattern: bunch of splats in
the title, a "great site" sentence, and his URL. He spams dozens of
programming groups, as well as an assortment of alt.sex and
alt.free-stuff groups.

In many messages (I only read a few, but I think the cockroach rule
applies here) he pretends to be a 3rd party who "found some great stuff"
at his own site ... pure spamoflage. 

He'll not get rich anytime soon. He sounded a little desperate in
c.i.w.a.h recently:

> [Any ideas for] promoting a web site? I've tried banner exchanges, promotion web sites, etc.
> and I still get 50-60 unique hits/day. this little traffic is getting
> discouraging, as is the fact that very few of the people who visit the front
> page go to the other pages. I believe that my sites are pretty good, better
> than other sites I've seen that get more traffic. so does anyone have any tips
> on promoting a web site? I don't mean hundreds of thousands of hits, but just a
> nice number? any suggestions or things you tried that helped, please send me a
> note
> 
> >You could try what a lot of the companies out here are doing - advertise on
> >TV, buy ads on buses, print your URL on your product packaging.
> 
> well, I can't afford any of that, so that's probably not going to happen....
> 
> I have two sites: a free stuff site and a programming site, they each have
> unique features, however I still am awaiting a great and really unique idea. I
> basically wanted general promotion tips, not the ones you see everywhere but
> "insider tips" if you will. I hesitated to link to other free stuff sites on my
> site because I didn't want my visitors to leave my site."

He only gets a handful of visitors despite his 500 posts, and they leave
immediately, despite all the "unique stuff" that makes his site "better
than many others he's seen."

ObCLPM: when porting ICE code to CGI.pm, I ran into code equivalent to:
  grep ($tot += $vals{$_}, sort keys %hash);
where values %vals are integers. There's an easy five strokes you can
cut
off that line...

-- 
kurumi
Teach yourself 'HTM programming': http://www.kurumi.com/opinion/htm.html


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

Date: 22 Jul 1999 21:44:21 GMT
From: tgy@chocobo.org (Neko)
Subject: Re: Aliasing long expresions
Message-Id: <7n83bl$20o$0@216.39.141.200>

On Thu, 22 Jul 1999 15:13:15 GMT, Sergio Bruno Fedi de Oro <sfedi@dc.uba.ar>
wrote:

>I want to alias a long dereferencing expresion, but it doesn't work...

In what way does it not work?

>		# Here's where I alias the array
>		*files = \@{$$ref_paquetes{$paquete_actual}};

You are dereferencing an array ref, creating a new array, and taking a ref to
it.  You are aliasing a *copy* of the array.  Is that what doesn't work?
Since you already have an array ref to start, just use it:

    local *files = $ref_paqetes->{$paquete_actual};

>#	Instead of:
>#		foreach $archivo_actual ( @{$$ref_paquetes{$paquete_actual}} ) {
>#	I want to use:
>		foreach $archivo_actual ( @files ) {

-- 
Neko | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=


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

Date: 22 Jul 1999 21:26:26 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: checking if address is active
Message-Id: <7n82a2$vq$1@gellyfish.btinternet.com>

On Thu, 22 Jul 1999 18:30:27 GMT Steve . wrote:
> We have a problem with a web site going down often.  I need to write a
> program that will basically hit the web site and return a value to a
> log, whether it successfully is running or not.  I can't use ping for
> the box is running, just the web interface is dead.  Thought of using
> a call to lynx, but wasn't sure how to determine success or failure
> with it.  Any ideas?  Thanks.
> 

Use the module LWP::UserAgent which allows you to use the HEAD request
method.  The module comes with excellent documentation and examples
include the LWP Cookbook (lwpcook.pod). 

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Thu, 22 Jul 1999 21:30:37 GMT
From: syarbrou@nospam.enteract.com (Steve .)
Subject: Re: checking if address is active
Message-Id: <379a8d5b.11717259@news.enteract.com>

Thanks,  any idea where the lastest versions are kept?  I can't find
it on perl.com or searching on yahoo.  Thanks.

STeve

On 22 Jul 1999 21:26:26 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:

>On Thu, 22 Jul 1999 18:30:27 GMT Steve . wrote:
>> We have a problem with a web site going down often.  I need to write a
>> program that will basically hit the web site and return a value to a
>> log, whether it successfully is running or not.  I can't use ping for
>> the box is running, just the web interface is dead.  Thought of using
>> a call to lynx, but wasn't sure how to determine success or failure
>> with it.  Any ideas?  Thanks.
>> 
>
>Use the module LWP::UserAgent which allows you to use the HEAD request
>method.  The module comes with excellent documentation and examples
>include the LWP Cookbook (lwpcook.pod). 
>
>/J\



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

Date: 22 Jul 1999 13:45:30 PST
From: edmundsXXX@pacifier.com (doug edmunds)
Subject: Re: compile failed
Message-Id: <8E0B8C1A8edmundsXXXpacifierXX@news.pacifier.com>

Failing lib/anydb.t on test 12:
Test 12 won't accept an empty string as a key
in a dbm context


See the message below, which was posted in another group back in March.

I had the same failure on install (only item) 
trying a fresh install of the latest perl tar.gz.  
In my case I have gdbm installed.  

There is a newer DB version from Berkeley.
Check out www.sleepycat.com for info about the updated DB.  They
say they have a new perl .pm for it (which changed the name), 
but I don't know if the standard perl installation will build
it.  

Read especially http://www.sleepycat.com/faq.html#A1
about the new pm.

Cart before the horse: the pm for the new DB requires perl to 
build it.  Does anyone know how/where to fiddle the perl
installation to add the build of this new pm?


Doug Edmunds


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


Subject: RE: Not OK: perl 5.00503 on i386-AT386-gnu 0.2 (UNINSTALLED) 
Date: 1999/03/31 
Author: Paul Marquess <pmarquess@bfsec.bt.co.uk> 
   Posting History    
 
From: Mark Kettenis [mailto:kettenis@wins.uva.nl]
 
>    Date: Tue, 30 Mar 1999 15:32:31 -0500
>    From: "Kurt D. Starsinic" <kstar@chapin.edu>
>
>    > The lib/anydbm.t failure is caused by the inability of Berkeley DB 2
>    > to deal with an empty key.  I see the same failure on my Linux system
>    > (with glibc 2.1).  I have not seen any other reports of this failure
>    > yet, but glibc 2.1 is not in wide use yet.  Moreover, people may
still
>    > have an old NDBM around which may hide the problem.
>
>        I've had the same problem on a glibc2.1 system.  I had assumed
>    it was a Berkeley DB problem or a DB_File problem, but now I'm
wondering
>    if it might be a glibc2.1 problem.
>
> It is certainly not a glibc 2.1 problem.  Berkeley DB 2 (glibc's
> default DB implementation) simply does not support empty keys.  And
> therefore the DBM emulation on top of does not support it either.
> Berkeley DB 1.85 is still available with glibc 2.1 (-I/usr/include/db1
> -ldb1).  I believe the author of Berkeley DB 2 (who also worked on
> 1.85) once said that empty keys were undocumented, and unsupported
> (they just happened to work).
 
Yep, null keys have been forbidden in Berkeley DB since 2.4.10. That's why I 
removed the tests that used null keys from the DB_File test harness. 
Unfortunately I forgot about anydbm.t :-(
 
> The use of empty keys should be
> discouraged, and maybe the particular test should be removed from
> Perl's testsuite.
 
or the test can be made to pass when anydbm is using DB_File. The patch below 
does that.
 
> Or maybe a workaround in the DB_File module is
> possible.
 
Don't think so. Anything I do will be a kludge.
 
Paul
 
*** anydbm.t.orig      Fri Jul 24 05:02:12 1998
--- anydbm.t    Wed Mar 31 09:08:40 1999
***************
*** 98,104 ****
  if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";} 
 
  $h{'foo'} = '';
! $h{''} = 'bar';
 
  # check cache overflow and numeric keys and contents
  $ok = 1;
--- 98,104 ----
  if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";} 
 
  $h{'foo'} = '';
! $h{''} = 'bar' if $AnyDBM_File::ISA[0] ne 'DB_File' ;
 
  # check cache overflow and numeric keys and contents
  $ok = 1;
***************
*** 115,121 ****
  print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n"; 
 
  print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n"); ! print ($h{''} eq 'bar' 
? "ok 12\n" : "not ok 12\n"); 
 
  untie %h;
  if ($^O eq 'VMS') {
--- 115,122 ----
  print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n"; 
 
  print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n"); ! print 
(($AnyDBM_File::ISA[0] eq 'DB_File' || $h{''} eq 'bar')
!              ? "ok 12\n" : "not ok 12\n"); 
 
  untie %h;
  if ($^O eq 'VMS') {

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

yashi@yashi.com (Yasushi Shoji) wrote in <19990718143745V.yashi@yashi.com>:

>hello,
>
>i just compiled perl5.005_03 + jperl5.005_03-990703.pat.gz on
>linux 2.2.x, glibc-2.1.1, egcs-2.91.66.
>
>i tried both
>$ CC=gcc ./configure.gnu
>$ sh Configure.
>
>and with either way, make test failed at anydbm test 12


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

Date: Thu, 22 Jul 1999 10:34:16 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: concatenate
Message-Id: <85a7n7.pia.ln@magna.metronet.com>

Dow (primus3@ix.netcom.com) wrote:

: How do you concatenate two strings together?


   What happened when you searched for 'concatenate' in the files 
   that came with your perl?

   I find 7 uses. I'll bet one of them has the answer to your question.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 22 Jul 1999 14:51:19 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: concatenate
Message-Id: <MPG.1201322dd4156d37989d1e@nntp.hpl.hp.com>

In article <37977868.C92BF625@aur.alcatel.com> on Thu, 22 Jul 1999 
14:00:40 -0500, Bruno Pagis <pagib@aur.alcatel.com> says...
> $ string3 = $string1 . $string2;

or

  $string3 = "$string1$string2";

or

  $string3 = join "", $string1, $string2;

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


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

Date: Thu, 22 Jul 1999 20:29:38 GMT
From: sapronov@my-deja.com
Subject: dereferencing
Message-Id: <7n7uv4$4vg$1@nnrp1.deja.com>

Hi folks!

I have written the following piece of code in Perl:

 $module = "lotus";
 ...
 require "$module.pm";
 $evnt_id = $module->parse_log($evnt_id, $log_file);

The "parse_log" function is called from "lotus.pm" and works just fine.
I am just curious how is the dereferencing going in this case, just the
academic interest :)

thanks a lot,
Alex


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 22 Jul 1999 10:30:14 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: doing an ls in PERL (globbing)
Message-Id: <mt97n7.pia.ln@magna.metronet.com>

Dow (primus3@ix.netcom.com) wrote:
: I'm trying to do the UNIX command - ls - in PERL script
: what I orginally was doing was globbing by assigning a directory to an
: array :


: @directory = </some/path/name/>


   You are missing a semicolon there.

   Please post real Perl code (using cut/paste), not Perlish pseudo-code.

   There is no wildcard part in '/some/path/name/', so you can
   *only* get zero or one element in @directory.

   So why use an array? A scalar will do.


: #Then I walked thru the array:
          ^^^^^^^^^^^

   Must have been a very short walk  :-)


: foreach $i (@directory){


   Why loop over an array that can be holding, at most,
   a single element?


: 	#here is where my problem is:
: 	@directory2 = <$i>;
: 	# I tried to create another glob but it won't work
                                                ^^^^^^^^^^

   What does it do?

   Won't compile/run?

   Dumps core?

   Returns nothing when it should return something?

   Returns too much stuff?

   Too little stuff?

   Returns stuff, but it is not the "right" stuff?

   Says bad things about your parent(s)?

   Something else? ...
 

: 	# I think it's because $i = 'some var'; and 
:  	# some var is in single quotes.  


   There are no single quotes anywhere in the code that you showed us.

   I have no idea what you are talking about there...


: I know that you can't
: 	# do a glob in quotes at all!  How do I remedy this or 
: 	# is there a completely different way of doing this?
: }


   Try using some globbing metacharacters in your glob:

     @directory = </some/path/name/*>


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 22 Jul 1999 15:48:28 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: doing an ls in PERL (globbing)
Message-Id: <3797839C.ACB04C51@texas.net>

Bruno Pagis wrote:
> 
> If you don't mind using existing code

Personally, I only use code that doesn't exist.  My programs don't do
much, but (knock on wood) I've *never* had a bug.

- Tom (with an uppercase T)


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

Date: Thu, 22 Jul 1999 10:14:19 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Executing system commands
Message-Id: <rv87n7.pia.ln@magna.metronet.com>

Jean-Marc Beaudoin (beaudoin.jean-marc@-NOSPAM-hydro.qc.ca) wrote:

: How can I execute an O/S command with perl?


   There are three "usual" ways ( exec() is a 4th, but if you don't
   know about the other 3, then you don't need to know about it :-)


   1)   system()

        perldoc -f system


   2)   qx//  (backticks)

        perldoc perlop


   3)   pipe open

        perldoc -f open


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 22 Jul 1999 16:41:00 -0500
From: Marshall Culpepper <marshalc@americasm01.nt.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <37978FEB.D7B1E2AD@americasm01.nt.com>

Tom Christiansen wrote:

> Here's a translation table to help techie programmer types talk with
> consumerist user types, and vice versa .  Yes, I know that there's
> a many-to-many mapping here; that's always true when translating one
> language to another.  Oh, some of these are slightly less than serious,
> and occasionally even slightly less than accurate.  I also intentionally
> de-alphabetized them so you could have more fun reading through.
>

ooo!! here's my list(this would be a modified list for Win* users):
vi = notepad
emacs = notepad
netscape = internet
IRC channel = chat room
grab = download
ls = dir
run = double-click
kill process = ctrl+alt+del
GNU = everything's free
message board = chat room
star office = ms office
cc/gcc = MSVC (yuck!)
corba = activex
read the docs = help file
tarball = zip
anti-christ(in some religions) = Bill Gates
kernel = OS
unmount = eject
mount = load
box = computer
GUI = windoze
compile = create/make
coding = creating/making a file
user = screen name
encryption = hard to read
check email = logon to email
IT = tech-support
guru = god
windoze = windows
video card = monitor
28.8bps = slow
eatting memory/processor = loading windows





>
>
> Your mission, should you choose to accept it, is to write a translator
> program than converts from one lingo to the other, or vice versa.
> Extra points will be given for having an especially amusing word list
> (you don't have to use mine), for handling plurals and capitals well,
> and in general, for hackish clevernesses.  The program should work for
> translating between other domains as well, such as East Coast vs West
> Coast jargon, programmer vs manager, etc.
>
> --tom
> --
>             Ivy, privy, famous; clamour
>             And enamour rhyme with hammer.

hope that's a pretty good list for ya tom...
~Marshall



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

Date: 22 Jul 1999 20:24:54 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: getting the decimal portion of a floating point number
Message-Id: <01bed480$5befd7e0$583c08cf@bill.jump.net>

Larry Rosler <lr@hpl.hp.com> wrote in article
<MPG.1200fd516ed2114e989d1d@nntp.hpl.hp.com>...

> The digits do not appear because you don't see them, not because they 
> are not there.  See below.

They weren't there because they were being handled in a manner
that conformed the output to a reasonable precision considering
the input. This behaviour has nothing to do with the internal
format except that certain operations (int, for example)
display it while others don't. We don't want it displayed,
hence, avoid int.


> Even the literal is an approximation.  You seem to have very little 
> understanding of internal binary floating-point representations, which 
> doesn't help you to formulate 'rational expectations'.

The original poster's expectations, not mine. Having written
several floating point, fixed point and rational math packages,
I wasn't surprised - why did you think I avoided int in the
first place even though it was the most common method used
when I first learned to program. (Back when I had to toggle
the bootstrap in on the front panel switches - those were
the days!) In fact, on a BCD machine, it still works great.

[...]
> Now please go away until you learn some computer 'science'.

I know the science, but I paid attention to the practical
question the poster asked. (As did several other people
who offered useful solutions, I might add.)-Wm




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

Date: Thu, 22 Jul 1999 23:23:59 +0200
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: Help!
Message-Id: <37978BEF.8CE6FA3B@xs4all.nl>

You can use something like this. You can call it like this:

if (!$in{'name'}) { &error; }

$in{'name'} could be anything.

sub error {
    print "<html><body background=/mybackground/location.jpg>";
    print "The form is incomplete";
}


karsten_beijer@my-deja.com wrote:

> I am using the perl script from my provider, I use an guestbook en form.
>
> Now Í want the same background  (my background) on every page.
>
> Í maem: if there is an error (because you didn't fill in your name)
> then come an white page, but I want mij page background
>
> You can e-mail me at karsten@reproshop.nl
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

--
Penpal International    , Searchy.net
http://www.debot.nl/ppi , http://www.searchy.net/
ppi@debot.nl            , support@searchy.net




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

Date: 22 Jul 1999 21:20:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HTML on NT; how do I add docs?
Message-Id: <7n81up$vn$1@gellyfish.btinternet.com>

On Thu, 22 Jul 1999 17:51:55 GMT kiansp@my-deja.com wrote:
> 
> That's my question... Which program takes care of this documentation?
> 

You can start by looking at what ppm.pl does.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 22 Jul 1999 21:11:38 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl cgi
Message-Id: <7n81ea$vk$1@gellyfish.btinternet.com>

On Thu, 22 Jul 1999 03:47:39 GMT Floyd Morrissette wrote:
> In article <7n5s86$dvh$1@nnrp1.deja.com>,
>   msdb159@my-deja.com wrote:
>> Why doesn't straight Perl CGI scale?
>>
> 
> Others here may know what you mean by this but I don't. What do you mean
> by scale?
> 

Y'know - Doh Rey Me Fa So La Tee ...

But maybe he's talking about shaving snakes .

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Thu, 22 Jul 1999 10:19:26 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Returning file handle from a subroutine
Message-Id: <e997n7.pia.ln@magna.metronet.com>

mike cardeiro (mikecard@my-deja.com) wrote:

: you could (maybe) pass a handle to the the subroutine:

: myopen('THIS_HANDLE',file);


   I thought you would show and example of passing a handle
   to the subroutine.

   So what is that example of passing a *string* to the 
   subroutine there for?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 22 Jul 1999 21:09:19 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: RFC 1867, file upload
Message-Id: <7n819v$vg$1@gellyfish.btinternet.com>

On Thu, 22 Jul 1999 18:59:18 GMT skao@my-deja.com wrote:
> I apologize for being hasty.  Thank you for the help.  Unfortunately, we
> are still using Perl 5.001; according to the CGI.pm documentation, it
> requires at least Perl 5.005.
> 
> The webmaster has informed me that he will not install additional
> modules.  


Aiee.  I think you might want to point your webmaster toward CERT it might
give him reason to upgrade to a more recent version of Perl ...

In the meantime I would suggest that you take a look at the actual code for 
CGI.pm to see how it is done - though having had a quick look now that
bit is fairly nasty ... check out the function read_multipart.  I am not
sure if cgi-lib.pl has this functionality builtin but it may be worth
taking a look and will be easier to get it to work with an older version
of Perl - I wouldnt normally recommend this mind so dont tell anyone I said
so ;-}.

But do try and persuade someone to upgrade the Perl as something that old
is very likely to get you into trouble and you are missing out on some
of the nicer features of the recent Perl.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Thu, 22 Jul 1999 13:38:04 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Re: searching man pages, perldoc's, FAQ's, README's, HOWTO's, etc.
Message-Id: <37977f4a@news5.newsfeeds.com>

Tom Phelps wrote in message <7mp2lb$kn1$1@agate.berkeley.edu>...
>In comp.lang.perl.misc, "David Christensen"
<dchristensen@california.com> writes:
>:Is there a way to search man pages, perldoc's, FAQ's, README's,
>:HOWTO's, etc.?
>
>Glimpse is a full-text search program, with very small indexes
>(3%-10%, depending on options).  TkMan provides a graphical
interface
>for man pages, Texinfo (aka GNU info) files, FAQs, and whatever
other
>directories you want indexed.  TkMan hyperlinks from a list of
hits to
>the corresponding document, with matching words highlighted.
>
>It's free software at http://http.cs.berkeley.edu/~phelps/tcltk/
>
>Tom

Sounds like just what the doctor ordered!  :-)

Do you know if there's a port of TkMan, PolyglotMan, and/or Tcl/Tk
for Windows?

--
David Christensen
dchristensen@california.com






  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 22 Jul 1999 20:45:07 GMT
From: grig@mic.ro
Subject: teach-me
Message-Id: <7n7vsg$5b0$1@nnrp1.deja.com>

Hello e-body!

Daniel G


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 22 Jul 1999 21:01:18 GMT
From: moun@usenix.org (Moun Chau)
Subject: USENIX Tcl/Tk Conference Call for Papers-Paper submissions due: 9/1/99
Message-Id: <FFAIE7.ArA@usenix.org>
Keywords: USENIX, Tcl/TK, Tcl, TK, conference, tutorials, training,  Invited Talks, research, Refereed Papers, Unix, Cross-Platform Development, CGI Scripting, Object Oriented Programing, Mega Widgets, Database, Client/Server Applications, extension Building, SWIG, C, Debugging, testing, Packaging, Java, HTTP Tcl Daemon, CGI-BIN, mapping, embedding, applications, commands, Data Objects, Tycho Slate, WinACIF, Iclient/Iserver, Distributed, language, management, Yacc, Corba, Novell, extensions, designing, supporting, deve

The 7th USENIX Tcl/Tk Conference is a forum to:
 * bring together Tcl/Tk researchers and practition
 * publish and present current work involving Tcl/Tk
 * learn about the latest developments in Tcl/Tk
 * plan for future Tcl/Tk related developments

Tcl/2K : The 7th USENIX Tcl/Tk Conference
      February 14-18, 2000
      Austin, Texas, USA
Sponsored by USENIX, The Advanced Computing Systems Association
---------------------------------------------------------------------------- 
Please find the Call for Papers at
http://www.usenix.org/events/tcl2k/cfp
----------------------------------------------------------------------------
Paper submissions due: September 1, 1999
Demonstration, and Panel Proposals due: September 1, 1999
Poster submissions due: December 8, 1999

The conference program will include formal paper and panel presentations,
poster and both reviewed and informal demonstrations, works-in-progress,
Birds-of-a-Feather sessions, and two-days of high-quality tutorials.  All
forms of participation provide an opportunity to report on original Tcl/Tk
research.

Formal papers should address topics of interest to experienced Tcl/Tk
programmers; posters and informal demos may be geared to any level of user
from beginner to expert. Awards will be given for the best
paper and best student paper at the conference.
============================================================================
The USENIX Association's international membership includes engineers,
system administrators, and computer scientists working on the cutting edge
of  systems and software.  Our conferences are recognized for their
technical excellence and pragmatic emphasis.

Summary: 
Followup-To: 
Distribution: world
Organization: USENIX Association
Keywords: 




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

Date: 22 Jul 1999 20:40:33 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: waitpid crashes perl
Message-Id: <7n7vk1$v60$1@lublin.zrz.tu-berlin.de>

Philip H. Dye <Philip_Dye@norstanconsult.com> wrote in comp.lang.perl.misc:
>Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in article 
>> Yes.  Perl isn't reentrant and malloc() (perl's or other) is a
>particularly
>> likely candidate.
>> 
>> >Has anyone run into this behavior before ?  Any known work arounds ?
>> 
>> A suggested workaround is to do as little as possible in the signal
>> handler, for instance just set a preset variable (not an undefined
>> one).  Of course, the main program will have to check that variable
>> periodically and act accordingly, which can be a nuisance to do.
>
>My signal handler is nearly a copy of the one on page 340 of Programming
>Perl.
>
>sub reaper
>{
>  my $child ;
>
>  while ( $child = waitpid(-1,WNOHANG) )
>  {
>    $Child_Status { $child } = $? ;
>  }
>}

Where on earth does this code come from?  My copy of the Camel has
on page 340:

sub REAPER {
  $waitedpid = wait;
  $SIG{CHLD} = \&REAPER; # loathe sysV
}

The code you claim is from the same Page is likely to loop forever.
Quoting perldoc -f waitpid:

=item waitpid PID,FLAGS

  Waits for a particular child process to terminate and returns the pid of
  the deceased process, or C<-1> if there is no such child process.  On some
  systems, a value of 0 indicates that there are processes still running.
  The status is returned in C<$?>.  If you say

Note that after all kids have been reaped, a return value of 0 won't
happen on any system.  So your code *must* end up in an infinite
loop eventually.

Perldoc goes on to give this example:

    use POSIX ":sys_wait_h";
    #...
    do { 
        $kid = waitpid(-1,&WNOHANG);
    } until $kid == -1;

Now, this is more reasonable.

While I still don't see how the loop would be more likely to give
you a segfault than a limited number of calls, I still suggest you
fix your reaper and see if you get better results.  Re-entering
malloc() is a possibility in a signal handler, but it usually
is a rare occurrence and non-paranoid programmers tend to clean
up the occasional core and go on with business.

[snip rest]

Anno


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

Date: Thu, 22 Jul 1999 20:35:43 GMT
From: kkmmperl@my-deja.com
Subject: What does this statement mean?
Message-Id: <7n7vav$549$1@nnrp1.deja.com>

Hi,
  I am a new to PERL.
  What does the following statement mean?

  @result=`mv $filename $archivedirectory`;

  Is it storing the result of the execution of the move statement in the
  array ?

Clarification is highly appreciated.

Thanks,
kkmmperl




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 22 Jul 1999 17:25:13 -0400
From: Matt <mlopresti@bigfoot.com>
Subject: Re: What does this statement mean?
Message-Id: <37978C38.CB3D5DA2@bigfoot.com>

Try assigning the variables a value then run the program and print out
@result, that should tell you.

kkmmperl@my-deja.com wrote:

> Hi,
>   I am a new to PERL.
>   What does the following statement mean?
>
>   @result=`mv $filename $archivedirectory`;
>
>   Is it storing the result of the execution of the move statement in the
>   array ?
>
> Clarification is highly appreciated.
>
> Thanks,
> kkmmperl
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.




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

Date: Thu, 22 Jul 1999 16:39:19 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: What does this statement mean?
Message-Id: <37978F87.1A399FAA@texas.net>

kkmmperl@my-deja.com wrote:

>   What does the following statement mean?
> 
>   @result=`mv $filename $archivedirectory`;
> 
>   Is it storing the result of the execution of the move statement in the
>   array ?

Did you try it?

- Tom


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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 V9 Issue 229
*************************************


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