[8859] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2476 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 2 03:27:53 1998

Date: Sat, 2 May 98 00:00:56 -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           Sat, 2 May 1998     Volume: 8 Number: 2476

Today's topics:
    Re: 1701 days hath September (was: Re: rename funciton) <ljz@asfast.com>
    Re: Confusion with new warning concerning split operato <rjk@coos.dartmouth.edu>
    Re: email attachments <zenin@archive.rhps.org>
    Re: Excel via cgi <nic@<remove>mail.cyber-west.com>
    Re: fork problem <gurun@acc.umu.se>
        HELP Me PLEASE! <alex-oleinik@usa.net>
        How do you call an executable file with Perl CGI? mhannam@gardner-webb.edu
        java applet embedded in script <wshakle@idt.net>
        Killing a process from the web webmaster@wolfhaven.com
    Re: Killing a process from the web <rootbeer@teleport.com>
    Re: Man...I really need to get 'The Camel Book' this we (Shaun Sides)
    Re: Man...I really need to get 'The Camel Book' this we (Shaun Sides)
        matching problem (Belg4mit)
    Re: matching problem <rootbeer@teleport.com>
    Re: matching problem (Belg4mit)
    Re: matching problem (Steven Alexander)
    Re: matching problem <rjk@coos.dartmouth.edu>
    Re: need help with hashtable size/memory (Ilya Zakharevich)
        Non-blocking sockets revisited (John Siracusa)
    Re: Non-blocking sockets revisited (John Siracusa)
    Re: Non-blocking sockets revisited <rootbeer@teleport.com>
        Perl debugger <wrk1@enter.net>
    Re: Perl/Wall lingo question <rjk@coos.dartmouth.edu>
    Re: problem reading DB_File on win32 platform <benefits@cybertechs.com>
    Re: push @strArray, (24..31); <webmaster@fccjmail.fccj.org>
    Re: QRe: == vs. eq <gurun@acc.umu.se>
    Re: Redirection <rootbeer@teleport.com>
    Re: Test httpd server status (brian d foy)
    Re: Test httpd server status (Robert Watkins)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 01 May 1998 23:41:50 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <lt4sz9qqyp.fsf@asfast.com>

stanley@skyking.OCE.ORST.EDU (John Stanley) writes:

> In article <pudge-0105981024250001@ppp-5.ts-1.kin.idt.net>,
> Chris Nandor <pudge@pobox.com> wrote:
> >Moderation only censors off-topic material; 
> 
> Even using the term in the less strict sense, moderation "censors"
> whatever the moderator wants to "censor". [ ... ]
> 
> [ ... ]
>
> >How a group of people agreeing to start a new "community"
> >under certain rules of communication where everyone is welcome and has a
> >voice can be evil is beyond me.
> 
> This is the utopian view of the process. The proposal for a new perl
> group does not quite meet this goal.

However, since c.l.p.misc will still exist, I don't see how these
potentially non-utopian aspects of the proposed c.l.p.moderated would
have any major effects on anyone who doesn't chose to participate in
that new group ... assuming that this non-utopianness will come to
pass at all.

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Sat, 02 May 1998 01:19:06 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: Confusion with new warning concerning split operator in perl5.004
Message-Id: <354AACCC.BBB8F795@coos.dartmouth.edu>

Dan Boorstein wrote:
> 
> Alex Blume wrote:
> >
> > Under perl 5.004_04, the following code,
> >
> >         $dash_count = split(/\-/, $test_string);
> >
> > now generates the warning
> >
> >         Use of implicit split to @_ is deprecated at test.pl line 3.
> 
> the message you are seeing is due to the split not being used in a
> list context. if you wrap parens around $dash_count the error will
> disappear, and you'll even have the right answer.
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Huh?!  If you wrap parens around $dash_count, then $dash_count will contain
the first element from the split, not the number of elements.


  DB<1> $test_string = 'abc-def-ghi'

  DB<2> ($dash_count) = split(/\-/, $test_string);

  DB<3> x $dash_count
0  'abc'


Perhaps you meant this:

$dash_count = () = split(/\-/, $test_string);

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 2 May 1998 00:23:41 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: email attachments
Message-Id: <894069074.465301@thrush.omix.com>

