[8129] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1747 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 27 23:07:41 1998

Date: Tue, 27 Jan 98 20:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 27 Jan 1998     Volume: 8 Number: 1747

Today's topics:
    Re: Are there windows HELP files for Perl? - perlhlp.zi (Martien Verbruggen)
    Re: Book review wanted <cot_tage@azmail.net>
    Re: Creating a serial processing queue <chris@ixlabs.com>
    Re: Creating a serial processing queue <sfink@cs.berkeley.edu>
    Re: Creating a serial processing queue <rootbeer@teleport.com>
    Re: crypt function ... help. <rjk@coos.dartmouth.edu>
    Re: Don't use signal handlers (was Re: Child processes) <joseph@5sigma.com>
        Hello... another prob :( <np59re@mail.telepac.pt>
    Re: Hello... another prob :( (brian d foy)
    Re: HELP HELP HELP!!! - with function call parameters (Martien Verbruggen)
        help with late evaluation ? (D.A.Briggs)
    Re: help: open an existing page and replace parts of it (brian d foy)
    Re: INETD Help (Martien Verbruggen)
    Re: IP Address as new File <rjk@coos.dartmouth.edu>
    Re: is "reverse <>" of a list type? (brian d foy)
        re: kerchop (Terence Kearns)
        loading page after cgi call causes path problems. <mpryor@shareone.com>
    Re: Oraperl to DBI migration issue with ora_bind <zenin@best.com>
    Re: perl4, solaris, varargs (Brendan Macmillan)
    Re: Perl5 on 80286 under DOS (Brendan Macmillan)
    Re: Profiler for Perl4 (yup. Perl4) (Brendan Macmillan)
    Re: Profiler for Perl4 (yup. Perl4) (brian d foy)
    Re: Puzzling behavior of c.l.p.* readers (Nathan V. Patwardhan)
    Re: unix command pipes (Martien Verbruggen)
    Re: unix command pipes <*@qz.to>
        Use of Signals <anthonyl@kodak.com>
        What does this error mean pcpower@kiski.net
    Re: What does this error mean (brian d foy)
    Re: What does this error mean (Martien Verbruggen)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 28 Jan 1998 01:17:34 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Are there windows HELP files for Perl? - perlhlp.zip (1/1)
Message-Id: <6am0ve$dns$7@comdyn.comdyn.com.au>

In article <34cbcfa3.1997325@news.nyu.edu>,
	mjlee@amherst.edu (MJ Lee) writes:
> 
> begin 644 perlhlp.zip
> M4$L#!!0````(`&N6HB`GC6)`.<D#``>O!``(````<&5R;"YH;'#,_7=X$\?W

Please don't post binaries to this newsgroup. It wasn't meant for
that. This thing you just sent to thousands and thousands of computers
on the Internet is now clogging up bandwidth and disk space all over
the place. Your suggestion to the poster to look for it on the web was
well enough.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Little girls, like butterflies, need no
Commercial Dynamics Pty. Ltd.       | excuse - Lazarus Long
NSW, Australia                      | 


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

Date: 28 Jan 1998 03:11:49 GMT
From: "Bob Zwick" <cot_tage@azmail.net>
Subject: Re: Book review wanted
Message-Id: <01bd2b9a$5c8f6020$557d0cd1@cms>

I have that book. It's not exactly a follow me guide, but I use it often
for reference and it has helped me get what I need done.
-- 
Bob Zwick - Cottage Micro Services
103 Vinyard Drive, WaxahachieTX 75167
(972) 435-2446 FAX/VOICE
http://www.cottagemicro.com bob@cottagemicro.com

Brad McFarlane <Brad_McFarlane@qmail.newbridge.com> wrote in article
<Brad_McFarlane-ya023180001601980839390001@newshost>...
> A local remaindered book sale has:
> 
> Teach Yourself CGI Programming with Perl 5 in a week, 2nd Ed.
> 
> by Eric Herrmann (publisher SAMS) for CDN$20, with a CD-ROM included. I
know
> a bit of Perl, and have used the CGI module to do some CGI programming;
> with my appetite whetted, I want to get a bit futher into it, and this
> looks like a good book to help me. I checked various Perl web pages, and
> couldn't find a review of it. Has anybody got it or read it? If so, how
is
> it? I figure for $20 it won't be a big loss, but if it's as bad as some
of
> the books mentioned in the "Camel Critiques", I want to steer clear.
> 
> Any info would be appreciated.
> Thanks,
> Brad
> 
> -- 
> Brad McFarlane
> Newbridge Networks Corp.
> Kanata, Ont. CANADA
> 


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

Date: Tue, 27 Jan 1998 16:47:26 -0800
From: Chris Schoenfeld <chris@ixlabs.com>
To: Craig Berry <cberry@cinenet.net>
Subject: Re: Creating a serial processing queue
Message-Id: <34CE801E.55D9@ixlabs.com>

Hmmmm....
I guess I should have titled the post:
'Creating a *persistant* serial processing queue'

It's CGI, so the processes are discreet and do not share data.

Thanks anyway!
Chris


Craig Berry wrote:
> 
> Chris Schoenfeld (chris@ixlabs.com) wrote:
> : I have an LWP app which automatically POSTs submissions to a CGI
> : application throughout the day...
> :
> : Once in a while, the CGI is unnavailable due to normal, transient
> : internet network glitches.
> :
> : If this happens, it is very important that this submission is queued and
> : that it goes out before any subsequent submissions - the CGI must
> : process the requests serially.
> :
> : I have never done a queueing system and would like some pointers
> : regarding how I might implement this from experienced folks who know the
> : subtleties of such a system.
> 
> Conceptually, this can be very simple.  When you generate an update, put
> it into a single scalar, then push this onto a 'pending' list.  When you
> send updates, send every pending update, pulling them destructively off
> the pending list.  Here's pseudocode:
> 
>   @pending = ();
>   ...
>   my $update = &generateUpdate();    # gU() must return scalar!
>   ...
>   &sendUpdate($update);
>   ...
>   sub sendUpdate
>   {
>     push @pending, shift;
>     shift @pending while (@pending && &sendOneUpdate($pending[0]));
>   }
> 
> HTH...
> 
> ---------------------------------------------------------------------
>    |   Craig Berry - cberry@cinenet.net
>  --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
>    |      Member of The HTML Writers Guild: http://www.hwg.org/
>        "Every man and every woman is a star."


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

Date: Tue, 27 Jan 1998 17:23:42 -0800
From: Steve Fink <sfink@cs.berkeley.edu>
To: chris@ixlabs.com
Subject: Re: Creating a serial processing queue
Message-Id: <34CE889E.4B4A@cs.berkeley.edu>

Chris Schoenfeld wrote:
> 
> Hmmmm....
> I guess I should have titled the post:
> 'Creating a *persistant* serial processing queue'
> 
> It's CGI, so the processes are discreet and do not share data.

You could, but misspelled subject lines seem to get fewer responses.

For persistence, you could do the same thing, but use tied database
variables.

The question is a bit vague, though. Are you worried about two of these
submissions being scheduled simultaneously, or can you assume that the
normally scheduled times are far enough apart that they won't interfere?
Are the submissions idempotent, or do multiple submissions of the same
thing mess you up? Do your submission scripts need to exit quickly (as
in, a user may be waiting for them to finish)?

A simple solution would be to have a daemon (autostarted by the
submission script if it isn't already running) that does all of the
actual submitting. The periodic scripts just send their requests to it
and it queues them in the order they were received. 

As I said, it's a simple solution -- perhaps to the wrong problem. If
you want the queue to survive crashes, you have to work harder by
checkpointing the current queue to a file and basically implementing a
miniature database system.


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

Date: Tue, 27 Jan 1998 16:39:23 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Chris Schoenfeld <chris@ixlabs.com>
Subject: Re: Creating a serial processing queue
Message-Id: <Pine.GSO.3.96.980127163901.22373F-100000@user2.teleport.com>

On Tue, 27 Jan 1998, Chris Schoenfeld wrote:

> I have never done a queueing system and would like some pointers
> regarding how I might implement this from experienced folks who know the
> subtleties of such a system.

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

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



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

Date: Tue, 27 Jan 1998 22:46:19 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: crypt function ... help.
Message-Id: <34CEAA0B.96C725F3@coos.dartmouth.edu>

Bill Jones, FCCJ Webmaster wrote:
> 
> Chipmunk wrote:
> 
> > chad wrote:
> > >
> > > How do I de-crypt a crypt'd string?  I cryp'd it using the perl crypt function.
> >
> > Slowly and painfully.
> >
> > Chipmunk
> 
>  So, Chip, it really can be decrypted?  You shouldn't tease us!

Brute force is slow and painful, isn't it?

:-)

Chipmunk


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

Date: Tue, 27 Jan 1998 19:48:26 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: Don't use signal handlers (was Re: Child processes)
Message-Id: <34CE9C4A.3595E5DC@5sigma.com>

Not to dispute the truth of what you say, because it is true,
but ...

Well, signals do mostly work.  I don't see what's wrong with using
$SIG{CHLD} considering that it certainly will be fixed in the
forseeable future.  I can't remember when I saw $SIG{CHLD} = 
sub { wait } cause a problem.

Besides, how much more suitable for mission critical applications
is the rest of Perl, anyway?  And when you get down to it, there 
is no substitute for installing signal handlers, so we just have
to make the best of what's there now.

	-joseph

Chip Salzenberg wrote:
> 
> According to Michel Prevost <michel.prevost@cactuscom.ca_REMOVE_TO_MAIL>:
> >For this, I've assigned a subroutine reference to $SIG{CHLD}.
> 
> You should not use signal handler subroutines in Perl programs you
> depend on.  Perl doesn't do signals right, yet.
> 
> ($SIG{__WARN__} and $SIG{__DIE__} are not really signal handlers, so
> they're safe.)

-- 
Joseph N. Hall, prop., 5 Sigma Productions       mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training  . . . . . . . . . . . . . . .  http://www.perltraining.com


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

Date: Wed, 28 Jan 1998 02:07:08 -0000
From: "diogo" <np59re@mail.telepac.pt>
Subject: Hello... another prob :(
Message-Id: <6am3ot$kqd$1@duke.telepac.pt>

Thanks for the people who replied to the last post of mine.

But, nothing works. I downloaded perl for Win NT again. And nothing works.
My www directory is in c:\inetpub\wwwroot.

Who can tell me, step by step, how do I install it? In wich folder, wich
path, wich registry key. Or give me the URL. Cause nothing seems to work...

Please?

A desperate perlerer (?),
diogo
Thank you.




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

Date: Tue, 27 Jan 1998 21:38:54 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Hello... another prob :(
Message-Id: <comdog-ya02408000R2701982138540001@news.panix.com>
Keywords: from just another new york perl hacker

Please read this information on how to choose a good subject for a post:
       <URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>

In article <6am3ot$kqd$1@duke.telepac.pt>, "diogo" <np59re@mail.telepac.pt> posted:

>But, nothing works. I downloaded perl for Win NT again. And nothing works.
>My www directory is in c:\inetpub\wwwroot.

-- 
brian d foy                                  <comdog@computerdog.com>
good subject lines allow good filtering


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

Date: 28 Jan 1998 01:29:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: HELP HELP HELP!!! - with function call parameters
Message-Id: <6am1mc$dns$8@comdyn.comdyn.com.au>

[Subject: Re: HELP HELP HELP!!! - with function call parameters]

Capitals are considered shouting. Shouting is rude. Please read the
following article on how to choose good subject lines:

http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

In article <34CDC784.41C67EA6@usl.edu>,
	"Bhanu P. Suravarapu" <bhanu@usl.edu> writes:

> I am using perl5.003.

Upgrade to 5.004_04. It fixes lots of bugs, and adds some extra
thingies.

> open(somefile1....);

Always check the return value of open. Even in an example. Even if
it's only to avoid getting this remark from us.

BTW, this is not code. perl will not compile that statement.

> print somefile1 $nodenumber;

Did you actually open the file for writing?

> $response = &travlink($node);

[snip]

> I have the above code in a loop where $nodenumber takes values 1..9
> My function is something like this:
> sub travlink
> {
> open(somefile....);
> print somefile3 $_[0];

See above on both lines.

> 
> 1;
> }

So, this sub always returns 1? Why bother returning anything at all
then? Why bother looking at the return code?

> Now my problem is somefile1 and somefile2 have values 1..9

Huh? somefile1 and somefile2 are file handles, according to the pseudo
code you submitted above. it should be of no concern to you what
exactly their values are.

> BUT somefile3 has only few values 2,6,8 (say).
> 
> So my function is not being called sometimes I donot know
> why this is happening.

Huh? I don't understand this statement.

> i have spent a lot of time to figure out the existance of this problem.

What problem? it is not clear to me what your problem is. Just that
you get something which you didn't expect.

> 
> PLEASE HELP ME.

Don't shout. Don't beg. It is not exactly endearing.

Please submit the real code. Not the stuff you typed there.  How are
we supposed to know what might be going wrong in your REAL code, if we
only have something you made up, and which is bad code, while you were
posting?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Little girls, like butterflies, need no
Commercial Dynamics Pty. Ltd.       | excuse - Lazarus Long
NSW, Australia                      | 


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

Date: Wed, 28 Jan 1998 01:45:30 GMT
From: D.A.Briggs@bcs.org.uk (D.A.Briggs)
Subject: help with late evaluation ?
Message-Id: <34ce7e27.185652250@news.demon.co.uk>


I  am trying to pass the name and path of  a data file to a sub
routine together with a string to be used to format output for part of
a html form a list  a list of keys  to be used in a associative array.
Apart from probably geting the syntax way off
Is possible to pass the names of varibles to a sub routine
in this fashion, the names to then bound to data in the subroutine and
used to generate the string.
I hope this makes sense to somebody ?


The data file is colon delimited of the form
numeric_id:string1:string2:string3

and the expected out put is of  the form 

<input type="checkbox" name=id value=12</input>   a string
 


$display = $display  . &DisplayData($full_path, "<input
type=\"checkbox\" name= id   value=field[$id]>field[$id]
</input>field[$position]", '(id ,position)');

################
# query datafile
#Returns a formated string including requested variables
#
sub DisplayData{
	$displayString = '<hr>';
#syntax sugar pick out parameters pasted to routine
$filename = $_[0];
$displaymethod =$_[1];
$displaykeys =$_[2]; # 

#open file for reading 
	open(FILE, "$filename") or die "Error opening file filename:
$filename";

#loop through records in a file
	if ($displaymethod) {
		while(<FILE>){
	   		@fields =split /:/;
#pull data out off @fields  in the form $field['key']
$field[position];
			$displaykeys = @fields;
#build up out put string

	   		$displayString = $displayString .
"$displaymethod"}
	}	   
	else{
#do something simple		
	}
close(<FILE>);
return $displayString;
}


D.A.Briggs@bcs.org.uk


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

Date: Tue, 27 Jan 1998 20:28:05 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: help: open an existing page and replace parts of it
Message-Id: <comdog-ya02408000R2701982028050001@news.panix.com>
Keywords: from just another new york perl hacker

In article <OhaFKO4K9GA.269@upnetnews03>, "Ilia Lobsanov" <ilia@NOSPAM.detoronics.net> posted:

>sorry, but which docs?

the ones that came with perl. 

try 

   perldoc perl

from the command line and see what happens.

good luck :)

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


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

Date: 28 Jan 1998 01:11:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: INETD Help
Message-Id: <6am0k1$dns$6@comdyn.comdyn.com.au>

In article <34CCAA30.58B2F10B@dc.net>,
	john -r s <johnrs@dc.net> writes:
> Can anyone please show an  example of running a server program in inetd.
> I understand that all the overhead of creating and listening on a
> particlur socket is removed, but I cant seem to get a server that ran
> fine in standalone to run from inetd.

This is not a perl question. This is a question about a unix specific
functionality. You should ask on one of the unix specific groups.

If you mean: what does a program that is written as a inetd service
need to do: It's still not really a perl issue, but a unix
programmer's issue. Try comp.unix.programmers.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I think I think, therefore I think I
Commercial Dynamics Pty. Ltd.       | am.
NSW, Australia                      | 


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

Date: Tue, 27 Jan 1998 22:12:54 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: IP Address as new File
Message-Id: <34CEA236.B4F2D9D1@coos.dartmouth.edu>

Tom Phoenix wrote:
> 
> On Tue, 27 Jan 1998, Tad McClellan wrote:
> 
> > Derek Blandford (blan0416@uidaho.edu) wrote:
> > : And you do not use parenthesis when printing to the file....
> > :
> > : Jason Hansen wrote:
> > : > print TEMP_FILE ("$remote_address|$url\n");
> 
> > Well, you _can_ use parenthesis when printing if you want to.
> > Of course, you need to do it correctly  ;-)
> >    print(TEMP_FILE "$remote_address|$url\n");
> 
> Not that that is any more correct than what Jason Hansen had written, of
> course. :-)

In fact, I'd say it's *less* correct, as it will result in a warning
message with -w.

Chipmunk


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

Date: Tue, 27 Jan 1998 20:26:25 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: is "reverse <>" of a list type?
Message-Id: <comdog-ya02408000R2701982026250001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6alsat$j1k$1@news.ml.com>, mwang@alhena.ibk.ml.com (Michael Wang) posted:

>The reason I ask this: I am think of writing "tail -n" with perl by
>reversing the lines in a file - reverse is a speedier operations
>which just swap the pointers - and then get first n lines, and then
>reverse them and print it out. 

rather than all that reversing, why not:

   create the array of lines
   find the index of the last element of that array
   print out lines $#array - N to $array

getting rid of the array would probably be even better, but reverse
is absolutely pointless.

however, should you wish to persist, question 9 in Tom C.'s Perl
Wizard's Quiz in this quarter's The Perl Journal may be 
enlightening.

good luck :)

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


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

Date: Wed, 28 Jan 1998 02:21:26 GMT
From: terence[no_spam]@designer-web-pages.com (Terence Kearns)
Subject: re: kerchop
Message-Id: <34cf95fe.18594453@newshost.canberra.edu.au>

On Tue, 27 Jan 1998 10:49:11 -0800, Tom Phoenix
<rootbeer@teleport.com> wrote:

>On Mon, 26 Jan 1998, it was written:
>
>> I had a LOT of trouble trying to find anything that explained basic
>> things properly. ie. couldn't get a straight explanation of how to
>> write a file ... 
>
>The books in the perlbook manpage are good. I'd recommend the Llama for
>this.
>
I realise this now. I was advised to get the Camel but I'm somewhat
frustrated at there being no tutorials (which is of course what the
Llama book is for).

>> took ages before I sussed out you had to 'select' a
>> file handle (which was opened for output). Why didn't any of the
>> documentation just say that. 
>
>Because you don't _have_ to select a filehandle. It's primarily a
>convenience. 
>
Ah yes, now I see that thanks to the helpful folks on usenet.

>> Anyway, I got this far without help but I'm stuck.
>
>In what way are you stuck? Perhaps your program isn't doing something you
>intended, or perhaps it's doing something you didn't intend. Did your
>attempt to run it give you any helpful error messages?
>

Yes I realise I wasn't very clear about what i need help with for
someone who needs it so much. I shall do some more work on "kerchop"
and post it in this thread. This time I will be more explicit in what
I have problems with. There is one thing though ...
 ... So far I've been trying to use the SPLIT funtion to break up a
large file at 'separators' that occur many lines apart. Does anyone
know if SPLIT can do this or is it restricted to breaking things apart
one line at a time where the separator occurs one or more times per
line ?

>> # kerchop is a program for splitting up large ascii files into bight
>> size 
>> # segments (in this case, for the web). 
>
>That sounds a bit like the unix split(1) program. 
>
I just had a look at the man pages for 'split'. It works on a byte
basis rather than searching a file for flags. Thanks for the tip
anyway, I wasn't aware of it's existance. Maybe I should modify my
program description to say "using 'flags' which you specify".

>> 	$outputfile = join ('','>',$prefix,$ticker,$suffix) ;
>
>Generally, this would be written like this, although there's nothing
>really wrong with your method. 
>
>    $outputfile = ">$prefix$ticker$suffix";
>
Wow. That is so much more elegant. I didn't know you could do that
(man, I really need that Llama book - such a basic thing).

>> 	open ( PIECE , $outputfile ) ;
>
>Even when your script is "just an example" (and perhaps especially in that
>case!) you should _always_ check the return value after opening a file.
>

That sounds like a _very_ sensible thing to do. Thanks for that, I
will.

>Hope this helps!

Surly does ! --Thanks.


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

Date: Tue, 27 Jan 1998 21:30:52 -0600
From: Mark Pryor <mpryor@shareone.com>
Subject: loading page after cgi call causes path problems.
Message-Id: <34CEA66C.2ABC@shareone.com>

I have a perl cgi that get some form input, and upon completion,
loads a canned html page - thanking the user for submitting.  However,
if I place links along with the thank you text, it wants to look
in the cgi-bin directory (where the cgi was called) for the files.

Is there a way to just call the cgi, wherever it may be, and return
back to the top to continue normal browsing?

TIA


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

Date: 28 Jan 1998 01:44:47 GMT
From: Zenin <zenin@best.com>
Subject: Re: Oraperl to DBI migration issue with ora_bind
Message-Id: <885952190.3818@thrush.omix.com>

RDSchramm <schramm@one.net> wrote:
	>snip<
: Is there a way to do this in DBI model so that my scalars are not expanded
: into the SQL statement but just dumped to the database as is??

	my $sth = $dbh->prepare ($someInsertOrUpdateStatement)
	    or die $dbh->errstr;
	$sth->execute (@bindValues)
	    or die $dbh->errstr;

-- 
-Zenin
 zenin@best.com


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

Date: 28 Jan 1998 02:03:29 GMT
From: bren@fangorn.cs.monash.edu.au (Brendan Macmillan)
Subject: Re: perl4, solaris, varargs
Message-Id: <6am3lh$g2i$2@towncrier.cc.monash.edu.au>

Tom Phoenix (rootbeer@teleport.com) wrote:
: On 27 Jan 1998, Tony Finch wrote:
: 
: > Our customers want to be able to use perl 4 for their CGI scripts,
: 
: No, they don't. They want to use Perl 5.
*sigh* this is the typical response to any perl4 question. 

There may be a reason the poster said they want "to be able to use perl 4".
Perhaps compatibility with existing CGI scripts? I don't know.

I know I want to use perl4 because there *is no* perl5 for XT PC DOS
computers (ie pretty much the first IBM PC). Just as an aside, Vim works
on my XT DOS box; and very well.

Not winging; just *sighing*.


-- 
Brendan Macmillan


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

Date: 28 Jan 1998 01:56:31 GMT
From: bren@fangorn.cs.monash.edu.au (Brendan Macmillan)
Subject: Re: Perl5 on 80286 under DOS
Message-Id: <6am38f$g2i$1@towncrier.cc.monash.edu.au>

John Shimeld (shimeld@agc.bio.ns.ca) wrote:
: Is there such a beast? My searching of www.perl.com revealed only versions
: that require EMX and, I think, 80386 processors or better.

Look on SimTel for perl - there's version 4, which works fine on my
086 DOS box. But I'm having problems with wildcard expansion...

-- 
Brendan Macmillan


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

Date: 28 Jan 1998 02:04:35 GMT
From: bren@fangorn.cs.monash.edu.au (Brendan Macmillan)
Subject: Re: Profiler for Perl4 (yup. Perl4)
Message-Id: <6am3nj$g2i$3@towncrier.cc.monash.edu.au>

Tom Phoenix (rootbeer@teleport.com) wrote:
: On Tue, 27 Jan 1998 bernie@techwriter.com wrote:
: 
: > I'm familiar with various profilers for Perl5, but I haven't found one
: > for Perl4.
: 
: It's called "perl5". Install that, and you'll get a lot more than a
: profiler. Or do you still use whale oil in your lamps? :-)

Ah, the ever-so-helpful responses to perl4 questions from the perl5
community.


-- 
Brendan Macmillan


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

Date: Tue, 27 Jan 1998 21:40:32 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Profiler for Perl4 (yup. Perl4)
Message-Id: <comdog-ya02408000R2701982140320001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6am3nj$g2i$3@towncrier.cc.monash.edu.au>, bren@fangorn.cs.monash.edu.au (Brendan Macmillan) posted:

>Tom Phoenix (rootbeer@teleport.com) wrote:

>: It's called "perl5". Install that, and you'll get a lot more than a
>: profiler. Or do you still use whale oil in your lamps? :-)
>
>Ah, the ever-so-helpful responses to perl4 questions from the perl5
>community.

