[13506] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 916 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 26 21:07:43 1999

Date: Sun, 26 Sep 1999 18:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <938394309-v9-i916@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 26 Sep 1999     Volume: 9 Number: 916

Today's topics:
    Re: a question of buttons jlsimms@hotmail.com
    Re: Activestate on WIN98 error <cassell@mail.cor.epa.gov>
        chatacter spacing <ducott@intergate.bc.ca>
    Re: chatacter spacing <bwalton@rochester.rr.com>
        Help need with Gifgraph  module on Win32 <smith@lost-in-space.com>
    Re: Help need with Gifgraph  module on Win32 <mike@crusaders.no>
        how do i install perl5 ??? <lkarisny@email.msn.com>
    Re: how do i install perl5 ??? (Martien Verbruggen)
    Re: how do i install perl5 ??? <mike@crusaders.no>
    Re: how to "use" my variables in modules <uri@sysarch.com>
    Re: how to "use" my variables in modules (Bill Moseley)
    Re: how to "use" my variables in modules (Jeff Greer)
        How to play a wave file from another app <yngwie@home.com>
    Re: How to play a wave file from another app (Kragen Sitaker)
    Re: mSQL question about msqlimport ! <cassell@mail.cor.epa.gov>
        Multiple Option  <webmaster@outsource2000.com>
    Re: Need a unique "ID" string <flavell@mail.cern.ch>
        OLE and Microsoft Word <rrriley@jump.net>
    Re: Randomize array..... <cassell@mail.cor.epa.gov>
    Re: Randomize array..... (Kragen Sitaker)
    Re: remove the html tag in the file <mike@crusaders.no>
    Re: retrieving Win32 File Versions <cassell@mail.cor.epa.gov>
    Re: security question <elaine@chaos.wustl.edu>
        sleep + fork + exec != working (Graham Ashton)
    Re: using the System method <cassell@mail.cor.epa.gov>
    Re: Where did comp.lang.perl go? (Martien Verbruggen)
    Re: Why does my code NOT work? (Martien Verbruggen)
    Re: You should be admired, or What does this have to do <uri@sysarch.com>
    Re: You should be admired, or What does this have to do <tchrist@mox.perl.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 26 Sep 1999 23:32:24 GMT
From: jlsimms@hotmail.com
Subject: Re: a question of buttons
Message-Id: <7smaea$a4b$1@nnrp1.deja.com>

Unfortunately, using multiple buttons on a form isn't as easy as many
would like it to be.  You are correct - most people handle the
situation with a scriptiing language.  The problem is easy if you just
wanted, say, a submit button and a cancel button (not simply a reset
button), but any more than that is trickier.  For some examples of how
to handle this, the question should probably taken to
comp.infosystems.www.authoring.cgi, or somewhere similar.

Jason Simms


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sun, 26 Sep 1999 15:07:19 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Activestate on WIN98 error
Message-Id: <37EE9917.958D3C6@mail.cor.epa.gov>

James Ringrose wrote:
> 
> Anyone had a problem with Activestate build 519 APi519e.exe on Win98?
[snip of symptoms]

Since I haven't seen a helpful reply to your question, let me
suggest that you take this problem to the Perl-win32-Users
mailing list.  You can subscribe just by going to

http://www.activestate.com/support/mailing_lists.htm

But don't ask me why they have 'mailing lists' under Support.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sun, 26 Sep 1999 03:11:09 -0700
From: "Robert Valcourt" <ducott@intergate.bc.ca>
Subject: chatacter spacing
Message-Id: <37edefd1@carrera.intergate.ca>

Greetings.

I am having a problem with my perl file. What I have done is created a .pl
file that takes data from a web form, and writes the data to a file. This
works fine. I have another .pl file that takes the data from the file, and
inserts in into another web file. My problem is, lets assume someone writes
a 50 word sentence into the text box and submitts. The first .pl will write
the text to a file ALL WORDS ON THE SAME LINE When the second .pl file reads
that data and prints it to a web page, it places the text the same way, all
words on the same line. This stretches the page because the text doesn't
wrap. Below is what i'm doing.