Frank L. Quednau <quednauf@nortel.co.uk> wrote:
:  Again, visit my webpage under
: http://www.surrey.ac.uk/~me51fq/perl/perl.htm
: The first (and right now only) section is on how to produce an
: attachment.

	Test your open() incase fork() doesn't.

	Test your close, incase exec ("sendmail") didn't.

	Use open3() to grab stderr AND stdout.  Just because sendmail
	exits 0, does NOT meen it was happy with what you gave it.  If
	you get anything back from sendmail consider it an error condition.
	Even if you don't care if sendmail liked your data or not, if you're
	using your script from a CGI call you're likely to cause an "Invalid
	header" 500 server error as sendmail spits most of it's error
	messages to stdout (not err).

	But do stick with sendmail, as it's more reliable then using SMTP
	directly.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Fri, 1 May 1998 22:38:41 -0600
From: "Madness" <nic@<remove>mail.cyber-west.com>
Subject: Re: Excel via cgi
Message-Id: <354aa187.0@news9.kcdata.com>

I dunno if you fount the answer, yet but I have had this dilemma before.
Did you try typecasting the value?
int($in{c1});


Pat Kane wrote in message <354957DA.270E@compuserve.com>...
>Peter Tapolyai <peter###@uhu.com>  wrote
>>
>> I have to query an MS Excel Spreadsheet across the web.
>> I have the simplified core of the cgi below. However, this
>> query does not return the very first 'records' (or cell values)
>> or any text values either.
>> That is if I have:
>>         A       B
>> 1       11      12
>> 2       21      text
>> 3       31      32
>> values in a spreadsheet, then all numberical values returned,
>> with the exception of A1 and B1 values in addition to the B2 'text'.
>> Column A's name is F1 and Column B is F2 through ODBC.
>>
>> Any ideas what I am missing ?
>
>YES
>
>The first row is the row that should contains the column names.
>Therefore you are missing column names in you hash keys.
>I tried the following and it worked.
>Assume the following excel spreadsheet data.
> A B
>1 c1 c2
>2 666 b
>3 555 c
>4 444 d
>5 333 e
>6 222 f
>
>I then changed the line
> print " <li>", $in{F1}, " ", $in{F2}, "\n";
>to
> print " <li>", $in{c1}, " ", $in{c2}, "\n";
>and the data returned was
> 666.0 b
> 555.0 c
> 444.0 d
> 333.0 e
> 222.0 f
>
>I don't know how to prevent the decimal point and zero in column c1.
>I tried using the excel format cells (category = number,decimal places =
>0) but to no avail.  I found the column names by inserting the following
>code inside the while loop:
>foreach $row (keys %in) {print "$row\n";}
>this printed
>c1
>c2
>This told me I had to change the hash key which I did and it worked.
>
>If anyone can figure out how to avoid decimal places let us know.
>
>
>Pat
>
>Pat_$No#Spam_$Kane@csi.com
>remove the dollar signs and everything between them to reply via email.
>
>> use Win32::ODBC;
>> $DSN = "Excel";
>> $db = new Win32::ODBC($DSN);
>>
>> &html_header;
>> print "Excel Data<br>\n";
>> print "<ol>\n";
>> $db->Sql("SELECT * FROM \"Sheet1\$\"");
>> while ($db->FetchRow()){
>>   %in = $db->DataHash();
>>   print " <li>", $in{F1}, " ", $in{F2}, "\n";
>> }
>> print "<\/ol>\n";
>> $db->Close();
>> &html_footer;
>>
>> --
>>
>>
>>
>> Remove ### from before replying
>>
>> peter###@uhu.com




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

Date: Sat, 02 May 1998 05:17:52 +0200
From: N i c l a s O l o f s s o n <gurun@acc.umu.se>
Subject: Re: fork problem
Message-Id: <354A9060.BF4C650F@acc.umu.se>

Dave Parkin wrote:
> If I have in the while loop, the children are executed one after the
> other.
> 
> I've tried different approaches, but am stuck. Can anyone help,
> please?

Very very untested. Excuse me if I'm wrong (and not very informativ) but
it's 5:13 in the morning and I feel for bed now :)

