[9303] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2898 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 18 08:07:20 1998

Date: Thu, 18 Jun 98 05:00:54 -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           Thu, 18 Jun 1998     Volume: 8 Number: 2898

Today's topics:
    Re: $a: numeric or NOT ? (Abigail)
    Re: 2 questions about lists (M.J.T. Guy)
    Re: 2 questions about lists (Alexander Farber)
        2D arrays <it.sllas@btinternet.com>
    Re: ?CGI scripts & Explorer <perlguy@inlink.com>
        apache_1.2.1 configuration <jackiech@ktweb.kotel.co.kr>
    Re: Array Combinations Question dgris@rand.dimensional.com
    Re: Array Combinations Question <quednauf@nortel.co.uk>
    Re: Duplicate emails with sendmail! (Abigail)
    Re: Duplicate emails with sendmail! <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: first language (Abigail)
    Re: first language <quednauf@nortel.co.uk>
    Re: Forks and reaping children question (M.J.T. Guy)
        gurusamy vs activeware perl nt <no@no.no>
    Re: Help With files, please <perlguy@inlink.com>
    Re: HELP: Perl Scripts for a unix host using Apache <0x74_0x6F_0x64_0x64@0x40.0x7A.0x65.0x72.0x6F.0x6B.0x61.0x72.0x6D.0x61.0x2E.0x64.0x79.0x6E.0x2E.0x6D.0x6C.0x2E.0x6F.0x72.0x67>
    Re: How to delete a character from a string? (M.J.T. Guy)
    Re: htpasswd in perl? <dformosa@st.nepean.uws.edu.au>
        more unix errors <mangojello@hotmail.com>
    Re: Perl CGI forms <perlguy@inlink.com>
    Re: Perl with Javascript <psattler@bestweb.net>
    Re: Perl with Javascript (Michael Murphy)
        Processing Binary file with Perl. ahmadz@comm.mot.com
    Re: Q: grep/map and regex recompilation (Ilya Zakharevich)
    Re: Q: grep/map and regex recompilation (Ilya Zakharevich)
    Re: regex terminator not allowed in comment in extended (Larry Rosler)
    Re: regex terminator not allowed in comment in extended (Ilya Zakharevich)
        subroutines <soetensi@se.bel.alcatel.be>
    Re: subroutines <quednauf@nortel.co.uk>
    Re: substitution not working (bn184@scn.org)
        Unix installation <mangojello@hotmail.com>
        WIN32: ????? <nospam_billteam@creaweb.fr>
    Re: WIN32: ????? <perlguy@inlink.com>
    Re: WIN32: ????? <perlguy@inlink.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 18 Jun 1998 08:55:45 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: $a: numeric or NOT ?
Message-Id: <6makmh$iee$7@client3.news.psi.net>

Ronald J Kimball (rjk@coos.dartmouth.edu) wrote on MDCCLII September
MCMXCIII in <URL: news:1dasg3d.127knwz1715swmN@bay1-374.quincy.ziplink.net>:
++ Abigail <abigail@fnx.com> wrote:
++ 
++ > From perldata.pod:
++ > 
++ > =head2 Scalar value constructors
++ > 
++ > Numeric literals are specified in any of the customary floating point or
++ > integer formats:
++ > 
++ >     [...]
++ >     4_294_967_296       # underline for legibility 
++ > 
++ > Underscores are called "underline" here....
++ 
++ Actually, I noticed that.  I did think it was odd that it was called
++ "underline" instead of "underscore".
++ 
++ Nevertheless, this does not say that underscores are allowed *only* in
++ numeric literals.  That fact is not found anywhere in the standard
++ documentation.


I doubt you will find anywhere in the standard documentation that ,
is not allowed in numbers.

Yet, I would not want to draw any conclusion from that, or suggest
something is missing in the documentation.

I don't see any conflict in "You cannot do X" and "The fact you cannot
do X is not mentioned in the documentation".



Abigail
-- 
It's not safe to dry you cat in the microwave, even if the cats standard
documentation does not mention it is not safe.


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

Date: 18 Jun 1998 09:42:43 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: 2 questions about lists
Message-Id: <6manej$r0n$1@pegasus.csx.cam.ac.uk>