#!/usr/bin/perl

print "Content-type: text/html","\n\n";

open(FROMFILE,"<infofile.txt");
               @a=<FROMFILE>;

print <<"(HTML)";

<html>
<head>
<title>Specials</title>
</head>

<body>
<table>
<td width="500"><pre>@a</pre></td>
</body>
</html>

(HTML)

close(FROMFILE);

exit(0);

Does someone know how I can make the text that is placed into the web page
wrap when it hit the table sides? The table is 500 pixels wide. currently it
forces the table to stretch according to the length of text placed into the
infofile.txt file.

Thanx All

Robert




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

Date: Sun, 26 Sep 1999 21:03:39 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: chatacter spacing
Message-Id: <37EEC26B.DA4B77C1@rochester.rr.com>

Robert Valcourt wrote:
> 
> Greetings.
> 
> I am having a problem with my perl file. What I have done is created a .pl
> file that takes data from a web form, and writes the data to a file. This
> works fine. I have another .pl file that takes the data from the file, and
> inserts in into another web file. My problem is, lets assume someone writes
> a 50 word sentence into the text box and submitts. The first .pl will write
> the text to a file ALL WORDS ON THE SAME LINE When the second .pl file reads
> that data and prints it to a web page, it places the text the same way, all
> words on the same line. This stretches the page because the text doesn't
> wrap. Below is what i'm doing.
> 
> #!/usr/bin/perl
> 
> print "Content-type: text/html","\n\n";
> 
> open(FROMFILE,"<infofile.txt");
>                @a=<FROMFILE>;
> 
> print <<"(HTML)";
> 
> <html>
> <head>
> <title>Specials</title>
> </head>
> 
> <body>
> <table>
> <td width="500"><pre>@a</pre></td>
> </body>
> </html>
> 
> (HTML)
> 
> close(FROMFILE);
> 
> exit(0);
> 
> Does someone know how I can make the text that is placed into the web page
> wrap when it hit the table sides? The table is 500 pixels wide. currently it
> forces the table to stretch according to the length of text placed into the
> infofile.txt file.

You want to use the Text::Wrap module.

> 
> Thanx All
> 
> Robert
-- 
Bob Walton


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

Date: Mon, 27 Sep 1999 00:44:27 +0100
From: "Drahno" <smith@lost-in-space.com>
Subject: Help need with Gifgraph  module on Win32
Message-Id: <37eeaf79_1@newsread3.dircon.co.uk>

Hi,

I am using ActivePerl on Win32, I would like to draw a Graph (.gif) using
GIFgraph package which I downloaded from cpan using PPM. I also downloaded
the GD package.

When I run the script I receive an error ( see below ), I am wondering if I
am missing any other packages in my environment.

I have included the code and the output:-

Example code: ( I copied this as an example to gain some experience )

use GIFgraph::pie;
$graphic = new GIFgraph::pie;
$graphic->set(
'title' => 'A Pie Chart',
'label' => 'Label',
'axislabelclr' => 'black',
'pie_height' => 80);
@data = (
["1st", "2nd", "3rd", "4th", "5th", "6th"],
[4, 2, 3, 4, 3, 3.5]);
$GIFimage = 'Demo.gif';
$graphic->plot_to_gif($GIFimage, \@data);
exit (0);




C:\>C:\WINNT\Profiles\Rimrunner\Desktop\t11.pl
Can't locate object method "gif" via package "GD::Image" at
C:/Perl/site/lib/GIFgraph/axestype.pm line 119.

C:\>


Any help will be appreciated

regards

John







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

Date: Mon, 27 Sep 1999 01:59:03 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Help need with Gifgraph  module on Win32
Message-Id: <eoyH3.1441$s82.7626@news1.online.no>