Try moving the while loop after the for loop. That will allow all
childeren to be created and then the parent reads from each child.
It could need some more tweaking too, but at least it should give you a
hint.

Hope that it can be of some help to you,

/Niclas - sooo tired.


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

Date: Fri, 1 May 1998 22:39:02 -0500
From: "Alex" <alex-oleinik@usa.net>
Subject: HELP Me PLEASE!
Message-Id: <6ie4cc$7b6$1@ionews.ionet.net>

Hello,
         I have a problem, I cannot chat in Java chats because I cannot type
in the fields. I use Windows 98 1702 beta with IE. Help me, please. What is
wrong?

Sincerly,

Alex.




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

Date: Fri, 01 May 1998 20:33:05 -0600
From: mhannam@gardner-webb.edu
Subject: How do you call an executable file with Perl CGI?
Message-Id: <6idt4h$61q$1@nnrp1.dejanews.com>

How might one go about invoking a small executable file that resides on a
server with a CGI script?  Can it be done?

Win32::Process::Create($Process,
  "c:\\windows\\ledoff.exe",
  "ledoff",
  "0",
  "DETACHED_PROCESS",
  "." ) || die "Create:$!";

This works fine until I try it with CGI.  Any help you can afford me would be
fantastic.  Thanks.  Matt

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


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

Date: Fri, 01 May 1998 19:52:02 -0400
From: Warren Shaklee <wshakle@idt.net>
Subject: java applet embedded in script
Message-Id: <354A6022.E2505BD@idt.net>

Thanks in advance to anyone who can help.

I have a perl script in a cgi-bin directory and generates a web page
with an image and two java applets.  The java class files are in the
cgi-bin directory.  The generated page finds the class files and
generates the page, but the applets don't initialize.  Error message
Start: applet not initialized.  If there is anything special abount
passing applet parm from the perl script, I can't find it.

Again thanks to anyone who may have any suggestions.



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

Date: Fri, 01 May 1998 20:22:53 -0600
From: webmaster@wolfhaven.com
Subject: Killing a process from the web
Message-Id: <6idshd$532$1@nnrp1.dejanews.com>

I'm working on a gui for apache.  I have tried everything I can think of to
send an HUP signal to restart Apache and reload the config files.  I've tried:

 system ("kill -HUP 103");
`kill -HUP 103`

and several others along these lines.  I keep getting one of 2 messages.
"Operation not permitted", or "not owner".  I even tried exploiting the
sendmail pipe to run as root, but no.

/usr/sbin/httpd stop or start or restart merely seems to try and execute a new
 copy of apache.

Is there another way I can send an HUP signal to a specific process through a
perl script?

- Dave

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


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

Date: Sat, 02 May 1998 02:04:22 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: webmaster@wolfhaven.com
Subject: Re: Killing a process from the web
Message-Id: <Pine.GSO.3.96.980501190058.2859g-100000@user2.teleport.com>

On Fri, 1 May 1998 webmaster@wolfhaven.com wrote:

> I'm working on a gui for apache.  I have tried everything I can think of
> to send an HUP signal to restart Apache and reload the config files. 
> I've tried: 
> 
>  system ("kill -HUP 103");
> `kill -HUP 103`

Of course, you can do kill directly within perl; it's a builtin.

> and several others along these lines.  I keep getting one of 2 messages.
> "Operation not permitted", or "not owner".

Well, not everyone is running as root! :-)

> I even tried exploiting the sendmail pipe to run as root, but no. 

That sounds as if you're exploiting security holes. Maybe I've
misunderstood. But if you are doing that, do you have your sysadmin's
permission? 

It sounds as if you want to run your process as an id which is permitted
to send signals to that process. Check the perlsec manpage for information
on running perl set-id. Hope this helps!

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



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

Date: 1 May 1998 10:30:53 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: Man...I really need to get 'The Camel Book' this weekend.
Message-Id: <slrn6kkbf6.2en.arch@abts.net>

Original message by: Jonathan Feinberg <jdf@pobox.com>
Date: 01 May 1998 16:25:18 -0500
Subject: Re: Man...I really need to get 'The Camel Book' this weekend.


