[12603] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 14 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 2 20:57:40 1999

Date: Fri, 2 Jul 1999 17:54:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 2 Jul 1999     Volume: 9 Number: 14

Today's topics:
        passing Perl hash to javascript <carriec@doc.state.vt.us>
    Re: passing Perl hash to javascript <cassell@mail.cor.epa.gov>
    Re: passing Perl hash to javascript <carriec@doc.state.vt.us>
    Re: passing Perl hash to javascript <cassell@mail.cor.epa.gov>
        PERL / Newsgroup <alex@exbook.com>
    Re: PERL / Newsgroup (brian d foy)
    Re: PERL / Newsgroup <gellyfish@gellyfish.com>
        Perl and Borland C++ Builder 4 on Win98 <dchristensen@california.com>
    Re: perl and xml, xsl, html (Arved Sandstrom)
        perl debugger commands from a file <badari@cisco.com>
        Perl Everywhere : That's what I want rajappa@my-deja.com
    Re: Perl Everywhere : That's what I want <tchrist@mox.perl.com>
    Re: Perl Everywhere : That's what I want <cassell@mail.cor.epa.gov>
        Perl Exensions without XS time4tea@my-deja.com
    Re: Perl Exensions without XS <gellyfish@gellyfish.com>
    Re: Perl Modules and Win98 <rodney@superstory.com>
    Re: Perl or PNP...which is better? (Jon Bell)
    Re: Perl or PNP...which is better? <gellyfish@gellyfish.com>
    Re: Perl or PNP...which is better? (Ben Coleman)
        perlcc and CGI <robert@corpus.nl>
    Re: PERLFUNC: printf - output a formatted list to a fil <cassell@mail.cor.epa.gov>
    Re: Picture doesn't appear <nospam.newton@gmx.net>
    Re: Please help! <gellyfish@gellyfish.com>
        Pls hlp with regex newsmf@bigfoot.com
    Re: Pls hlp with regex <dodger@dodger.org>
    Re: Pls hlp with regex (Tad McClellan)
    Re: Premature end of script headers: <td90537@hotmail.com>
    Re: Premature end of script headers: (Bart Lateur)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 02 Jul 1999 15:26:41 -0500
From: Carrie Coy <carriec@doc.state.vt.us>
Subject: passing Perl hash to javascript
Message-Id: <377D2081.8BE17FD8@doc.state.vt.us>

Within a perl CGI.pm script I've generated a perl hash. How can I get
the contents of that hash into a two dimensional javascript array so I
can validate against it?

TIA
--
Carrie Coy



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

Date: Fri, 02 Jul 1999 14:15:33 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: passing Perl hash to javascript
Message-Id: <377D2BF5.C62386A5@mail.cor.epa.gov>

Carrie Coy wrote:
> 
> Within a perl CGI.pm script I've generated a perl hash. How can I get
> the contents of that hash into a two dimensional javascript array so I
> can validate against it?

Umm, I must be missing something here.  Won't it be a *lot*
easier to validate 'against' the hash in Perl, using the functions
Perl has for working with hashes?  This doesn't look to me
like a good application for JavaScript.  Look up these Perl
functions and see if they'll cover what you need:

delete()
each()
exists()
keys()
values()

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 02 Jul 1999 19:41:19 -0400
From: Carrie Coy <carriec@doc.state.vt.us>
Subject: Re: passing Perl hash to javascript
Message-Id: <377D4E1E.95791604@doc.state.vt.us>

Yes, it would be a snap in Perl but I want to do the validations before the
form is submitted.
The user is editting a list of employee numbers and the javascript function
would lookup and return job titles on the fly.

I can do this easily after the form is submitted but I thought it would be
slicker to do it interactively.

That said, can it be done?
--
Carrie

David Cassell wrote:

> Carrie Coy wrote:
> >
> > Within a perl CGI.pm script I've generated a perl hash. How can I get
> > the contents of that hash into a two dimensional javascript array so I
> > can validate against it?
>
> Umm, I must be missing something here.  Won't it be a *lot*
> easier to validate 'against' the hash in Perl, using the functions
> Perl has for working with hashes?  This doesn't look to me
> like a good application for JavaScript.  Look up these Perl
> functions and see if they'll cover what you need:
>
> delete()
> each()
> exists()
> keys()
> values()
>
> HTH,
> David
> --
> David Cassell, OAO                     cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician



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

Date: Fri, 02 Jul 1999 17:39:22 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Carrie Coy <carriec@doc.state.vt.us>
Subject: Re: passing Perl hash to javascript
Message-Id: <377D5BBA.29399139@mail.cor.epa.gov>

[courtesy cc mailed to poster]

Carrie Coy wrote:
> 
> Yes, it would be a snap in Perl but I want to do the validations before the
> form is submitted.
> The user is editting a list of employee numbers and the javascript function
> would lookup and return job titles on the fly.
> 
> I can do this easily after the form is submitted but I thought it would be
> slicker to do it interactively.
> 
> That said, can it be done?

If I understand what you are asking, then I think the answer is 
no.  If you write a JavaScript script which can do the validations
on the fly before the form is submitted, then it needs to do all
the validation before the Perl program *sees* the submission.
If you send the pieces to JavaScript via your Perl program,
then it goes through the Perl program first on its way, and the
validation could be done easier in Perl.

So either I'm missing something you're doing in your CGI script
which you haven't shown us, or else you may want to consider
asking in a group like comp.infosystems.www.authoring.cgi .
Or getting a smarter responder.  :-)

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 2 Jul 1999 18:54:40 GMT
From: "Alex" <alex@exbook.com>
Subject: PERL / Newsgroup
Message-Id: <01bec4bc$4f47bdb0$258eb987@il0015jtampc>

Hi Everyone,

I want to have some perl source code that relates to the NNTP.
It will be good enough if it can read news from news group, 
and post a message from newsgroup.

Anyone can help.......?

Thank you,
Alex



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

Date: Fri, 02 Jul 1999 16:13:26 -0400
From: brian@pm.org (brian d foy)
Subject: Re: PERL / Newsgroup
Message-Id: <brian-ya02408000R0207991613260001@news.panix.com>

In article <01bec4bc$4f47bdb0$258eb987@il0015jtampc>, "Alex" <alex@exbook.com> posted:

> I want to have some perl source code that relates to the NNTP.
> It will be good enough if it can read news from news group, 
> and post a message from newsgroup.

see the docs for Net::NNTP in the libnet bundle.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 2 Jul 1999 20:18:27 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PERL / Newsgroup
Message-Id: <7lj6qj$1r1$1@gellyfish.btinternet.com>

On 2 Jul 1999 18:54:40 GMT Alex wrote:
> Hi Everyone,
> 
> I want to have some perl source code that relates to the NNTP.
> It will be good enough if it can read news from news group, 
> and post a message from newsgroup.
> 

You will want to use the module Net::NNTP that is part of the libnet bundle
available from CPAN

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


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

Date: Fri, 2 Jul 1999 15:59:51 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Perl and Borland C++ Builder 4 on Win98
Message-Id: <377d42d3@news5.newsfeeds.com>

Hello, World!

Has anyone tried compiling Perl with Borland C++ Builder 4 on a
Win98 box?

How about embedding Perl in a Builder application, or vice-versa?

If it hasn't been done yet, I would be very willing to help with
the effort.  Is there someone knowledgeable who would be willing to
lead?

--
David Christensen
dchristensen@california.com

borland.public.cppbuilder.language
comp.lang.perl.misc




  -----------== 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: Fri, 02 Jul 1999 06:58:42 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: perl and xml, xsl, html
Message-Id: <Arved_37-0207990658420001@dyip-118.chebucto.ns.ca>

In article <377B9616.F24EBC5D@netgates.co.uk>, Robin Barooah
<robin@netgates.co.uk> wrote:

> bodhyfryd@my-deja.com wrote:
> > 
> > I know you can parse XML through XML::DOM. Very handy, but is it
> > possible to process XML and XSL together to produce the HTML. If not
> > then do we have to produce our own pseudo like xsl stuff written in
> > perl or am I talking bananas?. Any advice, links etc gratefully
> > received!
> > Ta.
> 
> No you're not.  This is a significant issue in the XML community.  There
> are a number of xsl processing engines available which do produce HTML
> output from XML/XSL, but there's serious debate as to whether XSL is any
> use anyway or whether we should use CSS instead.
> 
> See www.xml.com for more information on this.

I think the significant debate is specifically about whether XSL should be
used for formatting. I trust that the transformation part of XSL is not
considered to be "useless". :-)

In any case, if one is really seriously doing XML it's necessary to
recognize that there are more tools available on Java than there are in
Perl. Use Perl when you can, but use Java when you must. An XSL problem,
in particular, pretty much requires you to use Java at the present.

There are some really handy lists of XML tools by standard. Go to the
SGML/XML page on http://www.oasis-open.org/

HTH. Arved


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

Date: Fri, 02 Jul 1999 10:03:42 -0700
From: Badari Kakumani <badari@cisco.com>
Subject: perl debugger commands from a file
Message-Id: <377CF0EE.E10B0687@cisco.com>

Folks,

Is there a way to make perl-debugger read the debugger commands from a
file? Also is there a way to set initial break-points using the
~/.perldb file?

Even the aliases I create in the ~/.perldb file are NOT working. The
alias
    $DB::alias{pc} = 'print "alias for pc\n";';
defined in ~/.perldb works; but the alias
    $DB::alias{pas} = c_debug::c_print_assoc;
does NOT. Any idea why the above alias does NOT work?

Thanks for your help.

-badari

PS: I am not yet subscribed to this news group. Please copy the
responses to me.

--
Badari Kakumani
Software Tools Group
Email: badari@cisco.com                 phone: 408-527-3351[W]
Email Pager: badari@epage.cisco.com





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

Date: Fri, 02 Jul 1999 06:48:04 GMT
From: rajappa@my-deja.com
Subject: Perl Everywhere : That's what I want
Message-Id: <7lhnb3$3q6$1@nnrp1.deja.com>

hi,

i love perl and programming with it. it's a great language for quick
prototyping and now with lots of modules is great for writing big apps
as well. I'd like to see more apps written in Perl - I'd like to see
Perl everywhere.

However, the things commonly stated as Perl's shortcomings are that :
1) It's horrible to maintain Perl code
2) It's not quick
3) It's only good for CGI and short&dirty scripts.

Also, we know that Perl was a platform-independent language much before
Java. We know that Java is S-L-O-W. We know that Java & Perl are both
compiled-interpreted. We know that Perl is FUN.

So, why don't we have Perl Everywhere ?? Also, what should be done for
us to see Perl as a more dominant force in the Land of Programming
Languages ??

What changes does the language require & is it moving to those changes
??

I'd like you all to put you collective thoughts in coming up with
suggestions to see Perl Everywhere

- Appa


______________________________________
Arun Rajappa,
JAPAN ( Just Another Perl Addicted Nut)


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 2 Jul 1999 04:26:21 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Everywhere : That's what I want
Message-Id: <377c93cd@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    rajappa@my-deja.com writes:
:However, the things commonly stated as Perl's shortcomings are that :
:1) It's horrible to maintain Perl code

Perl makes it possible for idiots to write programs; therefore, they
do so.  It's horrible to maintain a program written by an idiot.

:2) It's not quick

While all is relative, that's pretty easily argued against.

:3) It's only good for CGI and short&dirty scripts.

The most risible of all your allegations.

:What changes does the language require 

Only re-education will help.  Are you helping? :-)

--tom
-- 
/* Force them to make up their mind on "@foo". */
    --Larry Wall, from toke.c in the v5.0 perl distribution


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

Date: Fri, 02 Jul 1999 10:47:29 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl Everywhere : That's what I want
Message-Id: <377CFB31.E8690767@mail.cor.epa.gov>