Drahno <smith@lost-in-space.com> wrote in message
news:37eeaf79_1@newsread3.dircon.co.uk...
> I am using ActivePerl on Win32, I would like to draw a Graph (.gif) using
> GIFgraph package which I downloaded from cpan using PPM. I also downloaded
> the GD package.
> When I run the script I receive an error ( see below ), I am wondering if
I
> am missing any other packages in my environment.
> C:\>C:\WINNT\Profiles\Rimrunner\Desktop\t11.pl
> Can't locate object method "gif" via package "GD::Image" at
> C:/Perl/site/lib/GIFgraph/axestype.pm line 119.

The newest version of the GD module (v1.6+) does not support the GIF-format.
IIRC the author can't afford the royality Unisys demands from authors of
software that generates gif-images, so now the GD-package is for generating
png-images instead. The GIFgraph module has been updated, and is now called
PNGgraph.

--
Trond Michelsen





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

Date: Sun, 26 Sep 1999 19:15:53 -0400
From: "Larry Karisny" <lkarisny@email.msn.com>
Subject: how do i install perl5 ???
Message-Id: <#Nko4JHC$GA.339@cpmsnbbsa05>

hey, can somebody help me.
i just downloaded perl 5 from perl.com and i dont know how to install the
thing.
i have never been able to install any of these compilers.
i downloaded the win32 vers. (i.e. winNT/95/98).
can somebody that has the windows version and installed it, please help me.
i am sure you can understand my problem.
Thanks
In
Advance
Luke Karisny




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

Date: Sun, 26 Sep 1999 23:32:39 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: how do i install perl5 ???
Message-Id: <r2yH3.36$Oy.2276@nsw.nnrp.telstra.net>

In article <#Nko4JHC$GA.339@cpmsnbbsa05>,
	"Larry Karisny" <lkarisny@email.msn.com> writes:
> hey, can somebody help me.
> i just downloaded perl 5 from perl.com and i dont know how to install the
> thing.
> i have never been able to install any of these compilers.

