[13781] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1191 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 22:43:05 1999

Date: Wed, 27 Oct 1999 19:42:24 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941078544-v9-i1191@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 27 Oct 1999     Volume: 9 Number: 1191

Today's topics:
        Perl disallowed at ACM programming contests? rdosser@my-deja.com
    Re: Perl disallowed at ACM programming contests? <aqumsieh@matrox.com>
    Re: Perl disallowed at ACM programming contests? (Eric Bohlman)
    Re: Perl disallowed at ACM programming contests? (Tad McClellan)
    Re: Perl disallowed at ACM programming contests? <rootbeer@redcat.com>
        PERL for NT and PATH Info.. JDobson@rnib.org.uk
    Re: perl for win32 and date <sswaminathan@micron.com>
    Re: Perl Message Board problem <rootbeer@redcat.com>
        Perl newbie question - arrays of arrays victor_ng@my-deja.com
    Re: Perl newbie question - arrays of arrays victor_ng@my-deja.com
    Re: Perl newbie question - arrays of arrays <lr@hpl.hp.com>
    Re: Perl newbie question - arrays of arrays (Craig Berry)
    Re: Perl newbie question - arrays of arrays victor_ng@my-deja.com
    Re: Perl newbie question - arrays of arrays (Alan Curry)
        Perl vs C <manm@luscious.dcs.ed.ac.uk>
    Re: Perl vs C (A.J. Norman)
    Re: Perl vs C (Abigail)
    Re: Perl vs C c_j_marshall@my-deja.com
    Re: Perl vs. REBOL <bogart@exis.net>
        Perl, Java, Javascript Jnr and Snr. Production Engineer lynnp@misconsult.com
        perl/cgi calling a window-based program <Chunyen.Liu@garmin.com>
    Re: perl/cgi calling a window-based program (Michel Dalle)
        perldoc output formatting <r28629@email.sps.mot.com>
    Re: perldoc output formatting <r28629@email.sps.mot.com>
    Re: perldoc output formatting <aqumsieh@matrox.com>
    Re: PerlScript for ASP installation problem (Jenda Krynicky)
        Perlshop <arnold@monstermakers.com>
    Re: Perlshop <gellyfish@gellyfish.com>
    Re: Perlshop (Tad McClellan)
    Re: Perlshop (Michel Dalle)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 25 Oct 1999 21:07:11 GMT
From: rdosser@my-deja.com
Subject: Perl disallowed at ACM programming contests?
Message-Id: <7v2gps$o34$1@nnrp1.deja.com>

Greetings,

I'm trying to track down a story I heard once. It claimed that a single
programmer using perl outdid all other teams at an ACM programming
competition, and that perl was subsequently disallowed.

Net legend or what?

Thanks,
Ralph Dosser


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


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

Date: Tue, 26 Oct 1999 14:28:27 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl disallowed at ACM programming contests?
Message-Id: <x3yyacq7z90.fsf@tigre.matrox.com>


tadmc@metronet.com (Tad McClellan) writes:

> Keith did not merely win, he conquered. He solved five of
> the six problems   in the three hours allotted. The
> second-place two-person team solved only   three problems. 
> They, needless to say, were not using Perl.

This got me curious. I can see how Perl can tremendously cut down on
the programming time, but where there any limits as to how fast your
programs take to run? Do you also know what the nature of the
questions was?

--Ala



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

Date: 26 Oct 1999 20:33:46 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Perl disallowed at ACM programming contests?
Message-Id: <7v537a$q6$1@nntp1.atl.mindspring.net>

Tad McClellan (tadmc@metronet.com) wrote:
: 
: Subject: Perl "Too Good" for UCLA's CSUA programming competition...
: Date: 1998/11/06
: Author: Rich Morin <rdm@cfcl.com>
:                         
: You've got to admire a language that is banned because it
: makes problems   too easy to solve.