Alex Farber <alex@kawo2.rwth-aachen.de> wrote:
>
>2) what happens if i do a foreach()-loop on some @list
>and the push smth in that list IN THIS LOOP ? Like:
>
>foreach $elem (@list)
>{
>    push @list, 'xxx' if ...
>}

"perldoc perlsyn" says about this

     If any part of LIST is an array, foreach will get very
     confused if you add or remove elements within the loop body,
     for example with splice.   So don't do that.

So ignore the advice from other respondents to "try it and see".
Even if it "happens to work", it's not guaranteed to continue to do
the same thing in the future.


Mike Guy


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

Date: 18 Jun 1998 11:25:18 GMT
From: eedalf@eed.ericsson.se (Alexander Farber)
Subject: Re: 2 questions about lists
Message-Id: <6mateu$2do19@aken.eed.ericsson.se>

Hi,

thanks for the replies and i am sorry, that my 1st question 
was actually answered in FAQ. I've forgotten to check there.

I am aware of Cperl-mode for emacs and i do have it, i am just
looking for other indentation modes, since i don't like the one,
that is included in Cperl and i don't know LISP myself to do my own.

"Oh man"... Though i usually never do it, i would like to note 
smth this time: i am sick of people like Mike, who don't help 
but just annoy. Mike, i have Llama and Camel books, the Perl 
FAQ is in my home dir (ok, i missed it this time) and i know 
how to use Dejanews. 

So if i am posting a question here, i could not find the answer 
myself yet and i am hoping that maybe it is very obvious for 
someone, and he/she will write me "hey, don't you know there's 
already such an operator ... ?" and i will learn some nice trick
without bleeding 2 hours at some small problem.

And Mike, can you imagine, there are people who don't have time to
read all your previous brilliant posts, because c.l.p.m is pretty big ? 

/Alex

