[7451] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1076 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 25 07:17:11 1997

Date: Thu, 25 Sep 97 04:00:28 -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, 25 Sep 1997     Volume: 8 Number: 1076

Today's topics:
     Re: Can't See Pattern (brian d foy)
     Re: CGI/Perl: Appending Two Associative Arrays <byron@teleport.com>
     Re: Change /etc/passwd (Jeremy D. Zawodny)
     Re: Creating quick text index of words (Jeremy D. Zawodny)
     Re: David Roth Win32::Pipe?? (Jeremy D. Zawodny)
     Re: Determining if a method is defined for an object <seay@absyss.fr>
     Re: Determining if a method is defined for an object <seay@absyss.fr>
     Re: Ellipses in formats (Jason Gloudon)
     Re: get DOS perl to ignore EOF/SUB chars <pvhp@forte.com>
     Re: Help me verify email address sico@msh.xs4all.nl
     Re: incrementing array names (Ben Reser)
     Re: incrementing array names <seay@absyss.fr>
     Re: List of aliases <seay@absyss.fr>
     Re: NNTP question... <seay@absyss.fr>
     perl -> C converter ? <thierry@cetiis.fr>
     Re: perl -> C converter ? <thierry@cetiis.fr>
     Re: Perl <=> C Server <seay@absyss.fr>
     Perl CGI Security <grapeflavour@hotmail.com>
     Re: Perl CGI Security (Michael Fuhr)
     Re: Perl Generator? <pvhp@forte.com>
     perl install on win32 <74561.610@CompuServe.COM>
     Re: Perl Poetry paper - where? <pvhp@forte.com>
     Perl Programmer in Los Angeles (Pasadena) are <Ray@ours.com>
     Re: perl under win95 problem <felixng@china.com>
     Problem:Perl4.036 on Solaris 2.5 for Oraperl/WDB instal <gdimitog@polaris.umuc.edu>
     Re: Problem:Perl4.036 on Solaris 2.5 for Oraperl/WDB in <pvhp@forte.com>
     RPC chris@charlesworth.com
     Sorting Hash <fishrman@shell.wco.com>
     Re: Sorting Hash <seay@absyss.fr>
     strange malloc's ? <frr@herold.at>
     system() function  <rmorris@cgocable.net>
     Re: Where is HTTP::Request::Common ? <aas@bergen.sn.no>
     Re: Writing xBase (dBase) files (Koos Pol)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 25 Sep 1997 00:43:40 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Can't See Pattern
Message-Id: <comdog-ya02408000R2509970043400001@news.panix.com>

In article <342abd71.2366539@news.cottagesoft.com>, steveb@cottagesoft.com (Steve Bowen) wrote:

>I'm pulling my hair out, trying to figure why Perl can't see the following:

[snip]

>Sat Jun  7 14:14:53 1997

>I need the exact time from this line

after you've had your fun coding it yourself, you might want to
check out the various modules that deal with times and dates [1] :)

#!/usr/bin/perl

$string = 'Sat Jun  7 14:14:53 1997';

$string =~ m/^              # beginning of string
            (\w{3})         # weekday
            \s+
            (\w{3})         # month
            \s+
            (\d{1,2})       # date
            \s+
            (\d\d)          # hour
            :
            (\d\d)          # minute
            :
            (\d\d)          # second
            \s+
            (\d{4})         # year
            $               # end of string
            /x;                
                                  
print <<"HERE";
Weekday: $1
  Month: $2
   Date: $3
   Hour: $4
 Minute: $5
 Second: $6
   Year: $7
HERE

__END__

Weekday: Sat
  Month: Jun
   Date: 7
   Hour: 14
 Minute: 14
 Second: 53
   Year: 1997



[1] Comprehensive Perl Archive Network
find one near you at <URL:http://www.perl.com>

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Wed, 24 Sep 1997 23:17:06 -0700
From: Byron Stuart <byron@teleport.com>
To: Darren Hayes <darrenh@efn.org>
Subject: Re: CGI/Perl: Appending Two Associative Arrays
Message-Id: <342A01E1.EE53FF92@teleport.com>

Why do you have to use PERL to generate the second form?  Why not use
JavaScript (or some other client side scripting language) to pass the
data from the first form to a second form, generated by a function called
by onSubmit?  The second form would contain all of the data of the first
form as hidden fields.  Then, you will still be able to submit a single
form to your original CGI script.  If a second form is not needed, the
function called by onSubmit will return true.  Here's a simple (but
somewhat vague) example of what I mean:

begin example:-------------------------
<html>
<head>
<script language="JavaScript">
<!--

  //The first form's data passed in as a parameter.
  function NewForm(FirstForm){

    //This will contain the new page.
    var text;

    //If the first form needs a second form, create it.
    if(FirstForm.SomeField.value == "something"){
      text = "
        <html> <body> ... etc, etc...
        <form name='SecondForm'
          action='path_to_your_CGI_scriipt'
          ... etc, etc... >
        <input type='hidden' name='FieldName'
          value='" + FirstForm.FieldName.value + "'
        <input ... etc, etc... >"

      //Generates the new page and form.
      document.write(text);

      //Don't process the previous form.
      return false;
    }

    //Else, second form is not needed, process first form.
    else return true;
  }

-->
</head>

<body>

<form name="SomeName" onSubmit="return NewForm(this)"
 action="path_to_your_CGI_script">

 SomeField: <input name="FieldName">
 ... etc, etc...

 <input type="submit" value="Submit">

</form>
</body>
</html>
end example:---------------------------

I hope that example conveys what I mean.  If you don't want to have to
modify your original PERL script, this way should work.  Of course, the
draw back is that the client's web brobser will have to be JavaScript
friendly.

Byron


Darren Hayes wrote:

> Hello,
>
> I have a CGI script setup to read in and parse info from an html form
> then sendmail the form results. I am using Brenner's cgi-lib.pl Perl
> library and &ReadParse routine to read in the form data into an
> associative array. Everything is working well. Now I wish to redesign
> the form so that we can have a second form page then after both
> form pages have been submitted we can glue all the resulting data
> together for further processing.
>
> To be more specific, after a user "submits" the contents of
> the first form and the CGI calls &ReadParse  whic results in a
> returned associative array. Then I do a test on the returned array to
> find out if I want to do a conditional branch and render an
> additional html form page. If the answer is yes a second form is
> rendered which the user fills out then submits.
>
> My question: Is there an easy way to "append" the data from the
> associative array returned from the second forms &ReadParse CGI
> call to the data sitting in the associative array returned from the
> &ReadParse CGI for the first form?
>
> For examples sake the data from form1 would be returned by:
> &ReadParse(*form1_data);
>
> And the data from form2 would be returned by:
> &ReadParse(*form2_data);
>
> Can I easily "append" the data sitting in %form_data2 to
> the end of %form_data1 and keep the keys/values in order.
>
> Would the following do the job?
>  %form_data2.=%form_data1
>
> I hope this is clear ;-) This newbie appreciates any and all
> feedback. Please email if you can as my ISP's news server hiccups
> alot. Thanks.
>
> Darren
> darrenh@efn.org





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

Date: Wed, 24 Sep 1997 12:48:55 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Change /etc/passwd
Message-Id: <34290c05.162089652@igate.hst.moc.com>

[cc'd automagically to original author]

On Wed, 24 Sep 1997 04:29:06 +0200, Juan Carlos del Rio
<jcarlosd@ford.com> wrote:

>Jeremy D. Zawodny wrote:
>> >> >Is there any perl function or routine that can send the password
>> >> >parameters (user, old password,  new password) to the passwd command?
>> >>
>> >> The simplest way to do this from a language perspective is to use expect
>> >> see http://expect.nist.gov.
>> >
>> You're suggesting that one use the HTTPD module to change Unix system
>> passwords? I must have missed something...
>
>Yes that is correct. I am trying to work with expect, as J Gloudon
>suggested. It seems like working in other environments, though I was not
>able yet to make it work on HP-UX 10.20 and running the /etc/passwd
>command.

Uhm, /etc/passwd is not a command. It *is* the password file.

I *hope* you already knew that, but I'd rather be safe and check...

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Wed, 24 Sep 1997 17:45:24 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Creating quick text index of words
Message-Id: <34294fb1.179413543@igate.hst.moc.com>

[cc'd automagically to original author]

On Wed, 24 Sep 1997 13:00:14 -0400, Prince Mystery <mystery@itis.com>
wrote:

>I'm hoping to create a method that is going to be accessed by a bunch of
>different perl scripts for the purpose of adding word indexes to a
>pre-exisiting datbase of words.
>
>What I'm worried about is what I should be ignoring.  I'm trying to
>index textual input from a user, and the field may contain such
>non-essentials as "a","and","the", and so on.
>
>Is there a definitive list of non-essential words somewhere?

An interesting question, in one sense at least. :-)

I'll start out with the obligatory reminder that your question has
nothing to do with Perl, so it's really not appropriate material for
this group. I know that because the nature of your question is
language-independant. If you were to program it in C, Lisp, COBOL,
Pascal, Natural, or any other language, it'd be the same.

On the other hand, I'm not sure which newsgroup *I'd* post this
question in if I had to, so take it with a grain of salt...

To the real question, it depends on what "non-essential" means in the
context of the type of information you are indexing. I'm sure there is
some research on "non-essential" or "noise" words when it comes to
indexing written English texts.

However, if you content is special in some way or another, those
"standard" constraints might now apply.

You might ask a your local friendly reference librarian and see if
s/he knows. I have a friend who is a reference librarian of sorts, and
I think she'd have a good answer. :-)

Good Luck,

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Wed, 24 Sep 1997 12:51:52 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: David Roth Win32::Pipe??
Message-Id: <342a0c81.162213080@igate.hst.moc.com>

[cc'd automagically to original author]

On Tue, 23 Sep 1997 13:09:42 +0100, Webmaster <webmaster@biola.edu>
wrote:

>Has anyone worked with this module who could give me some help?
>
>We just upgraded to build 310 and the module no longer works with the
>new build.
>Is there a new version out there somewhere or how would you go about
>editing the old one to work with the new perl build.

I'd check (1) CPAN, and (2) Dave, himself.

Dave's web site is at www.roth.net, and if you don't know how to find
CPAN, well... :-)

FWIW, you might also want to get on the Perl-Win32-* mailing lists at
ActiveState--things like this come up (and are resolved) all the time
on them.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Thu, 25 Sep 1997 11:01:08 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Determining if a method is defined for an object
Message-Id: <342A2854.5FD4C2A4@absyss.fr>

Martin Gregory wrote:
> 
> Suppose you have (a reference to) and object in $obj and the name of a
> method in $method.
> 
> I'm interested in how you could determine whether the method is
> defined for the object.  I'm especially interested if it can be done
> without symbolic references.

AUTOLOAD is not your friend for this one.  x->y() does not imply that
"y" exists anywhere.  Even if "y" exists, it could be in a different
package due to the wonders of @ISA.


> I have seen one solution (which uses symbolic references and
> catenation).  But it doesn't feel that satisfying.
> 
> The fact that $obj->$method is an invocation and not a dereference is
> so sad (in this context), because it means that you can't look and see
> if the 'reference' is defined.....  

You mean you have to use eval() to trap the error of the method not
existing?  I agree that this is ugly.


> Is there some other way that I could have (a representation of) the
> method (other than a name in a string) that would result in a
> different problem that has a more satifying solution?  ( :-) )