The Chicago Perl Mongers adopted this as our new motto earlier this year
(the old one, "doughnuts and dancing girls at every meeting," demanded an
interpretation of "every" that could not be found in any dictionary). 



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

Date: Mon, 25 Oct 1999 15:46:30 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl disallowed at ACM programming contests?
Message-Id: <m2c2v7.gf8.ln@magna.metronet.com>

rdosser@my-deja.com wrote:

: I'm trying to track down a story I heard once. It claimed that a single
: programmer using perl outdid all other teams at an ACM programming
: competition, and that perl was subsequently disallowed.


   That was Keith Chiem at a UCLA programming contest.

   There used to be an article in the "advocacy" section 
   at www.perl.(com|org), but it vanished some time ago.

   I have an old printout of it that I read at the beginning
   of the Continuing Ed Perl class that I teach from time to time.

   Here it is, retreived from deja (the URL given below does 
   not work anymore):

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

Subject: Perl "Too Good" for UCLA's CSUA programming competition...
Date: 1998/11/06
Author: Rich Morin <rdm@cfcl.com>

From http://www.perl.org/advocacy/chiem.html
                        
Perl "Too Good"
                        
This is a true story. Names have not been changed.
                        
UCLA's Computer Science Undergraduate Association regularly
hosts its   programming competition.  Contestants are given
six complex problems and   have three hours to write programs
to solve as many of the problems as   possible.  In 1997, the
rules stated that any programming language could   be used so
long as you solved the problem, so then-undergraduate Keith  
Chiem entered and used Perl.
                        
Keith did not merely win, he conquered. He solved five of
the six problems   in the three hours allotted. The
second-place two-person team solved only   three problems. 
They, needless to say, were not using Perl.
                        
But if you're a UCLA undergraduate contemplating entering
the contest and   using Perl, don't bother.  After Keith's
conquest, Perl was banned from   the contest.
                        
You've got to admire a language that is banned because it
makes problems   too easy to solve.
                        
These days, Keith is a sysadmin at Yahoo! Inc., and is
wondering what to do with the copy of Visual C++ that was his
prize.
                        
--------------------


: Net legend or what?


   I dunno. Sounds legit at least.


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


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

Date: Mon, 25 Oct 1999 15:13:52 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl disallowed at ACM programming contests?
Message-Id: <Pine.GSO.4.10.9910251513030.29843-100000@user2.teleport.com>

On Mon, 25 Oct 1999 rdosser@my-deja.com wrote:

> I'm trying to track down a story I heard once. It claimed that a single
> programmer using perl outdid all other teams at an ACM programming
> competition, and that perl was subsequently disallowed.

I think you're looking for this.

    http://www.domtools.com/mail/futuretech/0032.html

Cheers!

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



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

Date: Wed, 27 Oct 1999 15:14:52 GMT
From: JDobson@rnib.org.uk
Subject: PERL for NT and PATH Info..
Message-Id: <7v74t6$1ru$1@nnrp1.deja.com>

I need to run a program from a directory specified in the PATH... After
adding the PATH to the system PATH information and looking at the PATH
info in NT DOS It actually does appear. When running PERL and running
exactly the same command (`PATH > d:\temp\output.txt`;) It says that
everything but the PATH I added is there!!!! Does anyone know where
PERL for NT get's it's PATH information.

James

Please email any suggestions to me...


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


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

Date: Mon, 25 Oct 1999 10:28:38 -0700
From: Shuba Swaminathan <sswaminathan@micron.com>
To: BabyHawk <Baby_Hawk@hotmail.com>
Subject: Re: perl for win32 and date
Message-Id: <38149346.E1916180@micron.com>

This works for my application:
        $week = ceil((((localtime)[7])+1)/7);
However, this calculates a new week as starting on a Friday. You can
add/subtract days so that your week starts on the day you want it to.

HTH
Shuba.

BabyHawk wrote:

> Hi people...
>
> within a perl script under winNT and activestate perl i want to
> determine to which number of week (1...52) the day before belongs to.
> How can that be done?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.



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