In article <6m8oeg$sh4@mozo.cc.purdue.edu>, gebis@albrecht.ecn.purdue.edu (Michael J Gebis) writes:
> "Alex Farber" <alex@kawo2.rwth-aachen.de> writes:
> 
> }1) Is there (could not find in Camel book yet) some single 
> }operator to check if some element is contained in an array?
> 
> Oh man.  Go to www.dejanews.com, and look for a thread entitled
> something like "Why is there no 'in' operator in perl?"  You can look
> for a post by me, as I answered with my usual brilliance.  And you can
> look for replies to me, as people pointed out more efficient methods.
> 
> }2) what happens if i do a foreach()-loop on some @list
> }and the push smth in that list IN THIS LOOP ? Like:
> 
> Off the top of my head, I'm not sure.  When you get your copy of perl
> working, you should be able to try it out.  Also, I'm 99% sure
> that this is in the FAQ.  (So there's a 1% chance it's not.  Read the
> FAQ and show me up!  I dare ya!  Read it.  Read it.  Read it!)
> 
> }3) And a bonus question: which perl indentation modes for
> }emacs are there and where to get them (couldn't find them yet) ?
> 
> Cperl mode is where it's at.  It's almost impossible to not find it,
> but you can go to dejanews and type in "Ilya" and "perl" and "emacs"
> to get even more information.
> 
> 
> -- 
> Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net






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

Date: 18 Jun 1998 08:01:10 GMT
From: "Thomas Mclaughlin" <it.sllas@btinternet.com>
Subject: 2D arrays
Message-Id: <01bd9a8f$58d1fec0$26c809c0@internet>

I have been looking thru the "Learning Perl" book on arrays but cannot find
2D arrays. I am a perl newbie and want to use a 2D array like in C (it has
been a few 
years since I wrote any C code and now write shell scripts). I want to
write a perl
prog to calculate the size of an Informix database table from the following
format:

create table table1 ( fld1 serial, fld2 integer, fld3 date)

I want to hold the field type and the size taken by this field type
together.
(E.g. integer = 4 bytes, float = 8 bytes)

I want to test the field type found by looping thru an array and say
something like:

if test_fld_type == array[index][type][dont care]
then
      tot_bytes += array[index][dont care][val]

where the array is defined something like:

array { (type1, val1) , (type2, val2) ....... }

I do not have any C books at work so I can't remeber the syntax how to
index the array 
elements. I will check some C code lying around.

Would it be easier just to have 2 arrays and say

if test_fld_type == array_1[index][type]
then
      tot_bytes += array_2[index][val]


or just do lots of if statements.

If this post is not appropriate for the group, please let me know
Thanks. 




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

Date: Thu, 18 Jun 1998 11:45:05 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: ?CGI scripts & Explorer
Message-Id: <3588FDC1.83B11E68@inlink.com>

This reminds me of the joke where the guy goes into the doctors and
says:

"Doctor, it hurts when I raise my arm."  

so the doctor says:

"Don't raise your arm."

HAHAHA ROTFL HAHAHA

I had a similar problem with a script, once I quit using Internet
Exploder, it worked fine...  (There was nothing wrong with the script
BTW.)

Good luck!

Brent
"mmmm. Perl good, mmmmm." -Frankenstein


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

Date: Thu, 18 Jun 1998 16:42:20 +0900
From: Jackie Chong <jackiech@ktweb.kotel.co.kr>
Subject: apache_1.2.1 configuration
Message-Id: <3588C4DC.88346F0C@ktweb.kotel.co.kr>

Hi, there
I have installed apache-1.2.1 in my workstation and tried to run cgi
from a users' directory.
I have put .htaccess file in user's directory thinking this would
work,but unfortunately the web server gives me an error message saying
sometimes internal error and some other times 'bla bla bla'.
I am guessing I probably miss something when I configured srm.conf or
access.conf.

I would appreciate your support.

Thanks



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

Date: Thu, 18 Jun 1998 07:26:16 GMT
From: dgris@rand.dimensional.com
Subject: Re: Array Combinations Question
Message-Id: <6maeqk$2ts$1@rand.dimensional.com>

In article <6m8mve$h2h$1@nnrp1.dejanews.com>,  <zucker@my-dejanews.com> wrote:
>Hello,
>
>how can I get all of the combinations of a dynamic multidiminsional array?
>for example:
>during program run:
>$array[0][0] contains "hello"
>$array[0][1] contains "there"
<snip etc.>

>I need the combinations:
>
>hello jupiter happy
>hello saturn happy
<snip etc.>

>and so on, up to n elements ($array[n][n])
>
This works, but will require some tweaking to
run under strict.  It also assumes that the array
in question is only two dimensional, but is easily
modifiable to handle deeper data structures.

$ident = 'a';
for(0..$#array){ 
    $code .= "for \$$ident (qw/@{$array[$_]}/){";  
    $ident++;
}
$code .= 'print "';
for(a..$ident){
    last if $ident eq $_;  #ident is one larger than needed
    $code .= "\$$_ ";
}
$code .= '\n"' . '}' x @array;
eval "$code";

>Robert.
Daniel



-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: Thu, 18 Jun 1998 09:42:18 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Array Combinations Question
Message-Id: <3588D2EA.42294E20@nortel.co.uk>

John Porter wrote:

> for ( rec( \@array ) ) {
>   print "$_\n";
> }
> 
> sub rec {
>   my( $ar, @stack ) = @_;
>   return "@stack" unless @$ar;
>   my( $head, @a ) = @$ar;
>   map { rec( \@a, @stack, $_ ) } @$head;
> }

How many years of Perl programming do I have to do to produce an answer like
that ?

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


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

Date: 18 Jun 1998 09:00:01 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Duplicate emails with sendmail!
Message-Id: <6makuh$iee$8@client3.news.psi.net>

ajm@antopia.com (ajm@antopia.com) wrote on MDCCLII September MCMXCIII in
<URL: news:6ma6ff$r8h$1@nnrp1.dejanews.com>:
++ Help!  I'm having a problem with sendmail.

Help! I'm having a problem with my goldfish. I tought, comp.lang.perl.misc
must be the perfect place to ask, because I keep my Perl books 2 shelves
above the aquarium, and once one of the books fell in the water!!!!!!!!!




Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: 18 Jun 1998 11:08:09 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
To: abigail@fnx.com
Subject: Re: Duplicate emails with sendmail!
Message-Id: <7xiulzqdqe.fsf@beavis.vcpc.univie.ac.at>

Re: Duplicate emails with sendmail!, Abigail
<abigail@fnx.com> said:

Abigail> Help! I'm having a problem with my goldfish. I
Abigail> tought, comp.lang.perl.misc must be the perfect
Abigail> place to ask, because I keep my Perl books 2
Abigail> shelves above the aquarium, and once one of the
Abigail> books fell in the water!!!!!!!!!

use Carp;

(oh dear, time for the medication)

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

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


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

Date: 18 Jun 1998 09:06:35 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: first language
Message-Id: <6malar$iee$9@client3.news.psi.net>

Fred Kunkel (fkunkel@cp.duluth.mn.us) wrote on MDCCLII September MCMXCIII
in <URL: news:358875B1.398B@cp.duluth.mn.us>:
++ Is perl a good language for the non-programer to attempt learning a cgi
++ programing language?

There is no such thing as a "CGI programming language". CGI is written
in English. 

You might want to learn how to program - a necessity if you want to
write a program that uses the CGI protocol. Personally, I would not
recommend Perl as a first language, althought there is a probably a
small group of people for which Perl would be a better first language
than something else.

Start with Pascal. Or Modula. Or, if possible, LPC.  Find someone to
teach you *programming*.  (Not a language, *programming*).

++                       Is there a logical aproach to learning perl or
++ should one start with some other language that might be easier to
++ understand?

Learning another language first will help you understand why Perl is Perl.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Thu, 18 Jun 1998 11:05:40 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: first language
Message-Id: <3588E674.50B81564@nortel.co.uk>

Fred Kunkel wrote:
> 
> Is perl a good language for the non-programer to attempt learning a cgi
> programing language?  Is there a logical aproach to learning perl or
> should one start with some other language that might be easier to
> understand?

Many people say that Perl isn't a good choice for a start. But it depends so
much what kind of person you are. I have done a bit of programming before, but
Perl is the first laguage that I am trying to explore in depth. And that is only
because Perl is what it is, and  Fortran, Delphi and VBasic failed to do the
same, that is, gripping my imagination. I perceive Perl as a kind of freestyle
language, where you have so many ways to do something that people tend to say
'this is no good for a beginner'. But hey, you can grow with the language, and
you can use Perl on a very basic level (I know what I am talking about). And,
not to forget, Perl is FREE. It's availability is excellent, Documentation is
good, and you get to speak to nice people :). So if you like coolness, and a bit
of weirdness , go for Perl! I luvvit!


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


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