it's just "Perl".  don't expect free support for camel carcasses.

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


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

Date: 28 Jan 1998 02:47:22 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Puzzling behavior of c.l.p.* readers
Message-Id: <6am67q$hrq@fridge.shore.net>

Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:

: Let alone that other favourite, Hilter.

Who's crouched down bleeding (from every orifice) under a larch.  :-)

--
Nathan V. Patwardhan
please don't send spam to president@whitehouse.gov


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

Date: 28 Jan 1998 00:44:31 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: unix command pipes
Message-Id: <6alv1f$dns$5@comdyn.comdyn.com.au>

In article <Pine.GSO.3.95L.980127154240.17274B-100000@bonjour.cc.columbia.edu>,
	Sonya Allin <sja3@columbia.edu> writes:

> every time i try this, however, i get the error message 
> 
> 'permission denied'.

Is the first line of your program something like

#!/usr/local/bin/perl -w

? And if it is, is the perl it refers to actually right? And
executable by you? Etc.. Etc..

Btw: If you use the File::Find module, you won't need to use a pipe. 

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: 28 Jan 1998 02:32:14 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: unix command pipes
Message-Id: <qz$9801271818@qz.little-neck.ny.us>

Sonya Allin  <sja3@columbia.edu> wrote:
> right now i am trying to write a line of code in perl which will pipe the
> output of a 'find' into a filehandle.

