[9364] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2959 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 24 12:27:31 1998

Date: Wed, 24 Jun 98 09:00:38 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 24 Jun 1998     Volume: 8 Number: 2959

Today's topics:
    Re: a bit confused about seek (Abigail)
        Cancelled: Chicago/Unix/Perl/Randal/TV show! (Bill Huston )
    Re: Flames.... (Abigail)
        graphs for perl.. <chris@townnews.com>
    Re: graphs for perl.. <rootbeer@teleport.com>
    Re: graphs for perl.. <quednauf@nortel.co.uk>
    Re: graphs for perl.. <zkessin@lhr-sys.dhl.com>
    Re: Help with guestbook PLEASE <cnc23a@nortel.com>
        Help: PERL Library path <ping.cui@daytonoh.ncr.com>
        if ($x < $y) { gives Odd number of elements in hash lis <david.martin@biotek.uio.no>
    Re: if ($x < $y) { gives Odd number of elements in hash <rootbeer@teleport.com>
        LOCALE trouble -Please help (Franz Kaufmann)
        Nested form components jwflynn@wsicorp.com
    Re: Nested form components <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Nested form components <quednauf@nortel.co.uk>
    Re: Nested form components (Steve Linberg)
    Re: newbie Location: syntax help wanted <psdspss@execpc.com>
    Re: newbie Location: syntax help wanted <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: newbie Location: syntax help wanted <jthscifi@yahoo.com>
    Re: Newbie Question again <psdspss@execpc.com>
        NEwbie question: how do I find string length? <alwang@oculus.lvl.pri.bms.com>
    Re: NEwbie question: how do I find string length? <quednauf@nortel.co.uk>
        Perl question: newbiw help please! crump@shell1.cybercom.net
    Re: Q:How to send content to browser <bowlin@sirius.com>
        Running Perl Scripts from a C prog <bruce.browning@tivoli.com>
    Re: Running Perl Scripts from a C prog <rootbeer@teleport.com>
    Re: system() and security again <tchrist@mox.perl.com>
    Re: system() and security again (Larry Rosler)
    Re: system() and security again (Marc Haber)
        Text manipulation with packed fields <Philip@Antoniades.com>
    Re: What a Crappy World (oh, yes!) <quednauf@nortel.co.uk>
    Re: What a Crappy World (oh, yes!) <katzman@students.uiuc.edu>
        What a Crappy World <katzman@students.uiuc.edu>
    Re: What a Crappy World (Chris Nandor)
    Re: What a Crappy World (jeremy howard todd)
    Re: What a Crappy World <katzman@students.uiuc.edu>
    Re: What a Crappy World (Michael J Gebis)
    Re: Would someone tell me what this means? <rbowen@databeam.com>
        wwwborad and win95 <sibil@infinit.com.pl>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 24 Jun 1998 15:47:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: a bit confused about seek
Message-Id: <6mr71t$jul$2@client3.news.psi.net>

F.Quednau (quednauf@nortel.co.uk) wrote on MDCCLVIII September MCMXCIII
in <URL: news:3590E520.D1A5B431@nortel.co.uk>:
++ 
++ Of course, I say now. Interesting also that seek never dies, say, when you
++ access a point which is beyond EOF.

I guess that can also be considered a feature. Most likely, Perl copied
the behaviour of the system call. Who knows, maybe if Perl gets configurable
warnings seeking past EOF can be made an optional warning. 

++ Well, it is not so much a problem for the program in which I'd like to use se
++ but out of curiosity. Anyone knows a way to jump to line 21? It looks like th
++ is no way to do that, apart from maybe running through the file and counting 
++ occurrences of \n. Hmm...


Either you count newlines, or you switch to something like VMS. The Unix
filesystem uses a flat "steam" model. There's nothing magical about a
newline. While this obviously has advantages, it makes certain things
that are line based harder, or less efficient.

Seeking to a specific line is one of the thinks that's much harder.

Note that if you need to seek to beginning of lines a lot, it pays
to scan the file once and build an index. There should be modules out
there that do this for you.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: 24 Jun 1998 15:07:32 GMT
From: bhuston@zeus.anet-chi.com (Bill Huston )
Subject: Cancelled: Chicago/Unix/Perl/Randal/TV show!
Message-Id: <6mr4nk$jee$1@news1.anet.com>

Sorry, couldn't get a studio. 

I will probably be taping the lecture at the downtwn library: 
Harold Washington Library (400 South State Street) on Saturday, June
27th, at 12:00. 

See you there,
Bill Huston

Bill Huston (bhuston@zeus.anet-chi.com) wrote:
: As you might have heard, Randal Schwartz is coming to the Windy City,
: as a guest of the Chicago Perl Mongers. We are frantically trying to
: coordinate a TV interview, for an upcoming cablecast on surbarban
: TCI ch 35. 



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

Date: 24 Jun 1998 15:40:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Flames....
Message-Id: <6mr6kn$jul$1@client3.news.psi.net>

Chris Nandor (pudge@pobox.com) wrote on MDCCLVIII September MCMXCIII in
<URL: news:pudge-2406980854210001@dynamic448.ply.adelphia.net>:
++ In article <6mq0gk$aer@newsserver.trl.OZ.AU>,
++ ac1@fspc.netsys.itg.telecom.com.au (nobody) wrote:
++ 
++ # Are these roman dates correct?  I read the following as:
++ #    1754 September 1993.
++ 
++ use Date::Parse;
++ use Roman;
++ print scalar localtime(
++     str2time(sprintf('Sep 1, %s', arabic('MCMXCIII')))
++     + 86400 * arabic('MDCCLIV')
++ );
++ __END__
++ 
++ Sun Jun 21 00:00:00 1998


Fencepost error.



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


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

Date: Wed, 24 Jun 1998 14:21:55 +0000
From: Chris Dorr <chris@townnews.com>
Subject: graphs for perl..
Message-Id: <35910B83.C49254AB@townnews.com>

I'm new to Perl and wanted to know if there is a way to make graphs in
perl and then display them on webpages.  If someone could help me out
with this please get in touch with me.  I basically just want to know if
it's possible and then I'll be off and running.

Thanks,

Chris Dorr



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

Date: Wed, 24 Jun 1998 14:25:40 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: graphs for perl..
Message-Id: <Pine.GSO.3.96.980624072422.16155Y-100000@user2.teleport.com>

On Wed, 24 Jun 1998, Chris Dorr wrote:

> I'm new to Perl and wanted to know if there is a way to make graphs in
> perl

Yes, you can do that.

> and then display them on webpages. 

Yes, you can do that, too.

> If someone could help me out with this please get in touch with me.  I
> basically just want to know if it's possible and then I'll be off and
> running. 

It's hard to find something that's _not_ possible in Perl. :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 Jun 1998 15:44:50 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: graphs for perl..
Message-Id: <359110E1.A72BC3BA@nortel.co.uk>

Chris Dorr wrote:
> 
> I'm new to Perl and wanted to know if there is a way to make graphs in
> perl and then display them on webpages.  If someone could help me out
> with this please get in touch with me.  I basically just want to know if
> it's possible and then I'll be off and running.
> 
> Thanks,
> 
> Chris Dorr

It is possible, my deer. Now run, my deer, run!
Answers your question, doesn't it?

Oh well. There's the GD library adapted for Perl to produce Giffiles. And
there's something called Gifgraph as well. Yuo will find all this and more at
your friendly local CPAN.


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 24 Jun 1998 16:01:35 +0100
From: Zachary Kessin <zkessin@lhr-sys.dhl.com>
Subject: Re: graphs for perl..
Message-Id: <m3ogvi3kts.fsf@pc-hhu-52.lhr-sys.dhl.com>


Tom Phoenix <rootbeer@teleport.com> writes:

> 
> > If someone could help me out with this please get in touch with me.  I
> > basically just want to know if it's possible and then I'll be off and
> > running. 
> 
> It's hard to find something that's _not_ possible in Perl. :-)

No its not, just check under "Non-computable" in any cosi book. :)