Date: 18 Jun 1998 10:08:17 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Forks and reaping children question
Message-Id: <6maouh$scf$1@pegasus.csx.cam.ac.uk>

Aaron Becher  <aaron.becher@sdrc.com> wrote:
>If I keep track of every pid that gets forked off, and then waitpid on
>each and every one, is there any reason to still use "$SIG{'CHLD'}=<some
>kind of child reaper>" in my script?

No - and you're better off without it.

>The reason I'd like to not use the SIG is because it causes my child
>processes trouble when ever they try to do an operation that does its
>own behind-the-scenes fork (system,backticks,etc.).
>
>Or maybe the best answer is to use the SIG in the parent and turn the
>SIG off in the children. I'm making a server that is going to be called
>from a cgi script _a_lot_, so I want to be able to handle multiple
>requests at a time while making sure I don't cause zombie processes to
>fill up the web server.

You could do that   -  but not having the signals at all is better.


Mike Guy


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

Date: Thu, 18 Jun 1998 11:44:19 +0200
From: "no" <no@no.no>
Subject: gurusamy vs activeware perl nt
Message-Id: <3588e00b.0@news.lamine.com>

What is the difference between gurusamy perl nt version and activeware
version of perl nt ?


I install with success  perl5.00402-bindist04-bc and libwin32-0_12 but what
are perl5_004_67_tar.gz and perl5_004_67_patch.gz
files. I read the readme file and i don't anderstand what is talking.

Is it possible to use perliis.dll of activeware for cgi perl on iis4 with
gurusamy perl or a replace solution to do the same process. The dll process
is better under iis4 to not execute multi process of a perl program?