In that case you should probably download the ActiveState distribution
(The one from perl.com isn't, is it?), which just has one of those
executables that installs everything.

www,activestate.com

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd.       | bundled with your Microsoft product.
NSW, Australia                      | 


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

Date: Mon, 27 Sep 1999 01:37:07 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: how do i install perl5 ???
Message-Id: <w3yH3.1426$s82.7267@news1.online.no>

[Posted and CC'ed]

Larry Karisny <lkarisny@email.msn.com> wrote in message
news:#Nko4JHC$GA.339@cpmsnbbsa05...
> hey, can somebody help me.
> i just downloaded perl 5 from perl.com and i dont know how to install the
> thing.
> i have never been able to install any of these compilers.
> i downloaded the win32 vers. (i.e. winNT/95/98).
> can somebody that has the windows version and installed it, please help
me.
> i am sure you can understand my problem.

Get the Activestate-version instead.

http://www.activestate.com/ActivePerl/

--
Trond Michelsen





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

Date: 26 Sep 1999 18:54:31 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: how to "use" my variables in modules
Message-Id: <x7u2oh1dy0.fsf@home.sysarch.com>

>>>>> "JG" == Jeff Greer <jgreer@showmethenet.com> writes:

  JG> Here is my code.  Why can't I use $jeff in test.pl?  How do I
  JG> make this work?
  JG> ----------------------------------------------------
  JG> use test qw( jeff );

  JG> print "jeff = $jeff";

  JG> # test.pm

  JG> my $jeff = "jeff";

my used like that is file scoped. you can't declare a my var in one file
and see it in another with use or reqiure.

also you imply you want jeff imported with the qw( jeff ) but that is
wrong in 2 ways. you should use qw( $jeff ) since you want that variable
imported and you don't have a @EXPORT or @EXPORT_OK in your test.pm
file. read perlmod for more info how to export variables. and in general
you don't want to export variables as it can clutter your namespace.

uri

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


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

Date: Sun, 26 Sep 1999 16:13:49 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: how to "use" my variables in modules
Message-Id: <MPG.125848834caf42bd98978c@nntp1.ba.best.com>

Jeff Greer (jgreer@showmethenet.com) seems to say...
> Here is my code.  Why can't I use $jeff in test.pl?  How do I
> make this work?
> ----------------------------------------------------
> #!/usr/bin/perl -w
> # test.pl
> use test qw( jeff );
> 
> print "jeff = $jeff";
> 
> print "\n\n";
> ----------------------------------------------------
> #!/usr/bin/perl -w
> # test.pm
> 
> use strict; # enforce variable declarations and quoting
> package test;
> 
> my $jeff = "jeff";

$jeff is lexically scoped within package test.  It's like a private 
variable in that package.  Your line

> use test qw( jeff );

does nothing with $jeff.  $jeff would first have to be a _package 
variable_ (use vars), not a my variable, and then exported via 
Exporter.pm

Oh, sorry that's not very clear.  The docs are better.

Try perldoc perlmod
perldoc perlmodlib
perldoc Exporter



-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Sun, 26 Sep 1999 23:23:38 GMT
From: jgreer@showmethenet.com (Jeff Greer)
Subject: Re: how to "use" my variables in modules
Message-Id: <37f1a9e1.86976468@news-server.kc.rr.com>

[posted and emailed]

Thanks for the input.  I want to use good programming conventions
by avoiding global variables.   What is a good way to get
variables from .pm files?  I want to use "use strict;" in my
files.  Is this even possible?  I would like my code to run fast.
Don't all global variables bind at runtime?

On 26 Sep 1999 18:54:31 -0400, Uri Guttman <uri@sysarch.com>
wrote:

>>>>>> "JG" == Jeff Greer <jgreer@showmethenet.com> writes:
>
>  JG> Here is my code.  Why can't I use $jeff in test.pl?  How do I
>  JG> make this work?
>  JG> ----------------------------------------------------
>  JG> use test qw( jeff );
>
>  JG> print "jeff = $jeff";
>
>  JG> # test.pm
>
>  JG> my $jeff = "jeff";
>
>my used like that is file scoped. you can't declare a my var in one file
>and see it in another with use or reqiure.
>
>also you imply you want jeff imported with the qw( jeff ) but that is
>wrong in 2 ways. you should use qw( $jeff ) since you want that variable
>imported and you don't have a @EXPORT or @EXPORT_OK in your test.pm
>file. read perlmod for more info how to export variables. and in general
>you don't want to export variables as it can clutter your namespace.
--
Jeff Greer
B.S. computer science, University of MO - Rolla
--------------------------------------------------
Windows NT has crashed,
I am the Blue Screen of Death,
No one hears your screams...

If you don't have anything mean to say about 
Microsoft, don't say anything at all.


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

Date: Mon, 27 Sep 1999 00:10:43 GMT
From: David <yngwie@home.com>
Subject: How to play a wave file from another app
Message-Id: <37EEB57C.EAC53B81@home.com>

I need to send a wave file to x11amp from a cgi/perl script. I have the
wave name in a variable. How do I call another application to play the
wave?


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

Date: Mon, 27 Sep 1999 00:48:02 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How to play a wave file from another app
Message-Id: <69zH3.870$J66.100498@typ11.nn.bcandid.com>

In article <37EEB57C.EAC53B81@home.com>, David  <yngwie@home.com> wrote:
>I need to send a wave file to x11amp from a cgi/perl script. I have the
>wave name in a variable. How do I call another application to play the
>wave?

system() -- see perldoc -f system
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Sun Sep 26 1999
43 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Sun, 26 Sep 1999 15:12:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: mSQL question about msqlimport !
Message-Id: <37EE9A3C.180CD531@mail.cor.epa.gov>

tomwanginc@my-deja.com wrote:
> 
> Dear Friends:
> 
> When I try to load a data file into my database table by using the
> "msqlimport", it always gives me the following error message:
> 
>    "mSQL error at line 1: Non unique value for unique index"

Sounds like you don't have unique values for your index.

But this isn't a Perl question as you have formulated it.  You
won't get as useful an answer here as you would in a newsgroup
dedicated to databases.  Or a mailing list specifically for
mSQL.  Good luck.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sun, 26 Sep 1999 20:14:05 -0700
From: webmaster <webmaster@outsource2000.com>
Subject: Multiple Option 
Message-Id: <37EEE0FD.FDC02D9F@outsource2000.com>

Hello,

Can someone help me and tell me how to handle multiple selection from a
dropbox in my form? I have a form that let user to choose from a
dropbox. User can hold CTRL key down a select multiple choices. How do I
pass this choices into my script?

Please help

Sincerely,

Martin



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

Date: Mon, 27 Sep 1999 01:00:46 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Need a unique "ID" string
Message-Id: <Pine.HPP.3.95a.990927005601.662A-100000@hpplus03.cern.ch>

On Sun, 26 Sep 1999, Rik. wrote:

Mercifully quotes the entire two-dozen lines of the posting, including
the sig.  Not quite such a sure-fire bogosity alert as the upside-down
quoting style that Microsoft have apparently recommended to its
impressionable acolytes, but still a valuable indicator.  In order to
announce to the assembled usenauts: 

> Try the users IP plus time.

You either haven't been reading, or haven't understood, this thread.

Either way, please don't adopt standard usenet netiquette until you have
garnered a clue.  The warning indicators are too valuable.



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

Date: Sun, 26 Sep 1999 18:13:09 -0500
From: "Ron Riley" <rrriley@jump.net>
Subject: OLE and Microsoft Word
Message-Id: <7sm8os$fqf$1@news.jump.net>

I'm writing a script to search Word 97 docs with Perl. I have made some
progress, but I cannot figure out how to search the text in the headers and
footers. Can someone point me to a source of more info or examples? I've
looked in the OLE docs but didn't find much word-specific stuff.

Here's what I have so far (excerpts):

#Start Word
$application = Win32::OLE->new('Word.Application')
   or warn "Couldn't create new instance of Word App!!";

# Define Documents collection
$docs = $application->Documents;


      # Define the current working document
      $currentdoc = $docs->Open("$fullname")
              ||die "can't open $fullname\n";

      $mainStory = $currentdoc->Content;

      while ($mainStory->Find->Execute("$opt_s")){
         $foundit++;
     }

This all works fine, but like I said, I can't figure out how to get to the
header/footer text.

Thanks,

Ron.Riley@frco.com




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

Date: Sun, 26 Sep 1999 15:25:33 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Randomize array.....
Message-Id: <37EE9D5D.D6F07DD6@mail.cor.epa.gov>

Yanick Champoux wrote:
[snip of request]
> 
> Easy:
> 
> #! /usr/bin/perl
> 
> srand;
> 
> my @num = ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 );
> 
> @result = sort By_Random @array;
> sub By_Random
> {
>   return (-1,1)[rand(2)];  # return -1 or 1 at random
> }
> 
> print join ' ', @result, "\n";

Interesting.  And why is this better than the implementation
of the Fisher-Yates algorithm which is given in the FAQ ?
IIRC, Fisher-Yates is O(N).

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Mon, 27 Sep 1999 00:37:56 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Randomize array.....
Message-Id: <E%yH3.857$J66.98920@typ11.nn.bcandid.com>

In article <slrn7usun4.88i.abigail@alexandra.delanet.com>,
Abigail <abigail@delanet.com> wrote:
>bowman (bowman@montana.com) wrote on MMCCXVII September MCMXCIII in
><URL:news:37EE6E5E.1A2458EC@montana.com>:
>`` HKS wrote:
>`` > 
>`` > number in the "@result" array.. (e.g "2,3,5,2,1,6") which i dont want.  is
>`` > there any way i can make sure the result will not contain any duplicate
>`` > numbers?
>`` 
>`` There are a couple of common 'shuffle a deck of cards' algorithms. 
>`` 
>`` 1: create an array  1..6 , select an element at random and place it into
>`` the
>``    output array. Compact the original array to 5 elements, and so forth.
>
>That's a quadratic algorithm.

That depends on how you compact it.  If your compacting takes constant
time, it is a linear algorithm.  An easy way to do the compaction in
constant time is to copy the last element over the one you just
selected, then shorten the array length by 1.  (Of course, just as the
FAQ says, splice() is not constant-time, but linear-time, so it is a
quadratic algorithm if you use splice() to compact the array.)
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Sun Sep 26 1999
43 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 27 Sep 1999 01:29:59 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: remove the html tag in the file
Message-Id: <OYxH3.1422$s82.7487@news1.online.no>


Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:7sm40l$dmq$1@gellyfish.btinternet.com...
> At this point I might add that I got mailed by someone from rebol.com:
> <QUOTE>
> I found you in a Perl discussion group and would like to inquire if you
> might be interested in working with the REBOL language.
[...]
> </QUOTE>
> Sounds like some sort of crusade to me.

Weird. I hoped the people at REBOL would be smarter than this.

REBOL is one of those languages I was thinking of learning a couple of years
ago (when it was still called MAGMA), but for some reason I never got around
to it. Since I'm an old Amiga-fanatic, I'll probably trust anything that's
developed by Carl Sassenrath  ( http://www.sassenrath.com/carl.html ), so
REBOL is still pretty high up on my list of things I might want to look into
real-soon-now.

> What was that other 'language' that they were pushing like this last year
?

Isn't that the one that was spoofed here a few days ago?

--
Trond Michelsen





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

Date: Sun, 26 Sep 1999 15:17:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: retrieving Win32 File Versions
Message-Id: <37EE9B70.AB31F604@mail.cor.epa.gov>

Guy Corngood wrote:
> 
> Newbie Question:
> 
> Is it possible to grab the File Version of a file on a Win32 platform with
> Perl?  Is this ability built into to Perl or is there a module out there
> that will make this possible?  I have been unable to locate any info on
> this...

I think a code snippet to do this was posted in the Perl-Win32-Users
mailing list within the last few weeks.  You can subscribe to that
mailing list [or read through its archives] by going to:

http://www.activestate.com/support/mailing_lists.htm

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sun, 26 Sep 1999 19:54:22 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: security question
Message-Id: <37EEB223.76537F03@chaos.wustl.edu>

michael yanai wrote:
> if my perl cgi script run ok with the -T( taint check )
> does this mean that it is safe and can not be used
> to hack my server?

perldoc perlsec would be a good place to read about security

e.


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

Date: 26 Sep 1999 22:44:32 GMT
From: graham@mirror.bt.co.uk (Graham Ashton)
Subject: sleep + fork + exec != working
Message-Id: <slrn7ut8e1.ohj.graham@wing.mirror.bt.co.uk>

I'm exec()-ing a command from within a child process (that I created
with fork), and it appears as though the process being exec()'d is
interferring with the operation of the parent; I've got a sleep
statement (actually imported from Time::HiRes) that keeps getting
interrupted.

I suspect that the child is interrupting the parent with a signal of
some sort if the command fails, but I can't find mention of that
behaviour of fork() anywhere. The timing works as expected if I comment
out the call to exec() though.

Here's a cut down (and tested) snippet of code to give you an idea of
what I'm doing;

---cut---
shandy% cat test 
#!/usr/bin/perl -w

use Time::HiRes qw( sleep );
$SIG{CHLD} = 'IGNORE';

print "parent's pid: $$\n\n";
foreach (1 .. 4) {
    print "time: ", scalar localtime, " [$$]\n";
    sleep(5);
    my $pid = fork();
    die "Can't fork: $!\n" unless defined $pid;
    if ($pid == 0) {
        ## child
        exec('ping -c 1 foo.');
    }
}
---cut---

When I run it it behaves (to my mind, probably not in reality) rather
strangely, in that it appears to miss out some calls to sleep() altogether.
Surely I'm handling the signals with $SIG{CHLD} = 'IGNORE' ?

---cut---
handy% perl test 
parent's pid: 3140

time: Sun Sep 26 23:31:17 1999 [3140]
time: Sun Sep 26 23:31:22 1999 [3140]
ping: unknown host foo.
ping: unknown host foo.
time: Sun Sep 26 23:31:22 1999 [3140]
time: Sun Sep 26 23:31:27 1999 [3140]
ping: unknown host foo.
ping: unknown host foo.
---cut---

Help! If there's a specific doc pointer that covers it I'd appreciate
it; I've read perlipc to no avail.

-- 
Graham


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

Date: Sun, 26 Sep 1999 15:20:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: using the System method
Message-Id: <37EE9C24.7B65307E@mail.cor.epa.gov>

Yaron Cohen wrote:
> 
> im having problems using the System method in order to start Visual Basic
> and have it compile a project.
> in order to do this i pass VB the name of the project and /make ,so i pass
> to the system method 3 parameters : "c:\program files\vb\vb5.exe"
> "c:\temp\myproject.vbp" /make.
> on windows 95 and 98 it works just fine but not on NT.
> for some reason NT opens vb and load the project but does not compile it.

You posted this same question Friday, and I gave you some advice
then.  If you're going to re-post this, the least you could do is
to follow my advice and report back on what errors you received,
and *precisely* what happens.

Another fun feature of Win32: some programs will not do
what you want in this circumstance unless you put the word
'start' in front of the call within system().  You could
try that as well.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sun, 26 Sep 1999 23:23:33 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Where did comp.lang.perl go?
Message-Id: <VVxH3.27$Oy.2276@nsw.nnrp.telstra.net>

In article <7sm0eq$tc2$1@voyager.cistron.net>,
	"Rik." <rusenet@bigfoot.com> writes:
> Strange. :-)
> I read other messages in the group this afternoon:-)