Could do something like

	$method = \&y;
	$x->&$method(@parms)

You couldn't get to the call unless you were sure that y() existed.  Of
course, AUTONET supplied functions can't be done this way.  You would
have to manually go through the superclasses of x to look for y too.

Sorry, but I don't see any simple answers to "is y a valid method for
x".

- doug


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

Date: Thu, 25 Sep 1997 12:44:10 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Determining if a method is defined for an object
Message-Id: <342A407A.2F098CF7@absyss.fr>

Doug Seay wrote:
> 
> Martin Gregory wrote:
> >
> > Suppose you have (a reference to) and object in $obj and the name of a
> > method in $method.
> >
> > I'm interested in how you could determine whether the method is
> > defined for the object.  I'm especially interested if it can be done
> > without symbolic references.
> 
> AUTOLOAD is not your friend for this one.  x->y() does not imply that
> "y" exists anywhere.  Even if "y" exists, it could be in a different
> package due to the wonders of @ISA.

	<snip>

> Sorry, but I don't see any simple answers to "is y a valid method for
> x".


Via email Guy Decoux reminded me that "can" does handle the ISA
inheritance, but still doesn't work for AUTOLOAD.

- doug


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

Date: 25 Sep 1997 03:57:55 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: Re: Ellipses in formats
Message-Id: <60cng3$vb$1@daily.bbnplanet.com>

Allen Choy (achoy@us.oracle.com) wrote:
: Hi.

: The Camel book mentioned that the $: variable is used to do
: ellipses in formats but it doesn't say how.  I didn't find any doc 
: about this in the FAQs either.

: Can some give me a brief tutorial about using this?  I just want
: to enable this feature on specific fields.

: Thanks in advance,

You are misreading the significance of $:.
This comes from the perlvar manpage:

$FORMAT_LINE_BREAK_CHARACTERS

       $:      The current set of characters after which a string
               may be broken to fill continuation fields
               (starting with ^) in a format.  Default is " \n-",
               to break on whitespace or hyphens.  (Mnemonic: a
               "colon" in poetry is a part of a line.)

Ellipsis points are only inserted at the end of a multiline ^ field when
you end the final field with ...
Look at the perlform manpage for an example - the $description field.

Jason Gloudon


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

Date: Thu, 25 Sep 1997 03:46:09 -0700
From: Peter Prymmer <pvhp@forte.com>
To: Eric Pement <epement@ripco.com>
Subject: Re: get DOS perl to ignore EOF/SUB chars
Message-Id: <342A40F1.4F00@forte.com>

Eric Pement wrote:
> 
> I'm using the MS-DOS port of perl v 4.0M4 and 5.003, and have discovered
> that perl stops processing when it finds an EOF char (SUB, Ctrl-Z, 0x1A)
> embedded in a textfile.  I would like perl to ignore the EOF/SUB character
> and not stop when it encounters it.  Any ideas of how to do this with
> perl?  I'm using 4DOS v5.52 if it means anything.  A reply by e-mail, in
> addition to a post to this newsgroup, would be appreciated.
> 
> --
> Eric Pement <epement@jpusa.chi.il.us>