Date: Mon, 25 Oct 1999 13:25:50 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl Message Board problem
Message-Id: <Pine.GSO.4.10.9910251325230.29843-100000@user2.teleport.com>

On Sun, 24 Oct 1999, Iain wrote:

> How can I use perl in my .cgi script to get the
> user data to the message board?

It sounds as if you want to use LWP to send a request. Cheers!

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



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

Date: Tue, 26 Oct 1999 20:06:24 GMT
From: victor_ng@my-deja.com
Subject: Perl newbie question - arrays of arrays
Message-Id: <7v51jt$ier$1@nnrp1.deja.com>

I'm having problem with a pretty simple problem.
I want to create an array of arrays (call it
'newrows') from another array 'datarows'.

My code is like this:

for $i(0..$#datarows) {
  $temprow = [];
  push (@temprow, $datarows[$i][0]);
  push (@temprow, $datarows[$i][1]);
  push (@newrows, [temprow]);
}

Then I want to index the data in the @newrows
array.  What am I doing wrong here?

Vic


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


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

Date: Wed, 27 Oct 1999 15:02:14 GMT
From: victor_ng@my-deja.com
Subject: Re: Perl newbie question - arrays of arrays
Message-Id: <7v745i$1ah$1@nnrp1.deja.com>

In article <s1camn20r0863@corp.supernews.com>,
  cberry@cinenet.net (Craig Berry) wrote:

> All of them depend on putting the array references (which are scalars,
> remember) contained in @datarows sequentially into $_, then using @ to
> dereference this as an array, and [x, y] array slice syntax to pull
out
> the first two elements of that referenced array.

Thanks, that did help me out.