The group still exists on a few news feeds where the admins still
haven't realised it became defunct years ago. You'll see a few
messages on there, but they'll be restricted to the few servers that
still carry it. The safest thing to do is to ignore its existence. And
it would be a good idea to inform your news admin that comp.lang.perl
is long dead, and should be removed from their feed.

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd.       | cynical. It's perfectly easy to be
NSW, Australia                      | cynical.


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

Date: Sun, 26 Sep 1999 23:27:52 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Why does my code NOT work?
Message-Id: <YZxH3.33$Oy.2276@nsw.nnrp.telstra.net>

In article <7slv2f$osd$1@voyager.cistron.net>,
	"Rik." <rusenet@bigfoot.com> writes:

> #!/usr/local/bin/perl

no -w
no use strict

Both will help you to write correct code mor eeasily.

> $buffer = $ENV{'QUERY_STRING'};
> 
>  @pairs = split(/&/, $buffer);
>
>  foreach $pair (@pairs) {
>  ($name, $value) = split(/=/, $pair);
>   $value =~ tr/+/ /;
>  $value =~ s/%(..)/pack("c", hex($1))/eg;

And this is where you go wrong. CGI isn't that trivial. If you insist
on writing your own code to parse this sort of stuff, you really need
to do it correctly. If you'd rather use the expertise of other people
who have done this for you, you use the CGI module that comes with
perl:

use CGI;

And to read the manual:

# perldoc CGI

You might also want to read perlfaq9

# perldoc perlfaq9

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | 
Commercial Dynamics Pty. Ltd.       | "Mr Kaplan. Paging Mr Kaplan..."
NSW, Australia                      | 


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

Date: 26 Sep 1999 19:08:59 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: You should be admired, or What does this have to do with Perl?
Message-Id: <x7ogep1d9w.fsf@home.sysarch.com>

>>>>> "DW" == Dan Woods <dwoods@ucalgary.ca> writes:

first, you stealth cc'ed me which is very bad. mark a cc and post with
soemthing. your newsreader should be able to do it.

  >> the fact that perl is more popular than any of the technologies you
  >> mentioned?

  DW> That depends on what you mean by popular.  I would classify Perl,
  DW> UNIX, C, Java, sh/csh/ksh/awk, Vi/Emacs editors into the category
  DW> of "definitely not for beginners".  Once you get good at them, you
  DW> love them for the power and flexibility they allow you to do
  DW> programming.

popular as in any twit who gets their own web page will try to learn
perl but won't go near any of those. for one thing almost all the
newbies are on redmondware and those tools are unix (mostly, though any
POB using them will have half a brain).

  DW> I also follow comp.lang.java.programmer which usually has more posts
  DW> than this group, and if you follow for a week you'll see a difference
  DW> in the atmosphere of responses.  You can image how many newbies go
  DW> to that group because they that's the new 'cool' thing to do because
  DW> of java applets.  Most questions (even stupid ones) are answered quite
  DW> politely, or directed where to look.  The only times I see flaming
  DW> are against students trying to get their homework done for them,
  DW> job agency postings, favorite IDE's (GUI) to use, or C vs Java debates.

but they don't get the high volume of low level posts. if we got only a
few a day, i am sure the heat would cool off here. but since perl is the
lingua franca of clueless newbie webmasters we get inundated with FAQs,
OT posts, and lusers who don't rtfm or any docs for that matter. my
latest favorite is this one:

>>>>> "r" == rommelhere  <rommelhereNOroSPAM@YAHOO.COM.invalid> writes:

  r> Hello All,
  r> I'm a perl newbie. i have to write a Webserver in perl.

  r> Please suggest resources\modules and  possible approach i
  r> should take.

  r> Any help will be greatly appreciated,
  r> regards,

do you get that in the other groups? i doubt it. we get those all day
long. if you tried to deal with them you would lose patience too. notice
how almost all the regulars act this way? we are all tired of this and
so we try to hold back the tide by frying the fry. notice how all the
regulars will post cogent and calm replies to decent queries. we just
ask that they follow some conventions like no jeapoardy posting, actual
code examples, no off topics, etc. 

  >> not exclusivity, but a lack of respect for those that don't do their
  >> homework. you don't get that sort of post in very specialized groups.

  DW> I have no problem with that, but doesn't everyone deserve a first
  DW> chance.  I can't imagine someone working at help desk (and this
  DW> group is a big one) and answering questions in a "could be worded
  DW> more nicely" response.