Did you try either of these?:

    read FILEHANDLE,SCALAR,LENGTH,OFFSET
    read FILEHANDLE,SCALAR,LENGTH

you might also try the sysopen(), sysread(), sysseek() functions - but
they
may not be implemented in your DOS port.

Good luck.

Peter Prymmer


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

Date: 25 Sep 1997 04:56:57 GMT
From: sico@msh.xs4all.nl
Subject: Re: Help me verify email address
Message-Id: <60cqup$2mf$1@news2.xs4all.nl>

[followups to comp.lang.perl.misc, if you ask me]

In article <3428ACD1.7574B8FC@bjt.net>, Tam Bui  <tbui@bjt.net> wrote:

>OK.  I have this perl script that a user fills out at his/her terminal
>at work.  One of the item's that they fill out is their e-mail address.
>This perl script then sends the user information to a server, which in
>turn uses this e-mail address to send back continuous notifications.  If
>the user incorrectly entered in his/her email address, NO notifications
>would be sent.  I was wondering if there was a way for me to run
>sendmail inside of this perl script to verify a user's email address
>before they send their user information to the server.  In fact, if
>sendmail can generate the user's email address, I can remove this option
>from the script altogether.  Also, can sendmail detect cc-mail addresses
>or filter out mail servers so that workstations as addresses will not
>work (that is, cad399.here.net won't work, but mailserver.here.net will
>work) (this is just a side question -- has nothing to do with what I
>originally was asking)?  If anyone can help, I'd think you were really
>really cool, and I'd tell your mom you're cool.

That would be awfully nice of you! However, what follows is untested, off
the top of my head, unfounded speculation, so you're on your own here. ;-)

I'd say the proper thing to do is do it all in Perl (v. 5.0+) and leave
poor old sendmail out of it. There must be an SMTP package so you could
do VRFY or look for MX records or whatever. HTH. HAND.

>Thanks,
>Tam Bui

CU, Sico.


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

Date: Thu, 25 Sep 1997 03:55:28 GMT
From: ben@reser.org (Ben Reser)
Subject: Re: incrementing array names
Message-Id: <3429e053.9535871@192.168.0.1>



On Wed, 24 Sep 1997 19:39:05 -0700, Gary Richardson
<gary@econ.Berkeley.EDU> wrote:
>
>Help!
>
>I am a new Perl user.
>I am trying to figure how to increment array names in a for loop.
>I want to make 1000 arrays labled @output1 to @output1000.
>@output1 is a split line of text from another array, @input.
>The lama and camel books tell me how to access each element
>of the @input array, but they don't tell me how to increase
>the number of my output array each time I pass through the loop.
>
>The following works for one line
>
>@output1 = split(/\s/,@input[1]) ;
>
>I am hoping that a command like
>
>for $i (0..1000) {@output$i = split(/\s/,@input[$i])} ;
>
>would work for all 1000 lines.
>
>
>Thanks for any light you could shed on my problem.
>
>Perl novice
>
>Gary Richardson
>
>gary@econ.berkeley.edu
>

Gary,

You can use something like this:
for ($i = 0; $i <= 1000; $i++) {
  @{output$i} = split(/\s/,@input[$i]);
}

************************* IMPORTANT *************************
Why the new email address you ask?
Simple, I'm attempting to simplify the way I filter my mail.
Please direct all personal mail to ben@reser.org
Not directing personal mail to this address may cause
delays in me reading your mail or may even get it deleted.
************************ IMPORTANT *************************

---
Ben Reser <ben@reser.org>
http://ben.reser.org
	
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(+)@ s:- a-- C++++$ UBVC++++(++)$ P+++$>++++ L- !E---- W@ N(+)>++ o? K--? w++$@>+++ !O---- !M V PS+(++)@>+++ PE++(+++)@ Y+(++)@ PGP+(++)>+++ t+()@ 5 X !R tv-(+)@>-- b+(++)>+++ DI++ D G e h++ r-()>+++ y? 
------END GEEK CODE BLOCK------ 


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

Date: Thu, 25 Sep 1997 12:17:27 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: incrementing array names
Message-Id: <342A3A37.43F09A93@absyss.fr>

Ben Reser wrote:
> 
> On Wed, 24 Sep 1997 19:39:05 -0700, Gary Richardson
> <gary@econ.Berkeley.EDU> wrote:
> >
> >Help!
> >
> >I am a new Perl user.

Welcome to Perl.

ObNewbieAdvice: always use "-w" and "use strict" when developping.  They
will make your life easier.  "use diagnostics" can help by giving more
understandable error messages.