> Then you've saved me the trouble of recommending it!  Good luck, and
> have fun with the Llama.

And I ordered it just yesterday (already got the camel book, and found
that it's over my head somewhat)!  Can't wait for it to get here! ;-)

--
Shaun L. Sides


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

Date: 1 May 1998 10:42:06 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: Man...I really need to get 'The Camel Book' this weekend.
Message-Id: <slrn6kkc3v.2en.arch@abts.net>

Original message by: Arthur Dardia <ahdiii@webspan.net>
Date: Fri, 01 May 1998 19:19:37 -0400
Subject: Re: Man...I really need to get 'The Camel Book' this weekend.


> Say I wanted to be able to set $amax and $bmax from the command line.  Would
> I use @ARGV?  Is there an @ARGV2?

You'd use $ARGV[n]

As in:

#!/usr/bin/perl -w
# mult.pl (untested)
# usage -- mult.pl <first number> <second number> <...> <nth number>
$args = @ARGV;		# sets the number of arguments
$i = 0;
while ($i < $args) {
  $num = $ARGV[$i];
  $one = $num * 1;
  $two = $num * 2;
  $three = $num * 3;
  print "Multiplier\t1\t2\t3";
  print "$num\t\t$one\t$two\t$three";
  $i++;
}
# EOF
I think this will work, but I'm a newbie, too, so don't count on it. ;-)

> PS - I guess my next question WAS a newbie one.  :(

Only appropriate, I'd say. ;-)

--
Shaun L. Sides


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

Date: 02 May 1998 00:11:32 GMT
From: belg4mit@aol.com (Belg4mit)
Subject: matching problem
Message-Id: <1998050200113200.UAA21554@ladder03.news.aol.com>

I want to do /\<[\/]foo\>/ but // doesn't seem to support [], it just ignores
them.
Any ideas?

Mahalo!

PS. Mail replies to belg4mit@mit.edu preferrerd


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

Date: Sat, 02 May 1998 00:46:38 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Belg4mit <belg4mit@aol.com>
Subject: Re: matching problem
Message-Id: <Pine.GSO.3.96.980501173850.2859c-100000@user2.teleport.com>

On 2 May 1998, Belg4mit wrote:

> I want to do /\<[\/]foo\>/ but // doesn't seem to support [], it just
> ignores them. 

Well, I don't know what you're really trying to do, but what you've
shown works just as the documentation says it does. 

You may not know that angle brackets aren't normally special in pattern
matches, so it's not necessary to backwhack them. Also, if you need to use
a slash character in a match, you could choose a different character to
quote the match, so your pattern might look like this: 

    m#<[/]foo>#

Of course, a character class of one character is equivalent to that
character, so your match is essentially:

    m#</foo>#

If that's not the pattern you wanted, you may need to read perlre or
perlop to find out how to write a different one. Or you could post an
example of the code you tried, its parameters, and what it didn't do that
you think it should. Thanks!

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



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

Date: 02 May 1998 04:09:37 GMT
From: belg4mit@aol.com (Belg4mit)
Subject: Re: matching problem
Message-Id: <1998050204093700.AAA21540@ladder01.news.aol.com>

Okay, to clarify...

[] is supposed to make the enclosed expression _optional_

I want to match both <foo> & </foo> in one expression

because I'm trying to do two things, count how many <[/]foo>'s there are
and then copy them into an array so something like:

$m += /<[\/]foo>/;
if(/<[\/]foo>/){ $lines[$i++] = $_; }


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

Date: Sat, 02 May 1998 05:03:35 GMT
From: stevena@user2.teleport.com (Steven Alexander)
Subject: Re: matching problem
Message-Id: <6ie9ec$gva$1@user2.teleport.com>

In article <1998050204093700.AAA21540@ladder01.news.aol.com>,
Belg4mit <belg4mit@aol.com> wrote:
>Okay, to clarify...
>
>[] is supposed to make the enclosed expression _optional_
>
>I want to match both <foo> & </foo> in one expression
>
>because I'm trying to do two things, count how many <[/]foo>'s there are
>and then copy them into an array so something like:
>
>$m += /<[\/]foo>/;
>if(/<[\/]foo>/){ $lines[$i++] = $_; }

But [] doesn't make anything optional in Perl's* syntax
for regular expressions.  It specifies a character class,
used to match one character.

To make an expression optional, use (optionalexpression)?,
so your example would be


    m:</?foo>:          # as Tom suggested, use something other
                        # than // if the r.e. has /
                        # if not using //, the m is mandatory

It doesn't need to be

    m:<(/)?foo>:

because ? applies to what's immediately before it.

  Steven Alexander
  stevena@teleport.com
  <http://www.teleport.com/~stevena/scrabble/faq.html>

* Gee, I hope I capitalized that right.


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

Date: Sat, 02 May 1998 02:00:23 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: matching problem
Message-Id: <354AB67B.4954226E@coos.dartmouth.edu>

Belg4mit wrote:
> 
> [] is supposed to make the enclosed expression _optional_

It is?  And all this time we thought it was supposed to indicate a character
class.  I guess Larry really blew it on that one.

By the way, try reading the documentation.  Specifically, perlre.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 2 May 1998 02:28:17 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: need help with hashtable size/memory
Message-Id: <6ie0c1$p4r$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Zenin 
<zenin@archive.rhps.org>],
who wrote in article <894064078.254149@thrush.omix.com>:
> 	The size of the hashtable isn't simply the total of the data it
> 	contains, but the overhead of storing data as perl scalar values
> 	as well as the extra data that the hashtree needs.  A 5 char long
> 	string is not going to take just 5 bytes of memory, it's going to
> 	be double that at least. -I forget exactly, it's been a couple
> 	months since I looked at the structs of SV and friends.

