[11844] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5444 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 21 18:07:26 1999

Date: Wed, 21 Apr 99 15:01:30 -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, 21 Apr 1999     Volume: 8 Number: 5444

Today's topics:
        Module for drawing graphs billy_collins@my-dejanews.com
    Re: Module for drawing graphs (Greg Bacon)
    Re: Personal Web Server and Perl ccharbeneau@lear.com
        Problem with Expect.pm and 'sudden death' (Joshua Burgin)
    Re: Problem with Expect.pm and 'sudden death' (Joshua Burgin)
    Re: scriptlet to add line breaks at even multiples? <gellyfish@gellyfish.com>
        Tell where lib file is <info@modularcenter.com>
    Re: The question about debug and design <xsilly@java.at>
        using colors in Curses (markus)
    Re: Verifying text in a string <jglascoe@giss.nasa.gov>
    Re: Verifying text in a string <gellyfish@gellyfish.com>
    Re: Verifying text in a string <jglascoe@giss.nasa.gov>
    Re: Viewing a spreadsheet? <john@spam.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 21 Apr 1999 20:55:53 GMT
From: billy_collins@my-dejanews.com
Subject: Module for drawing graphs
Message-Id: <7fle0n$qdv$1@nnrp1.dejanews.com>

Hi,

I am looking for a module that can help me draw bar and line graphs on the
web, based on my database (which is on the server).

I would really appreciate if I can get some recommendations/pointers.

Pls help
Billy


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Apr 1999 21:43:45 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Module for drawing graphs
Message-Id: <7flgqh$4nk$3@info2.uah.edu>

In article <7fle0n$qdv$1@nnrp1.dejanews.com>,
	billy_collins@my-dejanews.com writes:
: I am looking for a module that can help me draw bar and line graphs on the
: web, based on my database (which is on the server).

Search the CPAN modules list:

    <URL:http://www.perl.com/CPAN/modules/01modules.index.html>

Greg
-- 
Those who do not understand UNIX are condemned to reinvent it -- badly.
    -- Henry Spencer


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

Date: Wed, 21 Apr 1999 20:58:10 GMT
From: ccharbeneau@lear.com
Subject: Re: Personal Web Server and Perl
Message-Id: <7fle4v$qfh$1@nnrp1.dejanews.com>

"Mr. Pumpkin" wrote:
>
> I have installed MS PWS on my computer and Perl 5 as well.  The associations
> for both .cgi and .pl work fine (start perl when I double click).

Well, now, I just thought I would cross post this here on the off chance
someone ELSE was having problems with PWS, and whadda ya know..?

Here goes:

HELLLLPPP!!!!!

Someone, last month asked:
> I'm running into the same problems that you are - I can't get the
> scripts to execute, they just print the contents of the script to the
> browser.

I'm having the same problems, but...

I know you need to enable the perl extensions in MMC, which is where MY
question comes in.