rajappa@my-deja.com wrote:
> 
> hi,
> 
> i love perl and programming with it. it's a great language for quick
> prototyping and now with lots of modules is great for writing big apps
> as well. I'd like to see more apps written in Perl - I'd like to see
> Perl everywhere.

However, the Perl community does not spend millions of $$$ on
PR to spout off about the wonders of its language, as some do.
Hence:
 
> However, the things commonly stated as Perl's shortcomings are that :

Note that there is a huge difference between what is 'commonly
stated' and what is true.  Example case: Is Paul dead?

> 1) It's horrible to maintain Perl code

It's horrible to maintain ghastly Perl code.  Just as it's
horrible to maintain ghastly C code, and C++ code, and...
It's the programmer, not the language.  Take a look inside 
the Perl modules, and you'll see that Perl can be beautiful.

> 2) It's not quick

Au contraire.  Try reading Kernighan and Pike.  What was faster
than Perl in their test case?  C, by a factor of 3 - 5 times.
That was it.  Perl came out faster than C++ some of the time.
Perl was light-years ahead of Java.

People who say this usually have a single test case for their
'proof', at least in my experience.  But running Perl for CGI
without using mod_perl or fast_cgi or PerlEx is just cheating.
It's not at all the way you would do it in the real world,
which is what really matters.

> 3) It's only good for CGI and short&dirty scripts.

True, if all you do is CGI and short&dirty scripts.  False
otherwise.  Actually, there is nothing I do in my job which
is not suitable for Perl.. well, except for getting the
coffee.  The Fetch::Drink module still needs a lot of work.
:-)

> Also, we know that Perl was a platform-independent language much before
> Java. We know that Java is S-L-O-W. We know that Java & Perl are both
> compiled-interpreted. We know that Perl is FUN.
> 
> So, why don't we have Perl Everywhere ?? Also, what should be done for

Money.  Please send your next four million dollars to the
Perl Advocacy Fund, and it will go to ads to combat the FUD
being spread by those 'jealous' languages which badmouth
Perl behind its back.

> us to see Perl as a more dominant force in the Land of Programming
> Languages ??

Well, you could stop saying those untruths you listed above,
for a starter.
 
> What changes does the language require & is it moving to those changes
> ??
> 
> I'd like you all to put you collective thoughts in coming up with
> suggestions to see Perl Everywhere

I suggest that you start a massive, multi-million dollar,
international ad campaign showing a Perl camel kicking the
tar out of a tiger, a rhino, a sea lion, and a couple slender
lorises.

Maybe a mastodon and a lion and a jersey cow too.

And get James Earl Jones to do the voiceovers.  That should
help.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 02 Jul 1999 15:51:09 GMT
From: time4tea@my-deja.com
Subject: Perl Exensions without XS
Message-Id: <7lin58$f6p$1@nnrp1.deja.com>



For a while I've been thinking about writing a Perl extension, but have
come a cropper with the XS stuff, to me it all seems very opaque. I've
written extensions to Python before, and was looking to get into
extension for perl in much the same way... anyway I finally sat down and
figured it out.. So I thought I'd post my little test program in case
anybody else was having the same idea...


----Makefile.PL-----
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'	=> 'Test',
    'VERSION_FROM' => 'Test.pm', # finds $VERSION
    'LIBS'	=> [],   # e.g., '-lm'
    'DEFINE'	=> '',     # e.g., '-DHAVE_SOMETHING'
    'INC'	=> '',     # e.g., '-I/usr/include/other'
);


---Test.pm----
package Test;

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader);

$VERSION = '1.00';

bootstrap Test $VERSION;

1;
__END__

-----test.pl------
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

######################### We start with some black magic to print on
failure.

# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)

BEGIN { $| = 1; print "1..9\n"; }
END {print "not ok 1\n" unless $loaded;}
use Test;
$loaded = 1;
print "ok 1\n";

######################### End of black magic.

# Insert your test code below (better if it prints "ok 13"
# (correspondingly "not ok 13") depending on the success of chunk 13
# of the test code):