> >I am trying to figure how to increment array names in a for loop.
> >I want to make 1000 arrays labled @output1 to @output1000.
> >@output1 is a split line of text from another array, @input.
> >The lama and camel books tell me how to access each element
> >of the @input array, but they don't tell me how to increase
> >the number of my output array each time I pass through the loop.

> You can use something like this:
> for ($i = 0; $i <= 1000; $i++) {

This actually loops 1001 times.  Gary, this is what you did in your
original example, so we have to assume that you know what you want.

>   @{output$i} = split(/\s/,@input[$i]);
                         ^^^
                            ^^^
                         should this be /\s+/
                            should this really be a splice?

> }

This does do what Gary asked for, but I don't think that this is the
best approach.  Perhaps because I dislike symbolic references.  Whatever
the reason, I think the whole idea of "incrementing array names" is
somewhat silly as it is rarely the best way to solve a problem (IMHO,
YMMV).  What he is really trying to do is build a two dimensional
array.  For this type of problem I think he would be served better with
a list of lists ("perldoc perllol" for some good reading). 

	my @list;
	foreach my $item ( @input )
		{
		my @temp = split(/\s/, $item);
		push(@list, \@temp);
		}

== or ==

	my @list;
	foreach my $item ( @input )
		{ push(@list, [ split(/\s/, $item) ]); ;}

== or even ==

	my @list = map { [split /\s/] } @input;

They all do the same thing, just getting progressively more
"perlthink".  For beginners, I think the first one should be the easiest
to read.

Now we don't have any bizarre limits like 1000 (the length of @list is
dynamic depending on the length of @input) and we didn't use any
symbolic references.  Where you would have used $list345[2], you can now
do $list[345][2].  For @output$i you would now use @{$list[$i]}.

- doug


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

Date: Thu, 25 Sep 1997 11:36:13 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: List of aliases
Message-Id: <342A308D.759FF8F2@absyss.fr>

Joe Gottman wrote:
> 
> Hello,
> 
>    I'm writing a perl script and I need to get a list of the aliases
> that are defined for the shell I am calling the script from. I tried
> using `alias` with backticks, but this resulted in a list of aliases
> completely different from what I got when I called alias from the
> command line (apparently Perl starts a new shell and defines its own
> aliases). How do I get Perl to list the aliases I want?

You can't.

Perl is a completely different process from your shell, and it doesn't
have the ability to snoop around local memory of your shell to look for
alias lists.  You could do something like

	alias show_aliases `alias | perlscript`

and have your perlscript parse the output of the alias command of your
shell

- doug


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

Date: Thu, 25 Sep 1997 10:35:34 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: NNTP question...
Message-Id: <342A2256.1A1EFF48@absyss.fr>

Brian DeRosa wrote:

	<snip>