The steps involved (of which I have done all but one - The association step,
as you'll see) are:

- Install PWS
- Install Perl for ISAPI (From ActiveState, www.activestate.com, for
instance)
- In IIS4.0 Internet Service Manager (Using Microsoft Management Console
with ISM snap-in)  you need to set the .pl and .plx extensions to the
perl.exe and perlis.dll respectively.

Now, here is my problem.  HOW IN THE HECK DO YOU OPEN MMC with the ISM
snap-in!?!?  I can't find the Snap-in anywhere.  Now, granted, I'm
running on Win98, but in all of the documentation, it is assumed that
this snap in is installed.  I can't open a file called Internet Service
Manager because, as far as I can tell, it doesn't exist on my machine.
I re-installed Option Pack 4, just in case, and nothing, nada, zip.

When I open the MMC and try to add the correct Snap-in, it's nowhere to
be found.

Can someone Please help me? [RTP is fine]

Chuck Charbeneau
ccharbeneau@lear.com
cacharbe@oakland.edu

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Apr 1999 20:13:19 GMT
From: joshua@purestuff.com (Joshua Burgin)
Subject: Problem with Expect.pm and 'sudden death'
Message-Id: <slrn7hscav.6f2.joshua@nothing.izzy.com>

I'm having a problem using Expect.pm that's really difficult for me to
track down.

I have a perl script, which controls another applicatiation via the
functions provided in Expect.pm, and it works perfectly fine from the
command line.

However, when I run it as a cron job, it gets to a place where it's
receiving lots of data from the spawned process being controlled by
expect functions, and just _dies_.

I can't figure out why.

Any ideas?  I've turned on debugging level 2 and 3, and all I can see is
that it dies after receiving about 229 bytes from the spawned process.

Again, I never have a problem on the command line, only from cron.

- Joshua
_________________________________________________________________________
Joshua M. Burgin          | The best things in life aren't things
joshua@purestuff.com      | http://www.purestuff.com


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

Date: 21 Apr 1999 20:33:27 GMT
From: joshua@purestuff.com (Joshua Burgin)
Subject: Re: Problem with Expect.pm and 'sudden death'
Message-Id: <slrn7hsdgn.6f2.joshua@nothing.izzy.com>

In <slrn7hscav.6f2.joshua@nothing.izzy.com>,
Joshua Burgin <joshua@purestuff.com> wrote:

> I'm having a problem using Expect.pm that's really difficult for me to
> track down.
> 
> I have a perl script, which controls another applicatiation via the
> functions provided in Expect.pm, and it works perfectly fine from the
> command line.
> 
> However, when I run it as a cron job, it gets to a place where it's
> receiving lots of data from the spawned process being controlled by
> expect functions, and just _dies_.
> 
> I can't figure out why.
> 
> Any ideas?  I've turned on debugging level 2 and 3, and all I can see is
> that it dies after receiving about 229 bytes from the spawned process.
> 
> Again, I never have a problem on the command line, only from cron.

Here's an example of what the output (from debug level 2) is _supposed_
to be:

Beginning expect from spawn id(3).
Accumulator: ''
Expect timeout time: unlimited seconds.
expect: Pty=spawn id(3), time=924726533, loop_time=undef
expect: handle spawn id(3) ready.
expect: read 40 byte(s) from spawn id(3).
recover standby database until cancel;
expect: handle spawn id(3) ready.
expect: read 229 byte(s) from spawn id(3).
ORA-00279: change 2201073450644 generated at 04/19/99 20:36:25 needed for
thread 1
ORA-00289: suggestion :/arch-01/app/oracle/admin/ae1/arch/redolog-705-1.arc
ORA-00280: change 2201073450644 for thread 1 is in sequence #705
expect: handle spawn id(3) ready.
expect: read 210 byte(s) from spawn id(3).
ORA-00308: cannot open archived log
'/arch-01/app/oracle/admin/ae1/arch/redolog-705-1.arc'
ORA-27037: unable to obtain file status
Digital Unix Error: 2: No such file or directory
Additional information: 3
expect: handle spawn id(3) ready.
expect: read 8 byte(s) from spawn id(3).
SVRMGR> Matched pattern 1 ('SVRMGR> ')!

But when run from cron, the output stops before the second 'handle spawn
id(3) ready', like this:

Beginning expect from spawn id(3).
Accumulator: ''
Expect timeout time: unlimited seconds.
expect: Pty=spawn id(3), time=924726533, loop_time=undef
expect: handle spawn id(3) ready.
expect: read 40 byte(s) from spawn id(3).
recover standby database until cancel;
expect: handle spawn id(3) ready.
expect: read 229 byte(s) from spawn id(3).
ORA-00279: change 2201073450644 generated at 04/19/99 20:36:25 needed for
ORA-00289: suggestion : /arch-01/app/oracle/admin/ae1/arch/redolog-705-1.arc
ORA-00280: change 2201073450644 for thread 1 is in sequence #705

I inserted a sig 'catcher', that waits for any interrupt, kill, hup,
pipe, chld, etc. signal and will print out some info about the states of
various processes, but it's never tripped when this happens.

Any ideas?

- Joshua
_________________________________________________________________________
Joshua M. Burgin          | The best things in life aren't things
joshua@purestuff.com      | http://www.purestuff.com


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

Date: 21 Apr 1999 21:28:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: scriptlet to add line breaks at even multiples?
Message-Id: <7flftf$pj$1@gellyfish.btinternet.com>

On Tue, 20 Apr 1999 06:41:14 -0700 Larry Rosler wrote:
> In article <7fhldr$a2n$1@nnrp1.dejanews.com> on Tue, 20 Apr 1999 
> 10:37:47 GMT, Ronny <ronald_f@my-dejanews.com> says...
> + In article <371C263B.A747D8FA@counsel.net>,
> +   "Counsel.Net" <webmaster@counsel.net> wrote:
> + > Is there a simple solution for adding linebreaks on long fields?
> + 
> + Not simple maybe.....
> + 
> + $field_with_breaks="";
> + while($your_long_field =~ s/(.{1,80})\s//)
> + {
> +   $field_with_breaks .= "$1\n";
> + }
> 
> A simple substitution operation using that regex would be simply:
> 
>   $your_long_field =~ s/(.{1,80})\s/$1\n/g; 
                                    ^-----------------------------+
In order to prevent a ragged left edge on that one might want \s+ |

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


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

Date: Wed, 21 Apr 1999 16:32:52 -0400
From: "MHCA" <info@modularcenter.com>
Subject: Tell where lib file is
Message-Id: <7flcp2$2vn$1@autumn.news.rcn.net>

Hello,

The standard for importing a library file seems to be:

require "process-lib.pl";

This assumes that the file exists in the directory for perl libraries.  I do
not have access to that directory.  How do I tell perl where to find the
file?

I tried:

require "/share/client/modularcenter.com/htdocs/form_test/process-lib.pl";


THANK YOU.




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

Date: Wed, 21 Apr 1999 22:19:11 +0200
From: Thomas Eichberger <xsilly@java.at>
Subject: Re: The question about debug and design
Message-Id: <371E32BF.7954506A@java.at>

Design: read the books from Peter Coad:-)

Carfield Yim wrote:

> I am a starter of programming,
> I find I always have no idea how to design and I always debug by "try
> and error"
>
> How can I train my design and debug skill?

--    Thomas Eichberger
--    Softwareentwicklung und Schulungen,
--    Spezialisiert auf Java; Sun zertifizierter Java Trainer
--    A-1230 Vienna, Austria (Europe), phone/fax: +43-01- 88 616 85
--    http://www.java.at, e-mail: xsilly@java.at




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

Date: 21 Apr 1999 19:22:25 GMT
From: drbrain@ziemlich.org (markus)
Subject: using colors in Curses
Message-Id: <slrn7hs9bh.m84.drbrain@josefine.ben.tuwien.ac.at>
Keywords: perl, curses, color

Hello,

	I'm trying to get color output using Curses, but
	it doesnt seem to work. I'm using a terminal
	which has the capability of colors (slink/xterm-color),
	mc etc. works quit good.

	When using the package Term::ANSIColor i can get
	colors, but it doesnt work in conjunction with Curses,
	which has his own code to deal with colors.

	I guess its mainly a problem that i am not familiar
	with ncurses at all. I'm trying to get colors with the folowing
	perl script :

 #!/usr/bin/perl
 initscr;
 start_color;
 if( has_colors) { addstr( 10, 10, "has_colors");
 } else { addstr( 10, 10, "no has_colors"); }
 $win = newwin(0,0,0,0);
 attrset( COLOR_WHITE);
 addstr( 12,10,"colored output");
 refresh($win);
 getch;
 endwin();

	For someone having expirience, this must look like crap. I'm
	trying this without OO, because my OO script always terminates
	at $curs->start_colors; with "invalid # of arguments". But the
	man page says, no arguments for start_color.

	I would really appriciate if someone can fix the code above or
	provide me an example (OO prefered) of a working programm.

	sincerly,
		markus


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

Date: Wed, 21 Apr 1999 16:38:39 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: jharmor@my-dejanews.com
Subject: Re: Verifying text in a string
Message-Id: <371E374F.E215DE18@giss.nasa.gov>

jharmor@my-dejanews.com wrote:
> 
> I am looking for an easy way to verify that the chars, in a three char string
> are only in the sets [A-Z] or [a-z] or [0-9] and contain no other chars i.e.
> (@.*&).

die unless $string =~ /^[a-z0-9]{3,}$/i;

or, if you don't wish to assert string length is 3,

die if $string =~ /[^a-z0-9]/i;

	Jay Glascoe


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

Date: 21 Apr 1999 20:43:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Verifying text in a string
Message-Id: <7flda8$ol$1@gellyfish.btinternet.com>

On Wed, 21 Apr 1999 21:58:59 +0300 Jukka Juslin wrote:
> jharmor@my-dejanews.com wrote:
>> 
>> I am looking for an easy way to verify that the chars, in a three char string
>> are only in the sets [A-Z] or [a-z] or [0-9] and contain no other chars i.e.
>> (@.*&).
>> The string was created by user input and I am trying to strip out non text
>> chars.
> 
> The answer is quite obviously \W switch, for example:

What \W 'switch' ?

> $name =~ s/\W.*//;
> 

Er yes however if you had tested it you would have realized what would
have happened if you used this on a string such as :


$name = "&@Thisistherestofthestring";


Your regular expression matches one non-word character followed by zero
or more of any character whatsoever - thus deleting everything after
any non-word character.

I would recommend spending a night in with the perlre manpage.

And testing your code before posting is generally considered to be a
good thing around here.

/J\

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


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

Date: Wed, 21 Apr 1999 17:32:19 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
Subject: Re: Verifying text in a string
Message-Id: <371E43E3.6EAD4BA4@giss.nasa.gov>

Larry Rosler wrote:
> 
> Ignore anyone who shows a regex solution (though I doubt they'll dare to
> now :-).  It will be an order of magnitude slower.

mmmm. no.

It obviously depends on your input, e.g. a 3 character
string will take a nano-second either way.

or consider a silly case where the "tr//" approach,
counting the number of chars you don't like, is in
fact a couple orders of magnitudes slower than a regex:

use strict;

my $string = join '', map { chr int rand 256 } (1..10000);
my $lar = sub { $string =~ tr/A-Za-z0-9//c };
my $jay = sub { $string =~ /[^a-z0-9]/i };

use Benchmark;
timethese 10000, { lar => $lar, jay => $jay };

	Jay Glascoe
-- 
"Leapin' lizards!"
   --Orphan Annie


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

Date: Wed, 21 Apr 1999 20:55:41 GMT
From: John <john@spam.com>
Subject: Re: Viewing a spreadsheet?
Message-Id: <371E3BBE.2A260AA3@spam.com>

what a bizarre response.

I'm new to Perl, but suspect you can do it like this: (if you're on windows,
which you probably are considering you're using Excel). Create an ODBC
connection to the Excel file, then open it as you would a database. print what
you've retrieved to the page output from the Perl program.



Tom Christiansen wrote:

>  [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, vivekvp@yahoo.com writes:
> :I am looking to display a spreadsheet via html.  I would like to take the
> :contents of an excel spreadsheet and be able to dump them to a web page.
>
> My guess is in your case, you shell out your shekels and pay the Gods
> of Redmond their due.  That's just a guess based on apparent posting
> environment and general inferred levels of cluefulness.
>
> Hint: you posted to the wrong newsgroup.
>
> --tom
> --
> You can measure a programmer's perspective by noting his attitude on
> the continuing viability of FORTRAN.



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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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