&Test::checkargs();
@test = ("sdlsdkjf", 1, , { 'This' => 1, 'is' => [ "Hi", [ "Inside" ,
"Array" ], "There" ]}, 1.3);
&Test::checkargs( \@test );


----Test.c-----

/* This is a test at writing a proper perl extension with no XS  */

/*Perlish incudes*/
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

static void dump_scalar ( SV* , int);
static void dump_array  ( AV* , int);
static void dump_hash   ( HV* , int);

/*Normal includes*/
static void
indent ( int t) {
  int i;

  for (i = 0;i< t*2;i++) {
    printf (" ");
  }
}

static void
dump_hash ( HV *hash, int level) {

  I32 pl_hashlen;
  I32 keylen;
  int i;
  SV *current_key;
  SV *current_value;
  HE *current_entry;
  char *key;

  (void) hv_iterinit (hash) ;
  pl_hashlen = HvKEYS(hash);

  for (i = 0; i < (int) pl_hashlen ; i++ ) {
    current_entry = hv_iternext(hash);
    key = hv_iterkey(current_entry, &keylen);
    current_value = hv_iterval(hash, current_entry);
    indent(level);
    printf ("'%s' => ", key);
    dump_scalar(current_value, level );
  }
}


static void
dump_array ( AV *array , int level) {

  I32 pl_len;
  int length;
  int i;
  SV** array_ret;
  SV*  array_val;

  pl_len = av_len(array);
  length = (int) pl_len;

  for (i = 0 ; i <= length ; i++ ) {
    array_ret = av_fetch(array, (I32) i, (I32) NULL);
    if (array_ret != NULL) {
      array_val = *array_ret;
      indent (level);
      printf ("%i  ", i);
      dump_scalar(array_val, level);
    }
  }
}

static void
dump_scalar ( SV *scalar , int level ) {

  svtype reftype;

  if (SvIOK(scalar)) {
    printf ("%d\n", SvIV(scalar));
  }
  else if (SvNOK(scalar)) {
    printf ("%f\n", SvNV(scalar));
  }
  else if (SvPOK(scalar)) {
    printf ("%s\n", SvPV(scalar,PL_na));
  }
  else if (SvROK(scalar)) {
    reftype = SvTYPE(SvRV(scalar));
    if (reftype == SVt_IV || reftype == SVt_NV || reftype == SVt_PV ||
reftype == SVt_RV) {
      dump_scalar(SvRV(scalar), level + 1);
    }
    else if (reftype == SVt_PVAV) {
      printf ("ARRAY (%p)\n", SvRV(scalar));
      dump_array ( (AV*) SvRV(scalar) , level + 1);
      //      indent(level);
    }
    else if (reftype == SVt_PVHV) {
      printf ("HASH (%p)\n", SvRV(scalar));
      dump_hash ( (HV*) SvRV(scalar) , level + 1);
      //indent(level);
    }
    else if (reftype == SVt_PVMG) {
      printf ("Object or Magical Thingy\n");
    }
    else {
      printf ("Something else\n");
    }
  }
  else {
    printf ("n Unknown Type\n");
  }
}


XS(XS_Test_checkargs) {
  dXSARGS;

  int i;
  svtype reftype;

  if (items == 0) {
    printf ("No arguments supplied\n");
  }
  else {
    printf ("You gave me %d arguments\n", items);
    for (i = 0 ; i < items ; i++ ) {
      dump_scalar(ST(i), 0);
    }
  }
  XSRETURN_EMPTY;
}


/*Bootstrap the module */
XS(boot_Test) {
  dXSARGS;

  char *file = __FILE__;

  XS_VERSION_BOOTCHECK;

  newXS("Test::checkargs", XS_Test_checkargs, file);

  XSRETURN_YES;
}

So, its crap, and only does a pale imitation of dumpvar.pl .. but anyway
its a start....

So, anyway, now thats done I can write some decent extensions (and know
the C code that goes into them!!!)

Cheers!