Halting problem anyone.

--Zach


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

Date: Wed, 24 Jun 1998 09:51:41 -0400
From: Ken M Edwards <cnc23a@nortel.com>
Subject: Re: Help with guestbook PLEASE
Message-Id: <3591046D.4C60B80F@nortel.com>

Daniel J Adams wrote:

> Shouldn't
>
> open (FILE,"$guestbookreal") || die "Can't Open $guestbookreal:
>
> read
>
> open (FILE, "$guestbookreal") || die "Can't Open $guestbookreal\n";
>
> (note semicolon at end)
>
> I think

Good point,

However, if this was just a typo, and the problem is something else,
check permissions on the file you are opening.  If it is not readable by
world, the open will fail in an "Internal Server Error" type message.

Ken

















>
>
> Bill wrote in message <358dbfb0.68926330@news.insync.net>...
> >Hi, I am trying to make a guestbook perl file work.  I keep getting an
> >error and I narrowed it down to the following lines.  This is where
> >the error occurs.  ($guestbookreal is pointed to the right address.)
> >
> >##start##
> ># Begin the Editing of the Guestbook File
> >open (FILE,"$guestbookreal") || die "Can't Open $guestbookreal:
> >#$#$!\n";
> >@LINES=<FILE>;
> >close(FILE);
> >$SIZE=@LINES;
> >##end##
> >
> >The line that the error occurs at is the open statement.  The error it
> >gives me is:
> >
> >Internal Server Error
> >





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