Before i use only gurusamy perl, i want to test it on my web server without
danger on a copy of cgi perl, is it possible use activeware perl with
actually cgi perl and gurusamy perl with a copy of cgi perl to test if it's
ok. on perl the first line is
"#!/usr/bin/perl" how to say this perl use activeware and this use gurusamy
perl.

How use extension .cgi instead of .pl for my perl cgi, i search in registry
but i don't find any trace of the install gurusamy perl, when i launch a cgi
perl toto.cgi i have the response "HTTP/1.0 501".




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

Date: Thu, 18 Jun 1998 11:39:06 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Help With files, please
Message-Id: <3588FC5A.E4781D23@inlink.com>

When the user submits the form, store the value in a variable and then
do something like this...

$filename=$in{'file'};  # This is the file the user chose.

print "Location: http://www.yourhost.com/$filename\n\n";

This should do what you asked...

HTH,

Brent
"Perl good."  -Tarzan


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

Date: 18 Jun 98 09:40:00 GMT
From: Todd Santos <0x74_0x6F_0x64_0x64@0x40.0x7A.0x65.0x72.0x6F.0x6B.0x61.0x72.0x6D.0x61.0x2E.0x64.0x79.0x6E.0x2E.0x6D.0x6C.0x2E.0x6F.0x72.0x67>
Subject: Re: HELP: Perl Scripts for a unix host using Apache
Message-Id: <3588e070.0@206.170.198.12>

Mike Whitaker got drunk in comp.lang.perl.misc and spewed as such:

c[_]
:>Write a CGI script to run the programs on the server, so you can grab
:>their stdout/err. be careful with it, though -- if you can execute it,
:>anyone can execute it. chmod 0 when not in use.

: use CGI::Carp qw/fatalsToBrowser/;


Or you could do that. :-)

							- Todd
-- 
Todd Santos :: Just Another Aspiring Perl Hacker :: todd@zerokarma.dyn.ml.org

"...you sound almost as confused as I am!"
					- ArchAngel


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

Date: 18 Jun 1998 09:24:50 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: How to delete a character from a string?
Message-Id: <6mamd2$q9q$1@pegasus.csx.cam.ac.uk>

Kevin Reid <kpreid@ibm.net> wrote:
>Kevin Reid <kpreid@ibm.net> wrote:
>>     $xy = substr($xy, 1) if substr($xy, 1) eq '0';
>
>Oops. That should be:
>    $xy = substr($xy, 0, 1) if substr($xy, 0, 1) eq '0';

Eh?   I suspect you intend one or other of the following:

     $xy = substr($xy, 1) if substr($xy, 0, 1) eq '0';
     substr($xy, 0, 1) = '' if substr($xy, 0, 1) eq '0';


Mike Guy


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

Date: 18 Jun 1998 07:45:40 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: htpasswd in perl?
Message-Id: <898155940.750883@cabal>

In <6m8suj$op1$0@206.165.146.16> due@murray.fordham.edu (Allan M. Due) writes:

>In article <diverdi-1706980940200001@algae2.verinet.com>, Joseph A. 
>DiVerdi, Ph.D. (diverdi@XTRsystems.com) posted...
>|In article <8clnqwgmx2.fsf@gadget.cscaper.com>, Randal Schwartz
>|<merlyn@stonehenge.com> wrote:
>|
>|> Need help with a script I am working on that will create
>|> passwords the same as htpasswd executable.
[...]
>|Here is a complete code snippit that shows you how to do it and actually
>|works. The script is executed as follows:
[...]
>Hmm, do you think Dr. DiVerdi believes that Randal does not know how to 
>write a password script that "actually works",

Well lets see what Dejanews things the post was.

]Subject:      Re: htpasswd in perl?
]From:         Randal Schwartz <merlyn@stonehenge.com>
]Date:         1998/06/17
]Message-ID:   <8clnqwgmx2.fsf@gadget.cscaper.com>
]References:   <358710CC.833494BD@zmark.com>
]Organization: Stonehenge Consulting Services; Portland, Oregon, USA
]NNTP-Posting-Date: Wed, 17 Jun 1998 06:47:49 PDT
]Newsgroups:   comp.lang.perl.misc

]>>>>> "Douglas" == Douglas Potts <doug@zmark.com> writes:

]Douglas> Need help with a script I am working on that will create
]Douglas> passwords the same as htpasswd executable.

]use HTTPD::UserAdmin; # found in the CPAN

]print "Just another Perl hacker," # but not what the media calls
]"hacker!"
]:-)
]## legal fund: $20,990.69 collected, $186,159.85 spent; just 76 more days
]## before I go to *prison* for 90 days; email fund@stonehenge.com for
]details