James



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 2 Jul 1999 20:20:41 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Exensions without XS
Message-Id: <7lj6up$1r5$1@gellyfish.btinternet.com>

On Fri, 02 Jul 1999 15:51:09 GMT time4tea@my-deja.com wrote:
> 
> 
> For a while I've been thinking about writing a Perl extension, but have
> come a cropper with the XS stuff, to me it all seems very opaque. I've
> written extensions to Python before, and was looking to get into
> extension for perl in much the same way... anyway I finally sat down and
> figured it out.. So I thought I'd post my little test program in case
> anybody else was having the same idea...
> 

Er, I think you made some misunderstanding here - you are using XS ...

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


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

Date: 02 Jul 1999 16:47:11 PDT
From: Rodney Crater <rodney@superstory.com>
Subject: Re: Perl Modules and Win98
Message-Id: <377D505E.7C0095E9@superstory.com>

Nice Tip. Thanks

Andreas wrote:

> Hi
>
> there is one disadvantage with PPM (I havent found a documented solution).
> If you have two computers usind Perl, you have to download the module
> twice. This takes some time. It's easier and faster, to load the module from
> www.activestate.com/packages/zips/
> Save the package to disk and PPM is very happy to install the package from
> there.
>
> Andreas
>
> On Sun, 27 Jun 1999 04:19:41 +0800, "Shashank Tripathi" <mkshanx@ust.hk> wrote:
> > HI Andrea
> >
> > Read up "Using PPM" in your documentation.
> >
> > PPM stands for Perl Package Manager, and is incredibly simple to use.
> >
> > HTH
> > Shanx
> >
> >
> >
> > Andrea Busia wrote in message <376fc3ce.36322282@news.tiscalinet.it>...
> > >Someone know how to install a perl module on the activestate perl
> > >5.00502 for win98? When I try to use the cgywin make for windows it
> > >gives me an error message like
> > >
> > >Makefile:771 *** Missing Separator. Stop.
> > >
> > >Thanks
> > >Andrea Busia
> >
> >



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

Date: Fri, 2 Jul 1999 06:46:07 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Perl or PNP...which is better?
Message-Id: <FE8DGv.Lsu@presby.edu>

 Daniel  <danielrod@nts.co.jp> wrote:
>[somebody wrote]
>> Are you asking about "future market potential" for yourself?
>
>I am referring more to the future demand of such programming skills by
>employers, along with the long term prospects for solving real-life
>business	problems.

Depends on what you mean by "long term".  Someone coming out of
college/university has at least about a 40-year career ahead of him/her.
In this field, who can predict what's going to happen even ten years from
now?  Ten years ago, how many people had heard of Perl?  How many people
had heard of the WWW?  How many people were programming in C++?  Etc.

The only things that will remain constant are fundamental algorithmic and
problem-solving skills, and the ability and willingness to learn new
technologies.

-- 
Jon Bell <jtbell@presby.edu>

(who started out in programming in the mid-1970s in Fortran on punched
cards)


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

Date: 2 Jul 1999 18:21:40 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl or PNP...which is better?
Message-Id: <7livvk$1du$1@gellyfish.btinternet.com>

On Fri, 2 Jul 1999 06:46:07 GMT Jon Bell wrote:
>  Daniel  <danielrod@nts.co.jp> wrote:
>>[somebody wrote]
>>> Are you asking about "future market potential" for yourself?
>>
>>I am referring more to the future demand of such programming skills by
>>employers, along with the long term prospects for solving real-life
>>business	problems.
> 
> Depends on what you mean by "long term".  Someone coming out of
> college/university has at least about a 40-year career ahead of him/her.
> In this field, who can predict what's going to happen even ten years from
> now?  Ten years ago, how many people had heard of Perl?  How many people
> had heard of the WWW?  How many people were programming in C++?  Etc.
> 

I totally agree - it is a matter of adaptability - I have been programming
for the best part of twenty years now and I would say that the stuff I am
working with now is not going to be what I am going to be working with in
twenty years time.  Learning to learn is possibly the most important thing.