>   for all articles since the last time I read articles (or the last 3000,
>                 whichever is a smaller number)
>   {
>       foreach line in header
>       {

	<snip>

> Now, I'm running Perl 5.004 on a Win95 based system at home over a 28.8
> connection.  This script runs in a DOS window, but seems to take a very long
> time to retrieve the desired information from, say, 2000 articles.  Netscape
> does the same subject retrieval in a fraction of the time.

I think Netscape uses XPAT, not HEADER or ARTICLE to get the info.  This
would reduce the network traffic and thus make a huge difference in
time.  XOVER (overview info) seems to have the article number, the
subject and the message id.  Could this speed things up even more? 
These are documented in News::NNTPClient, but looking at the RFCs might
be a good idea too.

- doug


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

Date: Thu, 25 Sep 1997 09:59:43 +0100
From: thierry philipovitch <thierry@cetiis.fr>
Subject: perl -> C converter ?
Message-Id: <342A27FF.41C67EA6@cetiis.fr>

Hello,
I've written lots of things in perl, and I need them on a box where I
can have perl.
So I'm looking for a perl to C converter...
Is  it possible ?
Thanks in advance !
Thierry
-- 
Thierry Philipovitch                   Thierry.Philipovitch@cetiis.fr
SAFEGE-CETIIS                          Tel. : (33) 4 42 93 65 10
Aix Metropole Bt D/30, av Malacrida    Fax  : (33) 4 42 93 65 15
FR 13100 Aix-en-Provence


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

Date: Thu, 25 Sep 1997 11:01:10 +0100
From: Thierry Philipovitch <thierry@cetiis.fr>
To: David Jonsson <david@sunny.bahnhof.se>
Subject: Re: perl -> C converter ?
Message-Id: <Pine.SUN.3.95.970925105814.17751B-100000@bali.cetiis.fr>


well, perhaps, but I can't install perl on this box, so...

(in fact, this box is a cray t3e, where one can only run big prgms)
Thierry

On Thu, 25 Sep 1997, David Jonsson wrote:

> Date: Thu, 25 Sep 1997 10:46:46 +0200 (MET DST)
> From: David Jonsson <david@sunny.bahnhof.se>
> To: thierry philipovitch <thierry@cetiis.fr>
> Subject: Re: perl -> C converter ?
> Newsgroups: comp.lang.perl.misc
> 
> In article <342A27FF.41C67EA6@cetiis.fr> you wrote:
> : Hello,
> : I've written lots of things in perl, and I need them on a box where I
> : can have perl.
> : So I'm looking for a perl to C converter...
> 
> Hmmm, isn't perl more portable than c?:-)
> 
> David
> -- 
> David Jonsson    Phone +46-18-24 51 52           Fax +46-8-681 20 66
>                  GSM +46-706-339487              E-mail david@bahnhof.se
> Uppsala, Sweden  Web: http://bahnhof.se/~david/  Postgiro 499 40 54-7
> 

Thierry Philipovitch                   Thierry.Philipovitch@cetiis.fr
SAFEGE-CETIIS                          Tel. : (33) 4 42 93 65 10
Aix Metropole Bt D/30, av Malacrida    Fax  : (33) 4 42 93 65 15
FR 13100 Aix-en-Provence



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

Date: Thu, 25 Sep 1997 11:33:08 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Perl <=> C Server
Message-Id: <342A2FD4.1C72351A@absyss.fr>

dave wrote:
> 
> >Andrew M. Langmead wrote:
> >> struct foo {
> >>   char name[32];
> >>   int id;
> >> };
> >>
> >> could be converted like this:
> >>
> >>   ($name, $id) = unpack 'A32I', $data;
> >
> 
> I'm surprised that this works for you.  Exactly how does Perl know the
> last valid character in the name?

The programmer specified "A32I" which means 32 bytes of ascii text
padded with spaces (more interesting for the pack than the unpack)
followed by an unsigned integer (endian is system specific).  Perl grabs
32 bytes, calls it a string and puts that in $name.  The next
sizeof(int) bytes are grabbed, called an integer and stuffed into $id. 
Perl doesn't know anything about the "last valid character in the name",
it just knows to get 32 characters.

- doug


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

Date: 25 Sep 97 03:53:07 GMT
From: "Dawn" <grapeflavour@hotmail.com>
Subject: Perl CGI Security
Message-Id: <01bcc966$95c082c0$2a9ccdcd@C806.total.net>


        I was wondering if anyone had any suggestions on books and websites
that
would give me information on writing perl CGIs with little or no security
holes.

Daren


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

Date: 24 Sep 1997 23:05:51 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Perl CGI Security
Message-Id: <60crff$3r9@flatland.dimensional.com>

"Dawn" <grapeflavour@hotmail.com> writes:

>         I was wondering if anyone had any suggestions on books and websites
> that
> would give me information on writing perl CGIs with little or no security
> holes.

Turn on Perl's taint checks in all your CGI scripts -- see the perlsec
manual page for details.

For writing secure CGI programs in general, it would be better to
ask in comp.infosystems.www.authoring.cgi.  But here are a couple of
links -- you'll find more links when you visit them, particularly the
latter:

    http://www.genome.wi.mit.edu/WWW/faqs/www-security-faq.html
    http://www.go2net.com/people/paulp/cgi-security/

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/


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

Date: Thu, 25 Sep 1997 03:29:47 -0700
From: Peter Prymmer <pvhp@forte.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl Generator?
Message-Id: <342A3D1B.5F24@forte.com>

Tom Phoenix wrote:
> 
> On Wed, 24 Sep 1997, jack wrote:
> 
> > Newsgroups: comp.lang.perl, comp.lang.perl.misc
> 
> If your news administrator still carries comp.lang.perl, please let him
> or her know that that newsgroup has not existed since 1995. If you
> have such an outdated newsgroup listing, you are probably missing out
> on many other valid newsgroups as well. You'll be doing yourself and
> many others a favor to use only comp.lang.perl.misc (and other valid
> Perl newsgroups) instead.
> 
> > I was wondering if anyone knows of a Perl generator where you either
> > use common, pre-written commands (drop & drag) or write simple
> > statements that are expanded into Perl modules?
> 
> It would be hard to make something which could make writing Perl any
> easier than writing Perl. :-)  Really, there's nothing like this that I've
> ever seen. But you could always look for a way that something is done in
> somebody else's script and emulate that. Hope this helps!
> 
> --
> Tom Phoenix           http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
> Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
>               Ask me about Perl trainings!


Have you had much chance to play with SpecPerl?

Peter Prymmer


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

Date: Wed, 24 Sep 1997 12:56:44 -0400
From: Kevin Goess <74561.610@CompuServe.COM>
Subject: perl install on win32
Message-Id: <eufuXrQy8GA.343@nih2naac.prod2.compuserve.com>

Does anyone know what could be causing this?  Our .cgi script is 
trying to get some data from an .exe. We have two NT 4.0 machines 
running Microsloth IIS 2.0, Perl 5.004_02 bindist 004 running the 
same script, but which produce two different results.
====================================================
#test.cgi:
print "content-type: text/html\n\n";
$x = `echo bobo`;
print "error: $!<br>\n" if $!;
print "x is $x";
=====================================================
Machine 1:
error: Broken pipe   
x is bobo             <==sets $x, that's what I want
=========================================
Machine 2:
error: Broken pipe 
x is                  <==never sets $x, why not?

I've been through the registries with a fine tooth comb and can't 
find any difference.  Does anybody have a suggestion what to look 
for?  Thanks in advance.


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

Date: Thu, 25 Sep 1997 03:39:18 -0700
From: Peter Prymmer <pvhp@forte.com>
To: Matthew Cravit <mcravit@best.com>
Subject: Re: Perl Poetry paper - where?
Message-Id: <342A3F56.5BDE@forte.com>

Matthew Cravit wrote:
> 
> Page 552 of the blue Camel refers to a paper about Perl poetry by Sharon
> Hopkins, titled "Camels and Needles: Computer Poetry Meets the Perl
> Programming Language". The book indicates that this paper is available on
> CPAN as misc/poetry.ps; however, I am unable to find it on any of the CPAN
> mirrors I've checked so far. Does anyone know where I might be able to find
> a copy of it?
> 
> TIA.
> /MC
> 
> --
> Matthew Cravit, N9VWG               | Experience is what allows you to
> E-mail: mcravit@best.com (home)     | recognize a mistake the second
>         mcravit@taos.com (work)     | time you make it.


Hmm.. I could not find it either.  If you look through one or the other
index listed in $CPAN/indices/ then perhaps it will turn up.  The only
mention of "poetry" I found there was:

    CPAN/scripts/nutshell/ch7/poetry

which is Larry Wall's collection (including Black Pearl).

Peter Prymmer


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

Date: Thu, 25 Sep 1997 02:52:49 -0700
From: Diran Afarian <Ray@ours.com>
Subject: Perl Programmer in Los Angeles (Pasadena) are
Message-Id: <342A2661.3985@ours.com>

Hi All,

  I am looking for a perl programmer in the Pasadena are that can do
some programming. If anyone is available please let me know. Also let me
know how you charge.

-- =

=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0
=B0    Diran A Afarian     =B0  webmaster@ours.com    =B0
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0  business@ours.com     =B0
=B0  http://www.ours.com   =B0 webmaster@mousepad.com =B0
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0


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

Date: Thu, 25 Sep 1997 13:07:54 +0800
From: Felix Ng <felixng@china.com>
Subject: Re: perl under win95 problem
Message-Id: <3429F1AA.5D46AA46@china.com>

Ohhhhh...


Many thanks...
Sorry to bring for those who help me..:)