One of the things that's confusing me is how objects are
created/destroyed (I'm usually tapping out C++).

Do I generally assume that everything is copy by value when things are
assigned?  For example, if I have a loop that pushes some scalar into an
array, do I just always assume that the original scalar and the one in
the array are two different entities?

If so, is there a way to make a reference to a scalar so that my array
can point back to the original scalar? (hope that's not too confusing)

Vic


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


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

Date: Wed, 27 Oct 1999 08:49:43 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Perl newbie question - arrays of arrays
Message-Id: <MPG.1280beedbabc82a498a13d@nntp.hpl.hp.com>

In article <7v745i$1ah$1@nnrp1.deja.com> on Wed, 27 Oct 1999 15:02:14 
GMT, victor_ng@my-deja.com <victor_ng@my-deja.com> says...

 ...
 
> Do I generally assume that everything is copy by value when things are
> assigned?  For example, if I have a loop that pushes some scalar into an
> array, do I just always assume that the original scalar and the one in
> the array are two different entities?

Yes.

> If so, is there a way to make a reference to a scalar so that my array
> can point back to the original scalar? (hope that's not too confusing)

Yes.  Push a reference to the scalar, instead of the value itself.  See 
perlref for details.

    push @array, \$x;

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


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

Date: Tue, 26 Oct 1999 22:27:35 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl newbie question - arrays of arrays
Message-Id: <s1camn20r0863@corp.supernews.com>

victor_ng@my-deja.com wrote:
: I'm having problem with a pretty simple problem.
: I want to create an array of arrays (call it
: 'newrows') from another array 'datarows'.

The first thing to do is to change the way you think. :)  Perl can't do
arrays of arrays, since array elements are scalars.  *But*, it can do
arrays of array refererences, since refs are scalars.  So you want to
create an array of array refs.

: My code is like this:
: 
: for $i(0..$#datarows) {
:   $temprow = [];
:   push (@temprow, $datarows[$i][0]);
:   push (@temprow, $datarows[$i][1]);
:   push (@newrows, [temprow]);
: }
: 
: Then I want to index the data in the @newrows
: array.  What am I doing wrong here?

One set of wrong useages, all connected to your not understanding
dereferencing yet -- which is admittedly a hard part of the language for
many people.  Also a few stylistically objectionable practices.  Here's
how I'd code the above:

  foreach (@datarows) {
    push @newrows, [@$_[0, 1]];
  }

Or for more recent Perls,

  push @newrows, [@$_[0, 1]] foreach @datarows;

Or an alternate solution,

  @newrows = map { [@$_[0, 1]] } @datarows;

which on reflection I think I like best.

All of them depend on putting the array references (which are scalars,
remember) contained in @datarows sequentially into $_, then using @ to
dereference this as an array, and [x, y] array slice syntax to pull out
the first two elements of that referenced array.

HTH...

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Tue, 26 Oct 1999 22:34:51 GMT
From: victor_ng@my-deja.com
Subject: Re: Perl newbie question - arrays of arrays
Message-Id: <7v5aab$p0m$1@nnrp1.deja.com>

In article <7v51jt$ier$1@nnrp1.deja.com>,
  victor_ng@my-deja.com wrote:
> I'm having problem with a pretty simple problem.
> I want to create an array of arrays (call it
> 'newrows') from another array 'datarows'.
>
> My code is like this:
>
> for $i(0..$#datarows) {
>   $temprow = [];
>   push (@temprow, $datarows[$i][0]);
>   push (@temprow, $datarows[$i][1]);
>   push (@newrows, [temprow]);
> }


Well, I'll answer my own question, the last line of push needs to be:
push (@newrows, [@temprow]);

Then the reference to get to the data is $newrows[$i][$j].



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


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

Date: Tue, 26 Oct 1999 20:37:05 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Perl newbie question - arrays of arrays
Message-Id: <RhoR3.40215$E_1.2308839@typ11.nn.bcandid.com>

In article <7v51jt$ier$1@nnrp1.deja.com>,  <victor_ng@my-deja.com> wrote:
>for $i(0..$#datarows) {
>  $temprow = [];
>  push (@temprow, $datarows[$i][0]);
>  push (@temprow, $datarows[$i][1]);
>  push (@newrows, [temprow]);
>}

@temprow and $temprow have nothing in common except the name. And the temprow
in [temprow] is yet a third item (probably being treated as a string
literal).

You're in need of use strict;

Here's your code with minimal alterations to be strict (and work):

for my $i (0..$#datarows) {
  my $temprow = [];
  push(@{$temprow}, $datarows[$i][0]);
  push(@{$temprow}, $datarows[$i][1]);
  push(@newrows, [ @{$temprow} ] );
}

But that's pretty cluttered. Here's the easy way:

for (@datarows) {
  push(@newrows, [ $_->[0], $_->[1] ]);
}

Or if you don't mind slicing an array ref:

push @newrows, map { [ @{$_}[0,1] ] } @datarows;

If @newrows was empty before the loop, that can be shortened to

@newrows=map[@$_[0,1]],@datarows; # golf
-- 
Alan Curry    |Declaration of   | _../\. ./\.._     ____.    ____.
pacman@cqc.com|bigotries (should| [    | |    ]    /    _>  /    _>
--------------+save some time): |  \__/   \__/     \___:    \___:
 Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman


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

Date: Tue, 26 Oct 1999 13:56:51 +0100
From: Mani Mohanathas <manm@luscious.dcs.ed.ac.uk>
Subject: Perl vs C
Message-Id: <Pine.LNX.3.96.991026134523.12182A-100000@luscious.dcs.ed.ac.uk>

Hi,

I am doing a project based on having to write a neural net in C, and the
actuall data prepration to train the neural net in Perl. 

But unfortunatly I have a file with some 1million datasets hence I am
planning on using 75% to train it. Hence I need to prpare each individual
dataset, then pass it through to the neural net for training. I wanted to
do this online, as in prepare the dataset, then pss it inot the neural
net. Hence the data preration will always be 1step ahead of the neural
net. My main concern is that given the speed of C, that perl will always
be holding up the C, due to its speed.

So my question is is there anyway that I could get Perl to run at the same
speed or, even near the speed of C ? Or should I just basically do the
data preaprtion by other means (any suggestions ?)?

Thanks - Mani




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

Date: 26 Oct 1999 16:08:27 +0100
From: nja@le.ac.uk (A.J. Norman)
Subject: Re: Perl vs C
Message-Id: <7v4g5b$2n9pk@harrier.le.ac.uk>

 In article 
 <Pine.LNX.3.96.991026134523.12182A-100000@luscious.dcs.ed.ac.uk>, 
 Mani Mohanathas <manm@luscious.dcs.ed.ac.uk> wrote: 
 
 > Hi, I am doing a project based on having to write a neural net in C, 
 > and the actuall data prepration to train the neural net in Perl.  
 ...
 > My main concern is that given the speed of C, that perl will always 
 > be holding up the C, due to its speed.  So my question is is there 
 > anyway that I could get Perl to run at the same speed or, even near 
 > the speed of C ?  

 You aren't clear about what the Perl and C will be doing - are you 
 saying the training of the net will be done with Perl, or is the Perl 
 going to be "preparing" the data (sorting?  winnowing?) and then 
 feeding it to a C net for training?  If it's the latter I wouldn't 
 worry, since training the net is going to take far longer than the 
 preparation, even given the speed difference between Perl and C 
 (which may well be less than you think anyway).  
 
-- 
Andrew Norman, Leicester, England
nja@le.ac.uk || andrew.norman@le.ac.uk
http://www.le.ac.uk/engineering/nja/


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

Date: 26 Oct 1999 11:46:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl vs C
Message-Id: <slrn81bmmp.fji.abigail@alexandra.delanet.com>

Mani Mohanathas (manm@luscious.dcs.ed.ac.uk) wrote on MMCCXLVII September
MCMXCIII in <URL:news:Pine.LNX.3.96.991026134523.12182A-100000@luscious.dcs.ed.ac.uk>:
__ 
__ I am doing a project based on having to write a neural net in C, and the
__ actuall data prepration to train the neural net in Perl. 
__ 
__ But unfortunatly I have a file with some 1million datasets hence I am
__ planning on using 75% to train it. Hence I need to prpare each individual
__ dataset, then pass it through to the neural net for training. I wanted to
__ do this online, as in prepare the dataset, then pss it inot the neural
__ net. Hence the data preration will always be 1step ahead of the neural
__ net. My main concern is that given the speed of C, that perl will always
__ be holding up the C, due to its speed.
__ 
__ So my question is is there anyway that I could get Perl to run at the same
__ speed or, even near the speed of C ? Or should I just basically do the
__ data preaprtion by other means (any suggestions ?)?


You are comparing apples and oranges. The ``C'' part is doing something
else than the ``Perl'' part. What if the neural net would be faster
than the data preparation, even if that was written in C?

If speed is really an issue, you should probably code in C. But whether
it's worthwhile for your project, there's way to little information.

Try it out, and see if it's fast enough.



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


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


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

Date: Tue, 26 Oct 1999 14:34:06 GMT
From: c_j_marshall@my-deja.com
Subject: Re: Perl vs C
Message-Id: <7v4e4v$30k$1@nnrp1.deja.com>

In article
<Pine.LNX.3.96.991026134523.12182A-100000@luscious.dcs.ed.ac.uk>,
  Mani Mohanathas <manm@luscious.dcs.ed.ac.uk> wrote:
> Hi,
>
> I am doing a project based on having to write a neural net in C, and
the
> actuall data prepration to train the neural net in Perl.
>
> But unfortunatly I have a file with some 1million datasets hence I am
> planning on using 75% to train it. Hence I need to prpare each
individual
> dataset, then pass it through to the neural net for training. I wanted
to
> do this online, as in prepare the dataset, then pss it inot the neural
> net. Hence the data preration will always be 1step ahead of the neural
> net. My main concern is that given the speed of C, that perl will
always
> be holding up the C, due to its speed.
>
> So my question is is there anyway that I could get Perl to run at the
same
> speed or, even near the speed of C ? Or should I just basically do the
> data preaprtion by other means (any suggestions ?)?
>
>

Hence I would hence suggest that you hence run perl with the
-hencefaster flag which, hence, makes perl run at C speeds.

Hence we don't hence usually use it ourselves because, hence, we like
our code to run slowly hence.







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


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

Date: Tue, 26 Oct 1999 13:14:11 -0400
From: Ed Bogart <bogart@exis.net>
Subject: Re: Perl vs. REBOL
Message-Id: <3815E163.E33A1B3F@exis.net>



James Tsai wrote:
> 
> Hello CLPMers,
> 
> I'm James Tsai and I'm in Billy's group for the project htat we're working on.
> I'm a little bit concerned about the negativity I'm reading in the threads on
> his question.
> 
> We decided as a group that it was a good idea for a post to what we figured was
> an open forum of ideas of topics related to Perl language topics.
> 
> No, we are not asking for anyone to write our project for us. Any good research
> project requires research and we figured, what better than asking the veteran
> Perl community about Perl in comparison to what seems like a budding language?
> We are simple college students that like you at one point needed to learn things
> from someone. We can't all learn everything on our own through books and just
> "trying things" on our own -- this is where the sense of community that
> programmers need to develop, and reading what Larry Wall has written, I would
> think that there would be some community and pride in their language.
> 
[snip -- You do know what a snip is I hope.]
> 
> -- James Tsai
> CS III, University of Virginia.
> jtsai@virginia.edu
> 
Perhaps this discussion could be brought to a more civilized conclusion if you
would post the name and e-mail address of your instructor so that the arrogant
fossils on the group could be reassured that classes have really changed that
much since we were mere under grads. 

Ed


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

Date: 26 Oct 1999 02:48:12 GMT
From: lynnp@misconsult.com
Subject: Perl, Java, Javascript Jnr and Snr. Production Engineers required immediately by progressive web development company downtown Toronto
Message-Id: <7v34pc$j7v@GRACE1.SPANIT.COM>

CGI fundamentals
database concepts
oo analysis and desgin
strong familiarity withUnix (solaris preferred) and/or Windows NT

send resume asap


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

Date: Tue, 26 Oct 1999 08:43:55 -0500
From: "Liu, Chunyen" <Chunyen.Liu@garmin.com>
Subject: perl/cgi calling a window-based program
Message-Id: <74471DFD03A7D11191E000600852EC6F04A163F9@DALLAS>

Hello,
I am trying to use perl/cgi to invoke a window-based program
through the web browser because DC (device context) is needed
to get the final graphics.  Looks like the window never gets
opened.   Similar calls work for command-line applications.
Can anyone give me pointers?  Thanks.

- Chunyen



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

Date: Wed, 27 Oct 1999 09:27:37 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: perl/cgi calling a window-based program
Message-Id: <7v6gs1$r8s$3@news.mch.sbs.de>

In article <74471DFD03A7D11191E000600852EC6F04A163F9@DALLAS>, "Liu, Chunyen" <Chunyen.Liu@garmin.com> wrote:
>Hello,
>I am trying to use perl/cgi to invoke a window-based program
>through the web browser because DC (device context) is needed
>to get the final graphics.  Looks like the window never gets
>opened.   Similar calls work for command-line applications.

The device context of the web browser, or that of the console
of your webserver maybe ? Seems like a silly way to generate
graphics for the web, don't you think ?

>Can anyone give me pointers?  Thanks.
>- Chunyen

Can't your program output graphics to a file (or stdout), so
that your Perl script can forward it to the webbrowser ?

Or if you're using some XWindows workstation, maybe it could launch
the program with the display set to your X server ? It wouldn't come
out in your browser, but you would still get the graphics on your
screen...

Michel.


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

Date: Tue, 26 Oct 1999 12:20:27 -0500
From: TK Soh <r28629@email.sps.mot.com>
Subject: perldoc output formatting
Message-Id: <3815E2DB.E797659E@email.sps.mot.com>

whenever I do 'perldoc -[fq] something', perldoc does not seem to be
able to format the output properly:

---- 
$ perldoc -f oct
=item oct EXPR

=item oct

Interprets EXPR as an octal string and returns the corresponding
value.  (If EXPR happens to start off with C<0x>, interprets it as a
hex string.  If EXPR starts off with C<0b>, it is interpreted as a
binary string.)  The following will handle decimal, binary, octal, and
hex in the standard Perl or C notation:

    $val = oct($val) if $val =~ /^0/;

If EXPR is omitted, uses C<$_>.  This function is commonly used when
a string such as C<644> needs to be converted into a file mode, for
example. (Although perl will automatically convert strings into
numbers as needed, this automatic conversion assumes base 10.)

----
In comparison, here's the extract from 'perldoc perlfunc':

       oct EXPR

       oct     Interprets EXPR as an octal string and returns the
               corresponding value.  (If EXPR happens to start
               off with 0x, interprets it as a hex string.  If
               EXPR starts off with 0b, it is interpreted as a
               binary string.)  The following will handle
               decimal, binary, octal, and hex in the standard

----

what am I missing here?

-TK


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

Date: Wed, 27 Oct 1999 16:20:14 -0500
From: TK Soh <r28629@email.sps.mot.com>
Subject: Re: perldoc output formatting
Message-Id: <38176C91.8C1F7464@email.sps.mot.com>

Ala Qumsieh wrote:
> 
> TK Soh <r28629@email.sps.mot.com> writes:
> 
> > whenever I do 'perldoc -[fq] something', perldoc does not seem to be
> > able to format the output properly:
> 
> [snip]
> 
> > what am I missing here?
>
> perldoc comes with a help menu. Why didn't you check it out?
> 
> % perldoc -h

I usually do 'perldoc perldoc'

> What you need, my friend, is the -t option.
> 
>         % perldoc -tf <your favourite Perl func>

ahh..! this is what I was missing :-)
 
> --Ala

Thanks,
-TK


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

Date: Wed, 27 Oct 1999 11:20:16 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: perldoc output formatting
Message-Id: <x3ypuy096fk.fsf@tigre.matrox.com>


TK Soh <r28629@email.sps.mot.com> writes:

> whenever I do 'perldoc -[fq] something', perldoc does not seem to be
> able to format the output properly:

[snip]

> what am I missing here?

perldoc comes with a help menu. Why didn't you check it out?

% perldoc -h
perldoc [options] PageName|ModuleName|ProgramName...
perldoc [options] -f BuiltinFunction
perldoc [options] -q FAQRegex
 
Options:
    -h   Display this help message
    -r   Recursive search (slow)
    -i   Ignore case 
    -t   Display pod using pod2text instead of pod2man and nroff
             (-t is the default on win32)
    -u   Display unformatted pod text
    -m   Display module's file in its entirety
    -l   Display the module's file name
    -F   Arguments are file names, not modules
    -v   Verbosely describe what's going on
    -X   use index if present (looks for pod.idx at
         /opt/perl-5.005_03/lib/5.00503/sun4-solaris) 
    -q   Search the text of questions (not answers) in perlfaq[1-9]
 
PageName|ModuleName...
         is the name of a piece of documentation that you want to look at. You 
         may either give a descriptive name of the page (as in the case of
         `perlfunc') the name of a module, either like `Term::Info', 
         `Term/Info', the partial name of a module, like `info', or 
         `makemaker', or the name of a program, like `perldoc'.
 
BuiltinFunction
         is the name of a perl function.  Will extract documentation from
         `perlfunc'.
 
FAQRegex
         is a regex. Will search perlfaq[1-9] for and extract any
         questions that match.
 
Any switches in the PERLDOC environment variable will be used before the 
command line arguments.  The optional pod index file contains a list of
filenames, one per line.
 

What you need, my friend, is the -t option.

	% perldoc -tf <your favourite Perl func>

--Ala



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

Date: Tue, 26 Oct 1999 18:34:54 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: PerlScript for ASP installation problem
Message-Id: <1104_940962894@prague_main>

On Sun, 24 Oct 1999 23:18:36 GMT, petrovitch@my-deja.com wrote:
> Most of the PerlScript functions work fine, but I haven't been able to
> make the read/write file functions work.  Is there a users manual,
> books, or list of working examples from which to choose?
> 
> It's easy to do "Hello World".  I'm talking about some real scripts.

I can't give you scripts, but this URL should get you going ;-)

http://www.fastnetltd.ndirect.co.uk/Perl/

Jenda
http://Jenda.Krynicky.cz



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

Date: Tue, 26 Oct 1999 20:13:24 -0400
From: Arnold Goldman <arnold@monstermakers.com>
Subject: Perlshop
Message-Id: <3816431E.3126@monstermakers.com>

Hello:

Wondering if my might be able to draw on the collective wisdom of this
newsgroup. I have had PerlShop running on my website flawlessless for
many months when all the sudden it reports, " Invalid Transmission #3
received from: 207.86.135.21 If your connection was interrupted, you
must Enter the shop from the beginning again."  I have not touched the
script in any way. Does anyone know what causes this problem? What could
change at the server that might result in this error? This happened to
me once before and in both cases the server would not own up to the
problem and in the first instanced it miraculously fixed itself after
two weeks of bitching and moaning. The would not tell me what they did
to fix things. If anyone cares to see, the page is at
http://216.22.158.174/cgi-bin/monstershop/catalog/index.html

Any thoughts would be greatly appreciated.

arnold@monstermakers.com


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

Date: 27 Oct 1999 11:08:37 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perlshop
Message-Id: <3816cf25_1@newsread3.dircon.co.uk>

Arnold Goldman <arnold@monstermakers.com> wrote:
> 
> Wondering if my might be able to draw on the collective wisdom of this
> newsgroup. I have had PerlShop running on my website flawlessless for
> many months when all the sudden it reports, " Invalid Transmission #3

I would suggest searching for  "Invalid Transmission #" on Deja News
<http://www.deja.com> as this comes up regularly ...

/J\
-- 
"Tony Blair. Make it so" - Patrick Stewart


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

Date: Tue, 26 Oct 1999 20:44:58 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perlshop
Message-Id: <auh5v7.1mc.ln@magna.metronet.com>

Arnold Goldman (arnold@monstermakers.com) wrote:

: Wondering if my might be able to draw on the collective wisdom of this
: newsgroup. 

: I have had PerlShop running on my website flawlessless for
: many months when all the sudden it reports, " Invalid Transmission #3
: received from: 207.86.135.21 If your connection was interrupted, you
: must Enter the shop from the beginning again."  


   That is not a Perl message (because it does not appear in
   perldiag.pod where *all* of the messages that perl might
   issue are documented).

   So you don't have a Perl problem.

   You are in the wrong newsgroup.



: Any thoughts would be greatly appreciated.


   1) Contact the author of the script?

   2) Read the code?


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


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

Date: Wed, 27 Oct 1999 09:18:26 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Perlshop
Message-Id: <7v6gaq$r8s$2@news.mch.sbs.de>

In article <3816431E.3126@monstermakers.com>, arnold@monstermakers.com wrote:
>Hello:
>
>Wondering if my might be able to draw on the collective wisdom of this
>newsgroup. I have had PerlShop running on my website flawlessless for
>many months when all the sudden it reports, " Invalid Transmission #3
>received from: 207.86.135.21 If your connection was interrupted, you
>must Enter the shop from the beginning again."
<snip>
>Any thoughts would be greatly appreciated.
>
>arnold@monstermakers.com

Have you looked in Deja yet ?
Hint : search for 'Invalid Transmission'...

Michel.


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 1191
**************************************


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