That said I would not recommend anyone to learn PHP as a career move as
I wouldnt recommend anyone to learn Javascript - they are special rather
than general purpose languages.

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


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

Date: Fri, 02 Jul 1999 21:55:59 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: Perl or PNP...which is better?
Message-Id: <377d3536.935769625@news.mindspring.com>

On Wed, 30 Jun 1999 16:22:05 GMT, girish deodhar <calciii@my-deja.com>
wrote:

>i am just speculating but does PNP mean "PNP is not Perl" ?

No, but PHP just might stand for "PHP H'aint Perl".

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: Fri, 02 Jul 1999 08:52:42 +0200
From: Robert de Geus <robert@corpus.nl>
Subject: perlcc and CGI
Message-Id: <377C61BA.2A6349CC@corpus.nl>

Is anybody using perlcc on scripts using the CGI module? With me it does
not finish due to errors. Are there any tricks not descriped in the
books?
Kind regards,
Robert de Geus
Amsterdam



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

Date: Fri, 02 Jul 1999 10:56:02 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Tom not Gnat <perlfaq-suggestions@perl.com>
Subject: Re: PERLFUNC: printf - output a formatted list to a filehandle
Message-Id: <377CFD32.1BB1A075@mail.cor.epa.gov>

[cc mailed to perlfaq-suggestions]

Tom Christiansen wrote:
> [snip]
> DESCRIPTION
>     Equivalent to `print FILEHANDLE sprintf(FORMAT, LIST)', except that
>     `$\' (the output record separator) is not appended. The first
>     argument of the list will be interpreted as the `printf' format. If
>     `use locale' is in effect, the character used for the decimal point
>     in formatted real numbers is affected by the LC_NUMERIC locale. See
>     the perllocale manpage.

      The standard formats can be found under the listing for sprintf().

> --
> An optimist is someone who believes Schroedinger's cat is half alive.

An optimist is one who believes that everything is white, including
that which is black.  - Ambrose Bierce.

The optimist believes that we live in the best of all worlds.  The
pessimist is afraid that is true.  - Robert Oppenheimer
 
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 02 Jul 1999 10:53:37 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Picture doesn't appear
Message-Id: <377C7E11.9349FCA7@gmx.net>

Abigail wrote:
> 
> Wrong again. He wasn't using anything that isn't HTML 2.0, for which
> <!DOCTYPE> is optional.

Oops. Didn't know that.

> Please people, it's easy to critise someone, but make sure you get
> your own facts straight. The HTML specification isn't exactly rocket
> science.

Thanks for correcting me. I wasn't sufficiently familiar with the HTML
specification. I suppose I should have shut up.

<goes and hides in a corner>

Cheers,
Philip


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

Date: 2 Jul 1999 12:16:19 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Please help!
Message-Id: <7liaij$19l$1@gellyfish.btinternet.com>

On Wed, 30 Jun 1999 14:30:12 -0400 Pierre-Luc Soucy wrote:
> 
> As we aren't a big company yet, we can't pay you in $$$.  We will give y
> ou a % of the benefits generated by what you will have created (that's
> less risky for us, but can be more interesting for you).
> 

I suppose some might consider starvation 'interesting'.

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


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

Date: Fri, 02 Jul 1999 14:14:50 GMT
From: newsmf@bigfoot.com
Subject: Pls hlp with regex
Message-Id: <7lihge$cmg$1@nnrp1.deja.com>

I'm looking for a regex that replaces all occurrences of anything like
<a href=javascript:OpenPlayer('nfl','4290')   >
by "xxx".

I.e. I want to replace all hyperlinks that contain the
string "javascript".

My solution:
s/a[^>].*?href.*?javascript.*?>/xxx/gims
does not work. It kicks in with the first <a href...> tag it finds,
even though if that does not contain the string "javascript".

Thank you for your help.

Marc.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 1 Jul 1999 07:39:20 -0700
From: "Dodger" <dodger@dodger.org>
Subject: Re: Pls hlp with regex
Message-Id: <7lih4k$6nf$1@ancalagon.dragon-net.net>