Felix


Ron Savage wrote:

> Probably McAfee's virus scanner, actually, not Perl.
> --
> PO`!1





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

Date: 25 Sep 1997 05:02:40 GMT
From: "G DIMITOGLOU" <gdimitog@polaris.umuc.edu>
Subject: Problem:Perl4.036 on Solaris 2.5 for Oraperl/WDB install
Message-Id: <01bcc970$33f5d400$fa1e9096@saga.nascom.nasa.gov>

Dear Perl-ers,

I am trying to install Perl 4.036 on a Solaris 2.5.1 box; this is necessary
for running WDB and Oraperl so we can build a Web-based application.

The errors I am getting come after 'Configure' and 'make depend' at the
last 'make' stage  complaining about uperly.o. Is there *any* hints/tips on
installing this old version on a Solaris 2.5.1 box? Or, do you know if
Oraperl works with Perl 5.0. Or even better, is there a better way to build
an application queering my Oracle 7.x database from the Web?

Thank you, I will summarize.
George Dimitoglou
george@esa.nascom.nasa.gov
NASA Goddard Space Flight Ctr 


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

Date: Thu, 25 Sep 1997 03:27:45 -0700
From: Peter Prymmer <pvhp@forte.com>
To: G DIMITOGLOU <gdimitog@polaris.umuc.edu>
Subject: Re: Problem:Perl4.036 on Solaris 2.5 for Oraperl/WDB install
Message-Id: <342A3CA1.2449@forte.com>

G DIMITOGLOU wrote:
> 
> Dear Perl-ers,
> 
> I am trying to install Perl 4.036 on a Solaris 2.5.1 box; this is necessary
> for running WDB and Oraperl so we can build a Web-based application.
> 
> The errors I am getting come after 'Configure' and 'make depend' at the
> last 'make' stage  complaining about uperly.o. Is there *any* hints/tips on
> installing this old version on a Solaris 2.5.1 box? Or, do you know if
> Oraperl works with Perl 5.0. Or even better, is there a better way to build
> an application queering my Oracle 7.x database from the Web?
> 
> Thank you, I will summarize.
> George Dimitoglou
> george@esa.nascom.nasa.gov
> NASA Goddard Space Flight Ctr

There is a better way using perl 5 and the DBI interface and the 
DBD::Oracle database driver.

See 

   http://www.hermetica.com/technologia/DBI/

for more information.

Peter Prymmer


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

Date: Thu, 25 Sep 1997 04:42:46 -0600
From: chris@charlesworth.com
Subject: RPC
Message-Id: <875179533.10735@dejanews.com>

Does anyone know how to use RPC within Perl? All I want to be able to do
is check filesize to see if a file has managed to get copied in its
entirety from one server to another... ..sounds easy?

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


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

Date: 22 Sep 1997 17:45:28 GMT
From: "Michael A. Watson" <fishrman@shell.wco.com>
Subject: Sorting Hash
Message-Id: <606aro$9sd$1@news.wco.com>

I am getting both the key and value from a hash using
while (($key,$val) = each %browser) 
is there a way to get the same reuslts but sorted by value?

I have read the FAQ's and Deja News and was unable to find anything regarding 
this particular issue. 


Mike
fishrman@wco.com

Bay Area Regional Fishermen
http://www.wco.com/~fishrman
Dedicated to Saltwater Fishing and
Saltwater Fishing Boats of the
Monterey Bay Area, Halfmoon Bay Area,
San Francisco Bay Area, and the 
Surrounding Ocean.


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

Date: Thu, 25 Sep 1997 12:27:50 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Sorting Hash
Message-Id: <342A3CA6.489FA72A@absyss.fr>

Michael A. Watson wrote:
> 
> I am getting both the key and value from a hash using
> while (($key,$val) = each %browser)
> is there a way to get the same reuslts but sorted by value?
> 
> I have read the FAQ's and Deja News and was unable to find anything regarding
> this particular issue.

Try reading FAQ #4, looking for the questions

	How do I sort a hash (optionally by value instead of key)?
	How can I always keep my hash sorted?

The short answer is that each and sorting are fairly exclusive.

- doug


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

Date: Thu, 25 Sep 1997 09:48:17 +0200
From: Roland Friedwagner <frr@herold.at>
Subject: strange malloc's ?
Message-Id: <342A1741.9E92F5AE@herold.at>

Hello !

try out each of the two programms and look at memory-consumption
when they are running.

Strange mallocs with:
------------------------------------------------------
#!/usr/bin/perl

foreach $i (1..200000) {
    $j++;
    print "\r$i";
}
------------------------------------------------------
consuming about 10M on startup and grows to 18Megs at 200000 !


works fine without print:
------------------------------------------------------
#!/usr/bin/perl

foreach $i (1..200000) {
    $j++;
}
------------------------------------------------------
consuming about 10M on startup and nothing more.

Whats wrong with the first version ?

Greetings Roland F.



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

Date: Thu, 25 Sep 1997 00:30:19 -0400
From: Roy Morris <rmorris@cgocable.net>
Subject: system() function 
Message-Id: <3429E8DB.22C48272@cgocable.net>

Hi I have installed perl for use under dos as a front end for un
attended installations of
winnt . The code seems to function correctly except for the "system()"
function ?
they are simple "cls"  and prompt commands , but when I run this same pl
file on a
winnt , or 95 machine they work fine ..
Can anyone help me with this ?

Thanks in advance




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

Date: 25 Sep 1997 10:45:58 +0200
From: Gisle Aas <aas@bergen.sn.no>
Subject: Re: Where is HTTP::Request::Common ?
Message-Id: <h4t79ye61.fsf@bergen.sn.no>

Byron Stuart <byron@teleport.com> writes:

> Where is HTTP::Request::Common ?  What am I doing wrong?  Any
> help/debuging would be great.

It was introduced in libwww-perl-5.09.  The current version is 5.13.

-- 
Gisle Aas <aas@sn.no>


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

Date: 25 Sep 1997 07:08:09 GMT
From: koos_pol@nl.compuware.com.NO_JUNK_MAIL (Koos Pol)
Subject: Re: Writing xBase (dBase) files
Message-Id: <60d2kp$1n1@news.nl.compuware.com>

In <3428F967.441E9F5F@absyss.fr>, Doug Seay <seay@absyss.fr> writes:
>
>I once started a writable xBase module, but I never did the .cdx files,
>so things got corrupted kinda quickly.  Someone with a .cr (costa rica?)
>address was asking about it two months ago, so I gave him my files. 
>Maybe you can use DejaNews to find out who it was and get in touch with
>him.
>
>Good luck.
>
>- doug


Thanks Doug, I am going to track this guy :-) !

-----------------------------------------------------------------------
Koos Pol                                                  P.O Box 12933
PC Systems Admin                                    1100 AX   Amsterdam
Compuware Europe                                   tel:  +31 20 3116122
                                              Koos_Pol@nl.compuware.com
-----------------------------------------------------------------------



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

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

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