The golden rule to estimate Perl memory usage is to
    
    a) imagine worst case of memory allocation imlementation;
    b) multiply by 10;

This gives 100 bytes in your case, which is wrong, the actual number
will be around 40 (for 32-bit machines).

Ilya


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

Date: 2 May 1998 05:00:03 GMT
From: macintsh@cs.bu.edu (John Siracusa)
Subject: Non-blocking sockets revisited
Message-Id: <6ie98j$e9n$1@news1.bu.edu>

First of all, many thanks to those of you who responded to my
previous post about non-blocking sockets.  I ended up using
the blocking() method of the new Socket modules when available,
falling back to fcntl() if not.  It seems to work well...but,
of course, there's still one niggling problem:

How do I determine when the remote host closes a non-blocking
connection?  The return values of read(), sysread(), and recv()
don't seem to be helpful.  Even if this situation is handled
in the new Socket module, I'd really like to be able to roll my
own solution for people with older versions.

Many thanks...

-----------------+----------------------------------------
  John Siracusa  | If you only have a hammer, you tend to
 macintsh@bu.edu | see every problem as a nail. -- Maslow


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

Date: 2 May 1998 05:40:42 GMT
From: macintsh@cs.bu.edu (John Siracusa)
Subject: Re: Non-blocking sockets revisited
Message-Id: <6iebkq$e9n$2@news1.bu.edu>

Doh!  I forgot all about $!.  I think I just answered my
own question.  Partially, anyway, because $! gets set to
some pretty weird (i.e. system-specific) things.  I would
expect to be able to compare $! to EWOULDBLOCK or EAGAIN,
but when I print $! I get strings like "Resource
temporarily unavailable," "Connection reset by peer,"
"Socket is not connected," and "Operation would block"
instead of a number.

Worse, sysread() on some systems returns 0 with no $!
after being disconnected, but returns undef with $!  set to
one o fthe many "you're disconnected" strings (as seen
above).  Bleh!

-----------------+----------------------------------------
  John Siracusa  | If you only have a hammer, you tend to
 macintsh@bu.edu | see every problem as a nail. -- Maslow



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

Date: Sat, 02 May 1998 06:37:47 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: John Siracusa <macintsh@cs.bu.edu>
Subject: Re: Non-blocking sockets revisited
Message-Id: <Pine.GSO.3.96.980501232441.2859k-100000@user2.teleport.com>

On 2 May 1998, John Siracusa wrote:

> Doh!  I forgot all about $!.  I think I just answered my
> own question.  Partially, anyway, because $! gets set to
> some pretty weird (i.e. system-specific) things.  I would
> expect to be able to compare $! to EWOULDBLOCK or EAGAIN,
> but when I print $! I get strings like "Resource
> temporarily unavailable," "Connection reset by peer,"
> "Socket is not connected," and "Operation would block"
> instead of a number.

Actually, $! is magical. If you pretend it's a number, it works like a
number. But if you pretend it's a string, it works like a string.

    unlink "bogus file name";
    print "Error was $!.\n";
    print "Also known as number ", 0+$!, ".\n";

You can get the constants like EAGAIN from POSIX:

    use POSIX qw/ :errno_h /;

> Worse, sysread() on some systems returns 0 with no $!
> after being disconnected, but returns undef with $!  set to
> one o fthe many "you're disconnected" strings (as seen
> above).  Bleh!

Hmmm... You may already know this, but just in case: Be careful when using
$! - it's set when a system call fails, but it is unpredictable if that
hasn't occurred. And since it can be set by Perl's internal operations,
you should generally check it as soon as you can after the system call
which failed.

In this case, $! isn't useful if sysread returned anything defined. But
from what you said, I think you've got that. Now you'll need to deal with
the many facets of sockets! :-)

Hope this helps!

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



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

Date: 2 May 98 03:50:57 GMT
From: "Wayne Kohler" <wrk1@enter.net>
Subject: Perl debugger
Message-Id: <01bd7586$f352cfc0$dd47aacc@wrk1>


Does anybody know if a graphical source level debugger exists
for Perl?  The line oriented debugger supplied with Perl is OK,
but a GUI would really be nice!!! (Perhaps built with Perl/Tk?)

W. Kohler
wrk1@enter.net



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

Date: Sat, 02 May 1998 01:11:48 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: Perl/Wall lingo question
Message-Id: <354AAB16.16D1A506@coos.dartmouth.edu>

John Porter wrote:
> 
> Followup-To: jdport@min.net

Isn't that header supposed to refer to a list of newsgroups?

> () would represent zero dimensions,
> but there's no place for the magnitude.  Thats why a 0d vector
> is effectively no vector at all.  And that's why we can say that
> scalars are dimensionless.

So scalars don't have magnitude?  That doesn't make sense.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 01 May 1998 21:13:16 -0400
From: Jason Boxman <benefits@cybertechs.com>
Subject: Re: problem reading DB_File on win32 platform
Message-Id: <354A732B.4C8C@cybertechs.com>

Dear Wing Choy:

> Was there some
> special handling which need to be done in order to
> read the DB_File created in Unix?

Perhaps the problem is caused by Unix terminating its lines with LFs
only as opposed to DOS' CR/LF?

Sincerely,

Jason Boxman
benefits@cybertechs.com


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

Date: Sat, 02 May 1998 04:20:04 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Re: push @strArray, (24..31);
Message-Id: <354A9D3C.1EF8981C@fccjmail.fccj.org>

John Porter wrote:
> 
> On Fri, 01 May 1998 10:32:45 GMT,
> in article <3549A318.47AC0998@fccjmail.fccj.org>,
> webmaster@fccjmail.fccj.org (Bill 'Sneex' Jones) wrote:
> > Dan Boorstein wrote:
> >
> > > my   @strArray = (21..39, 90..121, 299..310);
> >
> > Yes, :-)  Just shoot me!  I thought I had done it that
> > way first; but I was really doing:
> >
> > my $strArray = (21..39), (44..50), (101..200);
> >
> Is that another typo, bill?
> When you assign to a scalar like that, it comes out
> an empty string -- even more wrong than assigning
> to an array :-)
> 
> John Porter

No, no typo like think skulled :-)
I tested  my $strArray = (21..39), (44..50), (101..200);
I wrote the group:
my $strArray = (22..30);
$strArray = (0..12);
et al...

I meant:
my $strArray = (22..30);
push $strArray, (0..12);
et al...

Sorry for the misposting.  I didn't wish to waste anyone's time.
But you know what - it dosn't matter.  Nothing does.
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster


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