I think  Dr. DiVerdi owes Mr  Schwartz at least an expleantion.

--
I'm a perl programer; if you need perl programing, hire me. 
Please excuse my spelling as I suffer from agraphia; see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html  http://www.cm.org/ 
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Wed, 17 Jun 1998 14:31:49 -0700
From: "Dave J. Lowe" <mangojello@hotmail.com>
Subject: more unix errors
Message-Id: <358835C5.5FEB63@hotmail.com>

Hi again,

This is the error message I get after I run 'make depend', when I run
'make':


> makefile:534: *** target pattern contains no `%'.  Stop.
>
I'm guessing this error is probably the most relevant of all the errors
I'm getting.    Any insight would be greatly appreciated.  Thanks.



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

Date: Thu, 18 Jun 1998 11:28:14 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Perl CGI forms
Message-Id: <3588F9CE.173DCC81@inlink.com>

Patrick,

This doesn't specifcally answer your question, there was too much extra
crap in the script for me this early in the morning.

Here is a hint to clean things up...

You can get rid of most of your print "blah blah..."; statements by
doing this:

print<<EOT;
<HTML><HEAD>
<TITLE> etc etc...
blah blah
This is a variable $variable etc...

 ...
</HTML>
EOT

Everything between the "print<<EOT;" and "EOT" will be printed.  You
don't have to remember to put 's in for strings with quotes either!

The only stipulation, the final EOT MUST be on a line all by itself and
it must be all the way to the left side.

The EOT can be any name you like, I use EOT for End Of Text.

Doing this will clean up your scripts a ton, and make them less prone to
typos.  You can indent your code all you want with this method too!

Good luck, I hope this helped you out some....

Brent Michalski


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

Date: 18 Jun 1998 12:24:31 GMT
From: "Pete Sattler" <psattler@bestweb.net>
Subject: Re: Perl with Javascript
Message-Id: <01bd9aac$0f2cf960$38695ed1@voyager>

Soo:

The excellent CGI.pm module supports JavaScript constructs.  I think you'll
need version 2.36 or above.

Good Luck!

Pete Sattler
Chase Manhattan Bank

soo <peckss@cyberway.com.sg> wrote in article
<3588b2f0.0@news.cyberway.com.sg>...
> Hello there,
> 
> I just want to know is it possible to have Javascript written in a perl
> script?
> I need to have on-line calculation, where when I enter value a and value
b,
> value c will be calculated straight away on the front-end and reflect the
> calculated value c on the screen.  Is Perl capable of doing that??
> 
> thanks in advance,
> Soo San
> 
> 
> 


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

Date: Thu, 18 Jun 1998 07:18:40 -0500
From: mike_murphy-ppk@nortel.com (Michael Murphy)
Subject: Re: Perl with Javascript
Message-Id: <mike_murphy-ppk-1806980718410001@nppkm606.us.nortel.com>

In article <3588b2f0.0@news.cyberway.com.sg>, "soo"
<peckss@cyberway.com.sg> wrote:

> Hello there,
> 
> I just want to know is it possible to have Javascript written in a perl
> script?
> I need to have on-line calculation, where when I enter value a and value b,
> value c will be calculated straight away on the front-end and reflect the
> calculated value c on the screen.  Is Perl capable of doing that??
> 
> thanks in advance,
> Soo San

I write web based database applications.  I use perl to generate dynamic
html which includes an awful lot of javascript.  The javascript allows me
to do some cool things such as dynamic popup menus, pass values between
windows, check for mandatory fields, etc.  

So the answer to your question is yes you can very easily do your a, b, c
example.

Hope this helps,
Mike

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Mike Murphy              ~ Nortel                   ~
~  my opinions are my own  ~ Raleigh, North Carolina  ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Thu, 18 Jun 1998 08:41:10 GMT
From: ahmadz@comm.mot.com
Subject: Processing Binary file with Perl.
Message-Id: <6majr6$dum$1@nnrp1.dejanews.com>

Hi,

Could somebody guide me how can I process a binary file with perl?

I need to remove the first few bytes (depends on the file). I'm trying to
remove the extra header of macbin file so that the file can be read by
application directly.

Regards,
AhmadZ

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


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

Date: 18 Jun 1998 07:34:05 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Q: grep/map and regex recompilation
Message-Id: <6maftd$eqr$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Uri Guttman 
<uri@sysarch.com>],
who wrote in article <x7u35je931.fsf@sysarch.com>:
> >>>>> "IZ" == Ilya Zakharevich <ilya@math.ohio-state.edu> writes:
> 
> well, i got some good feedback. i was aware of vars in the regex and
> /o.
> 
> the new twist is that in grep/map the regex is checked for change and
> then recompiled if it has.

I did not say this.

> this is not clear in any docs that i know
> about. can someone point me to the doc supporting this behaviour?

This is not a *behaviour*, it is an *optimization*.  Unless you test
for speed, you cannot tell whether it was performed, or no.

>   IZ> If RE contains variables:
> 
>   IZ>    b) Thus the value will be checked whether it changed, and if
>   IZ> not, the already compiled form will be used; c) Starting from
>   IZ> just-released 5.004_67, if it is /$regexp/, the comparison in b)
>   IZ> is skipped if $regexp was not modified.
> 
> also is this true outside map/grep? does a regex in a for/while loop
> check if it has changed and then not recompile? my impression was that
> it always compiled which is why the eval of regex code was used, to
> reduce the compiling of dynamic regexes.

Read my post.

Ilya


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

Date: 18 Jun 1998 07:35:14 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Q: grep/map and regex recompilation
Message-Id: <6mafvi$etn$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Mark-Jason Dominus
<mjd@op.net>],
who wrote in article <6ma311$6ps$1@monet.op.net>:
> In article <6m807m$3o2$1@mathserv.mps.ohio-state.edu>,
> Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> >   b) Thus the value will be checked whether it changed, and if not,
> >      the already compiled form will be used;
> 
> I was surprised by this.  When did it come in?

Looks like it was always there.  Why do you ask?  It does not change
behaviour...

Ilya


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

Date: Thu, 18 Jun 1998 01:07:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: regex terminator not allowed in comment in extended regex?
Message-Id: <MPG.ff26aae2cbce69c9896c0@nntp.hpl.hp.com>

In article <eli$9806171655@qz.little-neck.ny.us>, Eli the Bearded 
<*@qz.to> says...
> In comp.lang.perl.misc, Martin Gregory  <mgregory@asc.sps.mot.com> wrote:
 ... 
> > I would have thought that DWIM would have certainly meant that a
> > comment-to-end-of-line overrules any other interpretation!
> 
> Feel free to patch perl if you insist, but I think that this sort of
> thing should be allowed:
> 
> 	$var =~ s< \b ( in )? valuable \b # shorten both ><$1v>x;
> 
> Though I would probably be more inclined to use (?# ... ) in practice.

Agreed.  But that also suffers from lack of DWIM.  It would be nice if

/(?x) regex stuff     # comment stuff / more comment stuff
 more regex stuff /

were parsed so as to strip the comments while seeking the closing 
delimiter.  I doubt that this would change the semantics of any valid 
program.

Is this yet another opportunity for someone to patch perl?

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


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

Date: 18 Jun 1998 09:26:48 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: regex terminator not allowed in comment in extended regex?
Message-Id: <6mamgo$ps4$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Larry Rosler
<lr@hpl.hp.com>],
who wrote in article <MPG.ff26aae2cbce69c9896c0@nntp.hpl.hp.com>:
> > Feel free to patch perl if you insist, but I think that this sort of
> > thing should be allowed:
> > 
> > 	$var =~ s< \b ( in )? valuable \b # shorten both ><$1v>x;
> > 
> > Though I would probably be more inclined to use (?# ... ) in practice.
> 
> Agreed.  But that also suffers from lack of DWIM.  It would be nice if
> 
> /(?x) regex stuff     # comment stuff / more comment stuff
>  more regex stuff /

This is not specific to RE.  First decide what you want
      "Interpolate ${ func("blah") }"
to do.

Ilya


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

Date: Thu, 18 Jun 1998 11:54:12 +0200
From: Inge Soetens <soetensi@se.bel.alcatel.be>
Subject: subroutines
Message-Id: <3588E3C4.6A5F@se.bel.alcatel.be>

Hi ,

one of the subroutines I made is needed in several perl scripts.
Is it possible to put subroutines in separate files 
and then include them in different perl scripts afterwards ?

If so, what is the syntax to include and use them ?

I tried use and import, but either these are the wrong commands,
or what I'm is completely wrong.

Can somebody help me ?

Thanks


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

Date: Thu, 18 Jun 1998 11:15:31 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: subroutines
Message-Id: <3588E8C3.32505FB2@nortel.co.uk>

Inge Soetens wrote:
> 
> Hi ,
> 
> one of the subroutines I made is needed in several perl scripts.
> Is it possible to put subroutines in separate files
> and then include them in different perl scripts afterwards ?
> 
> If so, what is the syntax to include and use them ?
> 
> I tried use and import, but either these are the wrong commands,
> or what I'm is completely wrong.
> 
> Can somebody help me ?
> 
> Thanks

You can use 'require "my_subs_file.plonk";'
Maybe you tried to use 'use' in a conditional. That wouldn't work, as use is a
compiler directive. 'require' can be used at runtime. Also, I believe the main
difference between 'use' and 'require' is that with 'use something', the stuff
in 'something' stays in its own namespace, and you have to 'import' stuff
explicitly into your main:: namespace. 'require something' merely seems to add
the stuff in 'something' to your main:: namespace. People, please correct me if
I am wrong.


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


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

Date: Thu, 18 Jun 1998 04:50:27 GMT
From: bn184@scn.org (bn184@scn.org)
Subject: Re: substitution not working
Message-Id: <TyJi1gzkgy9V092yn@scn.org>

In article <357C2E74.645428E6@cat.com>,
"Vincent M. Probasco" <probavm@cat.com> wrote:
>Alright, I know this is an easy one. Forgive me, but I've been looking
>at this one for awhile. Yes,
>I've checked the manual and the FAQs. Maybe I'm just missing something
>but why isn't this
>code working ?
>
>              $osee = "<See?>";
>              $sub = "<person><TD>".$form_data{'signy'}."</TD><See?>";
>              $line =~ s/$osee/$sub/;

$line =~ s/\Q$osee/$sub/;


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

Date: Tue, 16 Jun 1998 17:06:50 -0700
From: "Dave J. Lowe" <mangojello@hotmail.com>
Subject: Unix installation
Message-Id: <3587089A.A99736D9@hotmail.com>

Hi,
I've been trying to install Perl 5.004_04 onto my Unix workstation
(HPUX) and I keep getting these kinds of messages when I run 'make
depend':

"sh: fork failed - too many processes
*** Error code 1"
and something like
"too much defining- try the -H option"

What can I do about the processes and how do I get it to try the -H
option?

Thanks,
Dave



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

Date: Thu, 18 Jun 1998 12:41:49 +0200
From: "F Chauvreau" <nospam_billteam@creaweb.fr>
Subject: WIN32: ?????
Message-Id: <6maqsg$1j9$2@newsfeed.inetway.net>

Does some one can tell me what is WIN32: fonctions in perl on NT or 95 and
how to use them?
Thanks
JC




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

Date: Thu, 18 Jun 1998 11:15:23 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: WIN32: ?????
Message-Id: <3588F6CB.13490EF3@inlink.com>

Try Going to:

http://reference.perl.com/query.cgi?windows

and click on the top link that says "A Guide to Win32::Packages".  This
will probably help...

Sorry all for the other post on this subject, I hit the wrong key
combination!

HTH,

Brent


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

Date: Thu, 18 Jun 1998 11:13:50 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: WIN32: ?????
Message-Id: <3588F66E.E5B62DED@inlink.com>

Try going to:


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

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

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