Date: Wed, 24 Jun 1998 10:18:46 -0400
From: Ping Cui <ping.cui@daytonoh.ncr.com>
Subject: Help: PERL Library path
Message-Id: <35910AC6.C38B2AD9@daytonoh.ncr.com>

Hi, everyone:
      This might be a stupid question. My understanding is @INC contains
a list of
path names that Perl executable will look for the standard modules or
libraries. For example,
@INC normally contains following pathes:
 /usr/local/lib/perl5/$ARCH/$VERSION
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/site_perl/$ARCH

Here is the contents of my @INC:
(/usr/local/lib/perl5/att3_x86/5.002 /usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/att3_x86 /usr/local/lib/perl5/site_perl
 .)

    The question is: Can I put the standard Perl library manually into
any of these directories?

I put all the library files manually into /usr/local/lib/perl5 and I got
an error like this:

Can't locate Getopt/Long.pm in @INC at tmp9.pl line 4.
BEGIN failed--compilation aborted at tmp9.pl line 4.

However, if I put the library files in the directory
/usr/local/lib/perl5/att3_x86/5.002, it works fine.
Do I have to do this? Can I put the standard Perl in any directory as
long as the directory path
is in @INC.

By the way, my Perl version is 5.002.

    Thanks a lot for your help!

Ping




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