this is not a paid help desk. big difference. anyway i once got my
employer's help desk person to cry by telling her how to fix the screwup
they made. i got flamed back by her boss. (ask me about the stupidity
the sysadmins did to me).

  >> but we ARE a bunch of high school geeks (with stock options and
  >> mortgages and wives, etc.) we just don't like the script kiddies without
  >> those things.

  DW> And if those kiddies learn Perl well, later they'll also have the
  DW> same things, and be the ones answering questions in the manner
  DW> they are learning from this current batch of experts... circle of
  DW> life <grin>

that hasn't happened yet. we rarely see new regulars here who can answer
questions well. occasionally newbies or intermediates try and they tend
to post bugs or worse. so the next generation hasn't matured yet (and
who knwos if they will ever do that).

  DW> P.S. thanks for taking the high road with your response, appreciated.

i can do it if i am in the mood. you didn't press my flame button.

uri

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


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

Date: 26 Sep 1999 18:14:01 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: You should be admired, or What does this have to do with Perl?
Message-Id: <37eeb6c9@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, Dan Woods <dwoods@ucalgary.ca> writes:
:To be more specific (or clearer), I meant they aren't the easiest
:ones to learn. They take time and experience to to "get it".

Yes, they do, and they don't pretend that they don't.  That's one of the
nice things about them.  "Ease of long-term use" is far more important
than "ease of proficiency within five minutes without R'ingTFM".

Those tools make no attempt to hoodwink the general public addicted to
immediate gratifiation into mastery without a bit of scholarship and
something like real work.

Just like Perl.

--tom
-- 
"The Earth is degenerating these days. Bribery and corruption abound.  Children
 no longer mind their parents, every man wants to write a book, and it is
 evident that the end of the world is fast approaching."
				- Assyrian Stone Tablet, c.2800BC


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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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