I think you worded that very poorly. You seem to imply that the filehandle
would have the output, whereas the filehandle gives you a handle on the
output.

In any case a study of "perldoc Find" to read about File::Find might be
a good idea.

> open (FIND, "find $directory -print |") || die "Couldn't find $directory!
> \n";

You should not assume that find is in the path.

> ./myprogram.pl
> every time i try this, however, i get the error message 
> 'permission denied'.
> i have chmod-ed my program so that it should be executable by anyone and

Is the interpreter listed on the #! line executable?

Elijah
------
at least you checked the return value from open()


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

Date: Wed, 28 Jan 1998 14:19:39 +1100
From: Anthony Licciardi <anthonyl@kodak.com>
Subject: Use of Signals
Message-Id: <34CEA3CB.7613@kodak.com>

Can anyone give me an example of how to use SIGALRM?
I want to put into a while loop and have SIGALRM set up with a sleep so
when it has slept for x seconds it breaks out of the while loop.


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

Date: Tue, 27 Jan 1998 20:37:23 -0600
From: pcpower@kiski.net
Subject: What does this error mean
Message-Id: <885954085.1679032334@dejanews.com>

Hello, I am new to Perl and would like to know what this error means in
the following line of code?

print ADDRESS
{"$input{'email'},$input{'LastName'},$input{'FirstName'},$input
{'cityname'},$input{'statename'},$input{'Country'}\n"};

The error is:: Odd number of elements in hash list at /www/cgi-
bin/subscribe.cgi line 31, <ADDRESS> chunk 1.

Please send reply to my e-mail address because my ISP news server is down.

Thanks

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Tue, 27 Jan 1998 21:57:23 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: What does this error mean
Message-Id: <comdog-ya02408000R2701982157230001@news.panix.com>
Keywords: from just another new york perl hacker

In article <885954085.1679032334@dejanews.com>, pcpower@kiski.net posted:

>Hello, I am new to Perl and would like to know what this error means in
>the following line of code?

>The error is:: Odd number of elements in hash list at /www/cgi-
>bin/subscribe.cgi line 31, <ADDRESS> chunk 1.

it means that there is an odd (as opposed to even) number of elements 
in the hash list.  there should be an even number so that everyone
has a friend...

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


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

Date: 28 Jan 1998 03:04:11 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: What does this error mean
Message-Id: <6am77b$ei6$1@comdyn.comdyn.com.au>

[Posted and Mailed]

In article <885954085.1679032334@dejanews.com>,
	pcpower@kiski.net writes:

> Hello, I am new to Perl and would like to know what this error means in
> the following line of code?
 
[reformat]

1) print ADDRESS
2) {
3)	"
4)	$input{'email'},$input{'LastName'},$input{'FirstName'},
5)	$input{'cityname'}, $input{'statename'},$input{'Country'}
6)	\n
7)	"
8) };

Formatted this way: 
Lines 2 and 8 create a reference to an anonymous array.
Lines 3 and 7 quote whatever is between them.
Line 4, 5 and 6 are just whatever is sitting in the string.

NB: This is not the same as what you submitted. My example introduces
some newlines in the string. This was just reformatted for clarity.

> The error is:: Odd number of elements in hash list at /www/cgi-
> bin/subscribe.cgi line 31, <ADDRESS> chunk 1.

Yep, that's right. You create a reference to an anonymous hash with
only one element, which is that quoted string. I suppose that you
didn't want to create an anonymous hash?

Try that same line, without the two outermost curly brackets. You
don't need them.

> Please send reply to my e-mail address because my ISP news server is down.

Done,

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | A Freudian slip is when you say one
Commercial Dynamics Pty. Ltd.       | thing but mean your mother.
NSW, Australia                      | 


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

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

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