Date: Tue, 23 Jun 1998 20:26:16 +0000
From: David Martin <david.martin@biotek.uio.no>
Subject: if ($x < $y) { gives Odd number of elements in hash list but both $x and $y are fine???
Message-Id: <35900F68.40818F2B@biotek.uio.no>

Here is the problem. If I put the following code in my script (that to
all intents and purposes looks like a normal if statement then I get an
'odd number of elements in hash list' error and an uninitialised
variable error.

print "$x, $y\n";
if ($x<$y) {

If I substitute the condition ($x) or ($y) it goes just fine without any
errors.

$x and $y both print just fine so I am a bit confused as to why I get
such an error.

Thanks in advance if you can shed light on this. 

 ..d


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

Date: Wed, 24 Jun 1998 14:15:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: if ($x < $y) { gives Odd number of elements in hash list but both $x and $y are fine???
Message-Id: <Pine.GSO.3.96.980624070407.16155V-100000@user2.teleport.com>

On Tue, 23 Jun 1998, David Martin wrote:

> If I put the following code in my script (that to all intents and
> purposes looks like a normal if statement then I get an 'odd number of
> elements in hash list' error and an uninitialised variable error. 
> 
> print "$x, $y\n";
> if ($x<$y) {

Almost certainly, somewhere before those lines you have a syntax error
which is confusing the parser. These can be hard to find. (After all, Perl
didn't find it either! :-) 

Check the last few lines just before this point for a missing semicolon or
something similar. Also, could you have a quoting construct like q() or
qq() which isn't properly closed? 

Another trick is to try changing something which logically seems
meaningless, but could affect the (mis-)parsing. For example, you could
change the conditional expression of that if statement to ($y>$x) and see
whether that makes a difference.

Good luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 Jun 98 16:03:09 gmt
From: ws97-868@wsrz1.wiso.uni-erlangen.de (Franz Kaufmann)
Subject: LOCALE trouble -Please help
Message-Id: <6mr0vs$6nc$1@rznews.rrze.uni-erlangen.de>

Hello.

For the last two months I am using a  Perl 5.004_004 I downloaded from 
www.perl.com or www.perl.org (always confuse these two)

I compiled it and from then on,every time perl is started or prints to 
STDOUT is says something like

"LOCALE XXX not defined using LOCAL "C" instead".

I could scream bloody murder,because I didin4t find anything in the perl 
faq4s and because I have installed everything linux-wise (I4m using SUSE 
5.0) that smells like LOCALE from afar.Other programmes don4t complain 
about locals,as didn4t the 5.0 perl that came with SUSE linux.

Can anyone help me with this ?

thanks in advance.



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

Date: Wed, 24 Jun 1998 14:44:51 GMT
From: jwflynn@wsicorp.com
Subject: Nested form components
Message-Id: <6mr3d3$f3m$1@nnrp1.dejanews.com>

Hi, I'm trying to set up a group of radio buttons in an HTML form, but allow
one of the radio buttons to have text input if the corresponding button is
checked. For example

Pick a time to wait:
* one minute
* one second
* ...... seconds

Where the third entry allows the user to specify the amount.

I'm using perl5.

Thanks


Jim Flynn
jwflynn@wsicorp.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 24 Jun 1998 17:13:13 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Nested form components
Message-Id: <7x90mmde9i.fsf@beavis.vcpc.univie.ac.at>

Re: Nested form components, jwflynn <jwflynn@wsicorp.com>
said:

jwflynn> Pick a time to wait: * one minute * one second *
jwflynn> ...... seconds

jwflynn> Where the third entry allows the user to specify
jwflynn> the amount.

jwflynn> I'm using perl5.

Then go as fast as you can to CGI.pm

CGI contains numerous methods for short-cutting HTML output,
including form creation.

hth
tony

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Wed, 24 Jun 1998 16:12:34 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Nested form components
Message-Id: <35911762.226581D1@nortel.co.uk>

jwflynn@wsicorp.com wrote:
> 
> ...radio buttons
> 
> Pick a time to wait:
> * one minute
> * one second
> * ...... seconds
> 
> Where the third entry allows the user to specify the amount.

This is a question about html: I don't know if nested form components are
possible, I don't think so (although this believing is based on the fact that
I've never senn it somewhere. Try http://www.htmlcompendium.org/ to see what
html allows you to do.

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Wed, 24 Jun 1998 11:34:09 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Nested form components
Message-Id: <linberg-2406981134090001@projdirc.literacy.upenn.edu>

In article <6mr3d3$f3m$1@nnrp1.dejanews.com>, jwflynn@wsicorp.com wrote:

> Hi, I'm trying to set up a group of radio buttons in an HTML form, but allow
> one of the radio buttons to have text input if the corresponding button is
> checked. For example
> 
> Pick a time to wait:
> * one minute
> * one second
> * ...... seconds
> 
> Where the third entry allows the user to specify the amount.
> 
> I'm using perl5.

Why?

Use HTML.

And post your question to an HTML newsgroup.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Wed, 24 Jun 1998 08:57:53 -0500
From: Deva Seetharam <psdspss@execpc.com>
Subject: Re: newbie Location: syntax help wanted
Message-Id: <359105E1.3A4AF5F1@execpc.com>



Joost Kraaijeveld wrote:

> Hi,
>
> Can anyone give me a working perl script that just returns the name of
> a file that has to be displayed
>
> I tried the following file (without the c style comments) :
>
> /********************** start of file.pl ***************************/
> #!/usr/bin/perl
>
>    Location: myfile.html
>
> /********************** end of file.pl ***************************/

  First of all, this question should be posted in a cgi newsgroup, such
as comp.infosystems.www.authoring.cgi.

Anyway, what u might want is
print "Location: $url\n\n";



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

Date: 24 Jun 1998 16:21:15 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: newbie Location: syntax help wanted
Message-Id: <7xaf72dgo4.fsf@beavis.vcpc.univie.ac.at>

Re: newbie Location: syntax help wanted, Joost
<JKraaijeveld@askesis.nl> said:

Joost> just returns the name of a file that has to be
Joost> displayed

>From below, I presume you really mean "URL" here.  A URL is
not a file.

Joost>    Location: myfile.html

Right syntax, but not a valid location.

A nice extensible way is:

    use CGI qw(:standard);
    use URI::URL;
    my $url = new URI::URL 'http://www.vcpc.univie.ac.at/~tc/tools/';
    print header($url->as_string);

overkill for something like this, but things have a habit of
becoming more complicated very quickly don't they? :-)

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Wed, 24 Jun 1998 17:41:49 +0300
From: "Jouni Honkala" <jthscifi@yahoo.com>
Subject: Re: newbie Location: syntax help wanted
Message-Id: <6mr35d$1re$1@tron.sci.fi>


Joost Kraaijeveld kirjoitti viestissd
<3590fd05.2828375@news.telebyte.nl>...
>Hi,
>
>Can anyone give me a working perl script that just returns the name
of
>a file that has to be displayed
>
>I tried the following file (without the c style comments) :
>
>/********************** start of file.pl ***************************/
>#!/usr/bin/perl
>
>   Location: myfile.html
>
>/********************** end of file.pl ***************************/
>
>

#!/usr/bin/perl

print "Content-Type: text/html\n";  # HTTP Header Info
print "Location: myfile.html\n"; # \n means line feed






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

Date: Wed, 24 Jun 1998 09:22:10 -0500
From: Deva Seetharam <psdspss@execpc.com>
Subject: Re: Newbie Question again
Message-Id: <35910B92.D4A350FA@execpc.com>



johnsand@usa.net wrote:

>         Ok...  Since I was not very clear before.  I will try to
> explain this a little better....   I am not asking anyone to write the
> script for me, but I am not sure how to handle the ranges.  I think I
> figured out the first 2 parts...
>
> What I have is pre-formatted Web Pages such as the following  (skipped
> the HTML code to be clearer):
>
>             Number of Levels : 3
>
>                  Area of Construction : CountyName
>
>                  Asking Price = $ 28,000
>
>     And I have a form that allows the user to select the MINIMUM
> ranges from each of the above lines....    The problem is the last
> option list.   I have values such as 10000-20000  and 20000-30000
>
> How can I parse the selection the user enters and compare the values
> with the 3rd line (Asking Price)
>
> For example..  The user enters the 20000-30000 option.  How do I parse
> the 20000-30000 into 2 values and then compare if 20000 < 28000 and
> 30000 > 28000
>
>   I hope this is a little clearer...  :-)
>
>                                         John Sanderbeck

I guess you want to split 20000-30000 into two pieces, to get the max and
min price.
You can do this as follows.
($min, $max) = split(/-/, $selected-option);

Please go thru perl FAQ for a clear knowledge of fundamentals.

Hope that helps.

Deva




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

Date: Wed, 24 Jun 1998 10:24:39 -0400
From: Al Wang <alwang@oculus.lvl.pri.bms.com>
Subject: NEwbie question: how do I find string length?
Message-Id: <35910C27.E7315623@oculus.lvl.pri.bms.com>

Hi all,

I was wondering if there is any builtin function in Perl for returning
the length of a string.  If not, what's the most efficient way to do
this?

Sorry if this is i the FAQ, but I have no web access at the moment...

Thanks,
Al Wang

alwang@doubt.com


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

Date: Wed, 24 Jun 1998 15:54:41 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: NEwbie question: how do I find string length?
Message-Id: <35911331.8C8EFD28@nortel.co.uk>

Al Wang wrote:
> I was wondering if there is any builtin function in Perl for returning
> the length of a string.  If not, what's the most efficient way to do
> this? 
> Sorry if this is i the FAQ, but I have no web access at the moment...

I don't think it's in the FAQ, but in the Perl documentation. Don't you have it?

length EXPR 

length 

Returns the length in characters of the value of EXPR. If EXPR is omitted,
returns length of $_. 


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 24 Jun 1998 11:47:18 -0400
From: crump@shell1.cybercom.net
Subject: Perl question: newbiw help please!
Message-Id: <6mr726$cgs@shell1.cybercom.net>

Hi,

I'm running Perl on an NT 4.0 server. My perl program is started thru a
web interface and takes a while to complete (it does unpacking and
downloading of files) and eventually the browser times out. 

I'm trying to call another perl script so that I can return something to
the user and have the second script do all the work.

I'm trying something like this, but it doesn't seem to work:

 ...
# Print out HTMl and call second script
exec("script2.pl $var1 $var2 $var3");
print "The second script has been started...<BR>\n";
 ...

I thought that since 'exec' doesn't return anything, that the script will
kick off and run on it's own. But I'm obviously doing something wrong.

How can I run something in the background with out using '&' like on Unix?


Thanks...
Any help be email is appreciated,
crump@cybercom.net




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

Date: Wed, 24 Jun 1998 08:44:32 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: slshen@my-dejanews.com
Subject: Re: Q:How to send content to browser
Message-Id: <35911EE0.A22AE127@sirius.com>

slshen@my-dejanews.com wrote:
> 
> Hi,
> How to send content to browser when the whole page has not been genetated
> completely in perl?

$| = 1; # unbuffered output

-- Jim Bowlin


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

Date: Wed, 24 Jun 1998 09:19:19 -0400
From: Bruce Browning <bruce.browning@tivoli.com>
Subject: Running Perl Scripts from a C prog
Message-Id: <3590FCD7.34384241@tivoli.com>

I am needing to lauch some of my Perl script from a C program. Does
anyone have any examples of how to do this? I will be using the djgpp
compiler. Basically, all I am needing is a wrapper for my perl script.

Thanks in Advance,

Bruce

--
=================================================
Bruce Browning
Senior Presales Support Engineer

Tivoli Systems
an IBM Company
50 Glenlake Parkway, Suite 400
Atlanta, Georgia 30328

Email    bruce.browning@tivoli.com
Phone    770-350-4500
Phone    770-350-4609 Direct
Pager    888-979-3127
=================================================




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

Date: Wed, 24 Jun 1998 14:24:14 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Running Perl Scripts from a C prog
Message-Id: <Pine.GSO.3.96.980624072328.16155X-100000@user2.teleport.com>

On Wed, 24 Jun 1998, Bruce Browning wrote:

> I am needing to lauch some of my Perl script from a C program. Does
> anyone have any examples of how to do this? 

You should be able to use the same basic method you'd use to launch a
shell script from C. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 24 Jun 1998 13:48:29 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: system() and security again
Message-Id: <6mr03d$ald$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:
:Not AFAIK.   

Yes, you can.  Be happy.  See my other posting.

--tom
-- 
There are probably better ways to do that, but it would make the parser
more complex.  I do, occasionally, struggle feebly against complexity...  :-)
            --Larry Wall in <7886@jpl-devvax.JPL.NASA.GOV>


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

Date: Wed, 24 Jun 1998 08:14:10 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: system() and security again
Message-Id: <MPG.ffab79e107442719896f2@nntp.hpl.hp.com>

[This followup was posted to comp.lang.perl.misc and a copy was sent to 
the cited author.]

In article <6mqr5n$664$1@csnews.cs.colorado.edu>, Tom Christiansen 
<tchrist@mox.perl.com> says...
> What does that mean?  You mean a list of one element?
> 
>     @cmds = "who";
>     system { $cmds[0] } @cmds;

I have played with this for a while, and verified that it does invoke 
system() with one argument and fork/execs the command without invoking 
the shell.  Please explain what is going on syntactically, so I can look 
for other ways to apply it.  It looks like 'system BLOCK LIST' which is 
OK for grep/map/sort, but in general???

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Wed, 24 Jun 1998 15:20:08 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: system() and security again
Message-Id: <6mr5g5$rht$1@nz12.rz.uni-karlsruhe.de>

Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>In comp.lang.perl.misc, Marc.Haber-usenet@gmx.de (Marc Haber) writes:
>:And I have to be sure that this command does not contain
>:metacharacters :-). Is it possible to pass a list with a single string
>:element?
>
>What does that mean?  You mean a list of one element?

Yes.

>    @cmds = "who";
>    system { $cmds[0] } @cmds;

That seems like a trick. Can anyone explain what this does?

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Wed, 24 Jun 1998 11:46:32 -0400
From: Philip Antoniades <Philip@Antoniades.com>
Subject: Text manipulation with packed fields
Message-Id: <35911F58.FA984F8A@Antoniades.com>

Has anyone worked with EBCIDIC COMP-3 data fields on NT?  I am trying to
remove only the first x bytes of each line in a text field, where packed
fields occur later in the line.  substr() doesnt seem to be able to do
it.

Thanks,

philip



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

Date: Wed, 24 Jun 1998 16:06:49 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: What a Crappy World (oh, yes!)
Message-Id: <35911609.243C3898@nortel.co.uk>

Olga wrote:

[her post]

postings from Tom Christiansen currently on our newsserver: 11
from all those offensive: 0.5
from all those sarcastic: about 2.
offensive/output ratio: 0.045
sarcastic/output ratio: 0.18


sub my_ever_complaining_brain {
 $reason = shift;
 $proceed = $reason ? 1 : 1;
 print "Newsgroups are annoying and I love to constantly say the same" if
$proceed == 1;
 &my_ever_complaining_brain("don't need a reason");
} 


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Wed, 24 Jun 1998 10:26:08 -0500
From: Olga <katzman@students.uiuc.edu>
Subject: Re: What a Crappy World (oh, yes!)
Message-Id: <Pine.SOL.3.96.980624102453.3077B-100000@ux5.cso.uiuc.edu>

Oh really???
How is it you calculated that only .5 of the posts were offensive.  I've
spoken to several different people who over the last few days have come to
despise the name Tom Christiansen and they vouch to never invest any money
in his books because he was so insulting and rude to them.
So how is it you came up with .5?
Thanks

On Wed, 24 Jun 1998, F.Quednau wrote:

> Olga wrote:
> 
> [her post]
> 
> postings from Tom Christiansen currently on our newsserver: 11
> from all those offensive: 0.5
> from all those sarcastic: about 2.
> offensive/output ratio: 0.045
> sarcastic/output ratio: 0.18
> 
> 
> sub my_ever_complaining_brain {
>  $reason = shift;
>  $proceed = $reason ? 1 : 1;
>  print "Newsgroups are annoying and I love to constantly say the same" if
> $proceed == 1;
>  &my_ever_complaining_brain("don't need a reason");
> } 
> 
> 
> -- 
> ____________________________________________________________
> Frank Quednau               
> http://www.surrey.ac.uk/~me51fq
> ________________________________________________
> 
> 



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

Date: Wed, 24 Jun 1998 09:44:11 -0500
From: Olga <katzman@students.uiuc.edu>
Subject: What a Crappy World
Message-Id: <Pine.SOL.3.96.980624093825.25068A-100000@ux5.cso.uiuc.edu>

You know,
I was just browsing this newsgroup and I noticed something that I would
like to share with you all.  Why is it that once a person becomes
knowledgeable in a subject they have to make everyone else around them
feel like shit.  For example, take any number of posts by Mr.
Christiansen.  I realize that he is very intelligent, we are all familiar
with his books, but why does Mr. Christiansen feel the need to insult
people who are trying to learn.  You know, it would be so nice if upon
reading a "stupid" question, Mr. Christiansen said, "Hmm, what a stupid
question, and I  feel instulted that people even ask these types of
questions, but I am not going to insult this person.  Nope, I'll just keep
my mouth shut and let someone else answer this one."  That would be so
nice.
So I guess what I am trying to say is, wouldn't it be nice if when people
had nothing good to say and they couldn't help someone, they just wouldn't
say anything?  I think so.
These newsgroups are made for discussion purposes, which includes asking,
somtimes not the most intelligent, questions.  But the people asking those
questions arent' doing it because they want to be insulted, but merely
because they want to learn.
Just my 5 cents.
Thanks all for listening.
Olga



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

Date: Wed, 24 Jun 1998 14:59:29 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: What a Crappy World
Message-Id: <pudge-2406981056430001@dynamic448.ply.adelphia.net>

In article <Pine.SOL.3.96.980624093825.25068A-100000@ux5.cso.uiuc.edu>,
Olga <katzman@students.uiuc.edu> wrote:

# So I guess what I am trying to say is, wouldn't it be nice if when people
# had nothing good to say and they couldn't help someone, they just wouldn't
# say anything?  I think so.

I don't.  I would rather go down fighting than just abandon ship.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 24 Jun 1998 15:10:52 GMT
From: jhtodd@students.uiuc.edu (jeremy howard todd)
Subject: Re: What a Crappy World
Message-Id: <6mr4ts$nqd$1@vixen.cso.uiuc.edu>

Olga <katzman@students.uiuc.edu> writes:

>So I guess what I am trying to say is, wouldn't it be nice if when people
>had nothing good to say and they couldn't help someone, they just wouldn't
>say anything?  I think so.

	It's not out of malice so much as frustration, I think.  Many
people come into newsgroups and ask a very simple question that has
been asked so many times before that it was included in an
easy-to-find FAQ.  People put a lot of work into maintaining FAQ lists,
and when beginners ignore them and keep asking the same questions, it
shows they are not willing to do any research on the subject themselves,
but expect others to do it for them.  So it's not because of their
lack of knowledge so much as their lack of initiative.

	That said, I agree that it goes too far a lot of times.  If the
question is really that simple, it doesn't take much longer to politely
answer it and -then- refer them to the FAQ for more information than it
does to flame them about it.

	-jht
--
Jeremy Todd                       Computer Programmer        _,/
jhtodd@uiuc.edu                   ITCS On-line Development <__ \_.---.
http://www.cen.uiuc.edu/~jhtodd/  College of ACES, UIUC       \_  /   \
Zupfe Boy and Night Owl           (And Kangaroo Aficianado)     \)\ /\.\
===========================================================       //   \\
"M-O-O-N, that spells moon" - Tom Cullen                        ,/'     `\_,


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

Date: Wed, 24 Jun 1998 10:24:35 -0500
From: Olga <katzman@students.uiuc.edu>
Subject: Re: What a Crappy World
Message-Id: <Pine.SOL.3.96.980624102059.3077A-100000@ux5.cso.uiuc.edu>

I realize that some of the answers sound that way because of frustration,
but that's exactly my point.  If something frustrates you THAT much, why
not just leave the post alone and let someone else field this one.
As far as the FAQ's go.  I've talked to several of the people that got
pretty offended  by Mr. Christiansen, and they have checked out the FAQ's
and even his books, however they still felt they required additional help
and so they turned to the one place they though would help.  To get what
in return?  Insults.
What's the point of having a newsgroup when you can't ask a question
without being insulted and called stupid.
Thanks for your post though.
Olga

On 24 Jun 1998, jeremy howard todd wrote:

> Olga <katzman@students.uiuc.edu> writes:
> 
> >So I guess what I am trying to say is, wouldn't it be nice if when people
> >had nothing good to say and they couldn't help someone, they just wouldn't
> >say anything?  I think so.
> 
> 	It's not out of malice so much as frustration, I think.  Many
> people come into newsgroups and ask a very simple question that has
> been asked so many times before that it was included in an
> easy-to-find FAQ.  People put a lot of work into maintaining FAQ lists,
> and when beginners ignore them and keep asking the same questions, it
> shows they are not willing to do any research on the subject themselves,
> but expect others to do it for them.  So it's not because of their
> lack of knowledge so much as their lack of initiative.
> 
> 	That said, I agree that it goes too far a lot of times.  If the
> question is really that simple, it doesn't take much longer to politely
> answer it and -then- refer them to the FAQ for more information than it
> does to flame them about it.
> 
> 	-jht
> --
> Jeremy Todd                       Computer Programmer        _,/
> jhtodd@uiuc.edu                   ITCS On-line Development <__ \_.---.
> http://www.cen.uiuc.edu/~jhtodd/  College of ACES, UIUC       \_  /   \
> Zupfe Boy and Night Owl           (And Kangaroo Aficianado)     \)\ /\.\
> ===========================================================       //   \\
> "M-O-O-N, that spells moon" - Tom Cullen                        ,/'     `\_,
> 
> 



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

Date: 24 Jun 1998 15:48:05 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: What a Crappy World
Message-Id: <6mr73l$2tt@mozo.cc.purdue.edu>

pudge@pobox.com (Chris Nandor) writes:

}In article <Pine.SOL.3.96.980624093825.25068A-100000@ux5.cso.uiuc.edu>,
}Olga <katzman@students.uiuc.edu> wrote:

}# So I guess what I am trying to say is, wouldn't it be nice if when people
}# had nothing good to say and they couldn't help someone, they just wouldn't
}# say anything?  I think so.

}I don't.  I would rather go down fighting than just abandon ship.