newsmf@bigfoot.com wrote in message <7lihge$cmg$1@nnrp1.deja.com>...
>I'm looking for a regex that replaces all occurrences of anything like
><a href=javascript:OpenPlayer('nfl','4290')   >
>by "xxx".
>
>I.e. I want to replace all hyperlinks that contain the
>string "javascript".
>
>My solution:
>s/a[^>].*?href.*?javascript.*?>/xxx/gims
>does not work. It kicks in with the first <a href...> tag it finds,
>even though if that does not contain the string "javascript".


s/<a .*?javascript.*?>/xxx/gis;
Why do you need the href in the regex? There's no other place for
'javascript' to show up in an a tag... As long as you specify the space
after the a you are only affecting a tags...


Dodger






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

Date: Fri, 2 Jul 1999 14:45:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Pls hlp with regex
Message-Id: <fc1jl7.6r3.ln@magna.metronet.com>

Dodger (dodger@dodger.org) wrote:
: newsmf@bigfoot.com wrote in message <7lihge$cmg$1@nnrp1.deja.com>...
: >I'm looking for a regex that replaces all occurrences of anything like
: ><a href=javascript:OpenPlayer('nfl','4290')   >
: >by "xxx".
: >
: >I.e. I want to replace all hyperlinks that contain the
: >string "javascript".
: >
: >My solution:
: >s/a[^>].*?href.*?javascript.*?>/xxx/gims


   That will convert:

      <p>a sentence about hrefs and javascript</p>

   into:

      <p>xxx

   Uh oh...


: >does not work. It kicks in with the first <a href...> tag it finds,
: >even though if that does not contain the string "javascript".


: s/<a .*?javascript.*?>/xxx/gis;
: Why do you need the href in the regex? 

   That will convert:

      <a name="about_javascript">

   into:

      xxx

   Uh oh...


: There's no other place for
: 'javascript' to show up in an a tag... 


   Says you.

   :-)

: As long as you specify the space
: after the a you are only affecting a tags...



   Using regular expressions to parse HTML is futile. They do not
   have the expressive power required for that job.

   HTML::Parser can do it though...


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


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

Date: Fri, 02 Jul 1999 07:34:46 +0200
From: distler <td90537@hotmail.com>
Subject: Re: Premature end of script headers:
Message-Id: <377C4F76.EDAC76B1@hotmail.com>

I rechecked this:

I got this error message for example when trying to execute a file with the
right execute permission in the correct cgi-bin directory when this file is for
example a html page.

So can it be that this system you are trying to get this script running does
not know how to execute it?

Either at the beginning of your script this line is missing: #!/usr/bin/perl -w
or something with your perl interpreter is just not right.

Anyway the problem is definitly, that your script is not executed but
interpreted in a way by your webserver.

Hope this helps.
Thomas

Mike Lansing wrote:

> Ok, I think I am on the right track with this. I know for fact that the r/w
> is set chmod 755 I did that about 50 diffrent times and reuploaded it 50
> diffrent times. I have moved the file to everywhich dir on the server. My
> first thot is that the cgi-bin isn't setup right if thats possible?!?!  If
> it is can you suggest a possible route to get this corrected. Does the
> cgi-bin have its own r/w mode set?
>
> - Mike
>
> >So either your cgi-script has no execute permission or it is not in the
> cgi-bin
> >directory.



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

Date: Fri, 02 Jul 1999 10:59:09 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Premature end of script headers:
Message-Id: <377c9b2b.238209@news.skynet.be>

distler wrote:

>I got this error message for example when trying to execute a file with the
>right execute permission in the correct cgi-bin directory when this file is for
>example a html page.
>
>So can it be that this system you are trying to get this script running does
>not know how to execute it?

No. Your script probably runs. Otherwise, you'd get an "internal server
error". But I bet it doesn't print a "Content-type: text/html\n\n" line
at the very start.


	Bart.


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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 V9 Issue 14
************************************


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