Date: Sat, 02 May 1998 05:02:02 +0200
From: N i c l a s O l o f s s o n <gurun@acc.umu.se>
Subject: Re: QRe: == vs. eq
Message-Id: <354A8CAA.238DF745@acc.umu.se>

Art Cohen wrote:
> N i c l a s O l o f s s o n <gurun@acc.umu.se> wrote:
> : How about, Unix is more intuitive and Windows is less difficult!
> : I would say that when you are used to Unix as opposit to "used to
> : windows") you'll find the Unix extremely intuitive (though more
> : difficult).
> 
> I'm defining intuitive as "easy to figure with no prior experience", so
> "once you are used to Unix" is irrelevant.

I often find myself at the prompt taking my best guess at commands.
Often I succed without ever tried the particular command before. 
That's what I call intuitive OS (no, I'm not _that_ serious about this:)

That's kind of why I like Perl too. A surtain C knowledge (and some
basic regexp knowledge) makes educated guessing in Perl almost
entertaining. FTM, who needs it!

/Niclas


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

Date: Sat, 02 May 1998 00:13:03 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Brian Dwornick <bdwornick@usa.net>
Subject: Re: Redirection
Message-Id: <Pine.GSO.3.96.980501171147.2859b-100000@user2.teleport.com>

On Fri, 1 May 1998, Brian Dwornick wrote:

> print "Location: admin.cgi?username=$username&session=$session";

Well, that's valid Perl code, so that part of your script is fine. Maybe
you've got the wrong text in the string.

If you're following the proper protocol but some browser or server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.

Hope this helps!

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



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

Date: Fri, 01 May 1998 22:34:43 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Test httpd server status
Message-Id: <comdog-ya02408000R0105982234430001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6idbdp$su1@bgtnsc03.worldnet.att.net>, r-watkinsNOSPAM@worldnet.att.net (Robert Watkins) posted:

>I want to write a Perl script that telnets to port 80 of an httpd server, 
>sends the command "HEAD / HTTP/1.0\n\n" and loads the output to a variable. 
>The idea behind this is to then read that variable to see which http response 
>is contained in the line beginning HTTP: if it is 200, great, if not, I will 
>have an e-mail sent to me so that I know something is up. We have, you see, 6 
>web servers running on various boxes under various flavors of Unix, and I want 
>to make this a cron job so that I don't have to worry about checking the 
>server status manually. This is the plan: if there's an easier way to ge the 
>same result, I'ld be quite happy to hear it.

um, just check to see if the server process is still running.  it's 
stores its PID in some file (httpd.pid perhaps).  if it's not running,
just restart it.

#!/bin/sh

if  ps -p `cat /web2/stronghold-2.0.1/logs/httpd.pid` > /dev/null
then
        ... do something maybe ...
else
        /etc/rc2.d/S95httpd start
fi

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Sat, 02 May 1998 03:46:59 GMT
From: r-watkinsNOSPAM@worldnet.att.net (Robert Watkins)
Subject: Re: Test httpd server status
Message-Id: <6ie537$4qs@bgtnsc03.worldnet.att.net>
Keywords: from just another new york perl hacker

In article <comdog-ya02408000R0105982234430001@news.panix.com>, comdog@computerdog.com (brian d foy) wrote:
>>I want to write a Perl script that telnets to port 80 of an httpd server, 
>>sends the command "HEAD / HTTP/1.0\n\n" and loads the output to a variable. 
>> ... to make this a cron job so that I don't have to worry about checking the 
>>server status manually. This is the plan: if there's an easier way to ge the 
>>same result, I'ld be quite happy to hear it.
>
>um, just check to see if the server process is still running.  it's 
>stores its PID in some file (httpd.pid perhaps).  if it's not running,
>just restart it.
>
I wish it were that simple. Netscape Enterprise 3.5.1 running on Irix 6.x can 
sometimes refuse to return web pages even though the server process is still 
running. (Otherwise it would be as simple as reading the output from a 
command such as 'ps -ef | grep http'). In fact, when this happns, all 
processes related to that server must be killed manually, with -9, before the 
server can be restarted. There are some patches that kinda-sorta-maybe will 
address this problem (so says Netscape) but for the time being I want to keep 
on checking!
 -- Robert


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

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

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