Ultimately, this is the difference that divides this group.  Half the
people see it as "going down fighting," while the other half see it as
"going down whining."

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Wed, 24 Jun 1998 11:46:28 -0400
From: Rich Bowen <rbowen@databeam.com>
Subject: Re: Would someone tell me what this means?
Message-Id: <35911F54.29DA@databeam.com>

>    I think this code is better (for some values of "better"):
> 
>    error('silly form designer') unless defined $FORM{name};
> 
>    error('no name entered') if $FORM{name} eq '';
> 
>    $FORM{name} =~ tr/"<>&//d; # delete angle brackets,
>                               # double quotes, and ampersands
> 
>    ----------
> 
>    I sure hope that was free code that you found laying around somewhere.
> 
>    If you paid for it, you got taken...

For the record, the code is from wwwboard by Matt Wright, which is in
use on hundreds of web sites around the world. I was just looking at the
code the other day, wondering if I had the time to clean up some of this
stuff, since I am running the thing myself a few places.

Rich
-- 
##################################################
#  Rich Bowen                                    #
#  Web Services Engineer - DataBeam Corporation  #
#  rbowen@databeam.com                           #
##################################################


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

Date: Wed, 24 Jun 1998 16:32:59 +0200
From: Michal Sibilski <sibil@infinit.com.pl>
Subject: wwwborad and win95
Message-Id: <35910E1B.2ACA8208@infinit.com.pl>

Hi !
I'm looking for anyone who know how run the WWWborad (by Matt) under
windows 95..
if you know how... please mail me..
sibil@infinit.com.pl
bye,
Mike



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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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