[15543] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2957 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 5 12:16:57 2000

Date: Fri, 5 May 2000 06:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <957531913-v9-i2957@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 5 May 2000     Volume: 9 Number: 2957

Today's topics:
    Re: *** To retrieve remote files regularly? <andy@i-a.co.uk>
    Re: *** To retrieve remote files regularly? (Bart Lateur)
        8i + Oraperl DBD db112i@my-deja.com
        Cookie & redirect <stephane@siw.ch>
    Re: Cookie (Tony L. Svanstrom)
    Re: Cookie <rwoodman@verio.net>
    Re: Exceptions that can't be caught by eval {} and loca <iltzu@sci.invalid>
    Re: file upload <johnnylee@totalise.co.uk>
    Re: file upload nobull@mail.com
    Re: First Perl Program <andersen+@rchland.ibm.com>
        getting started with perl on unix <susan.jaeckleNOsuSPAM@kodak.com.invalid>
    Re: getting started with perl on unix <uackermann@orga.com>
    Re: getting started with perl on unix nobull@mail.com
    Re: getting started with perl on unix <susan.jaeckleNOsuSPAM@kodak.com.invalid>
    Re: getting started with perl on unix <susan.jaeckleNOsuSPAM@kodak.com.invalid>
    Re: getting started with perl on unix <c960334@student.dtu.dk>
    Re: getting started with perl on unix (John Rappe)
    Re: getting started with perl on unix <andersen+@rchland.ibm.com>
    Re: Help please -- pod2html <bolshoe_noga@bigfoot.com>
    Re: Help please -- pod2html (Bart Lateur)
        help reqd. for 'new' method sambitm@my-deja.com
    Re: help reqd. for 'new' method <uackermann@orga.com>
    Re: How single-line switch (/s) works in regexps? nobull@mail.com
    Re: if file already exists then remove... <rhomberg@ife.ee.ethz.ch>
    Re: Perl & delivering Databases? ammar_aganovic@my-deja.com
    Re: Perl & delivering Databases? ammar_aganovic@my-deja.com
    Re: Perl 5.6 stable?? (Bart Lateur)
    Re: Perl 5.6 stable?? <latsharj@my-deja.com>
        perlcc Perl -> C <jaccobs@home.nl>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 05 May 2000 11:19:12 +0100
From: Andy Jeffries <andy@i-a.co.uk>
Subject: Re: *** To retrieve remote files regularly?
Message-Id: <3912A020.EE879E94@i-a.co.uk>

Jonathan Stowe wrote:
> > It feels really strange answering a PHP question on a Perl newsgroup,
> > but using PHP is easy, something like the following should do it:
> >
> > $myfile =
> > fopen("ftp://username:password@mysite.com/images/downloadme.gif", "rb");
> 
> Ah! the light dawns - this is why people think that you can open a URL
> in Perl just the same as a normal file.

The confusion comes from the fact that the line of code above is PHP, in
which you can open a URL just like a normal file.

:-)


-- 
Andy Jeffries
Head of Web Development
Internet Assist Ltd.

Web : www.i-a.co.uk
Tel : +44 (0)20 8547 3700


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

Date: Fri, 05 May 2000 12:47:45 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: *** To retrieve remote files regularly?
Message-Id: <3913c284.3693486@news.skynet.be>

I'm a good man <"goodman888"@hongkong.com(remove this part)> wrote:

>> You crosspost to comp.lang.perl.misc but can't find a PDP ng? Weird!
>
>Yes, I didnt find anything like comp.lang.php.*
>I also tried *php* and still got nothing.
>I tried this at 3 news servers.

There are de BBS forums (fora?) at <http://www.zend.com/phorum/>.

-- 
	Bart.


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

Date: Fri, 05 May 2000 12:34:57 GMT
From: db112i@my-deja.com
Subject: 8i + Oraperl DBD
Message-Id: <8euf5f$mj6$1@nnrp1.deja.com>

Help,

I have installed Oracle 8i (8.1.6) on Sun Solaris 7.  I have installed
the latest version of production perl 5.005 and now I'm trying to build
DBD and DBI.

The make and build of DBI 1.13 seems to work, test, and install fine.

The make and build of DBD 1.03 will build but always fails the "make
test" with an error that simply says "You need a
 Solaris patch to run this version of java runtime".  No mention of what
patch.

I've gone to sunsolve and called Sun ... no help.
I've gone to metalink and called Oracle ... no help.

Let my people go.  I need an answer.

I realize that ORACLE_HOME/JRE is a link to the Oracle JRE 1.1.8, but
you must use this version with Oracle.

Someone must have figured this out.

Thanks,
-Don


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


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

Date: Fri, 05 May 2000 12:48:19 GMT
From: "Chello" <stephane@siw.ch>
Subject: Cookie & redirect
Message-Id: <nqzQ4.81331$6X3.1965238@news.chello.at>


I'd like to send a cookie and then redirect, but it doesn't work at all.
Here is my portion of code:

my
$cookie=$q->cookie(-name=>'moonkey_exchange',-value=>'Hi',-expires=>'+37y');

print $q->header(-cookie=>$cookie);

#print CGI->redirect(-uri=>$url,-nph=>1);



I also tried:



my
$cookie=$q->cookie(-name=>'moonkey_exchange',-value=>'Hi',-expires=>'+37y');

print $q->header(-cookie=>$cookie);

print "Location: $url \n\n";

HTH;





Help really welcome. Thanks in advance.



Stéphane





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

Date: Fri, 5 May 2000 13:41:42 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Cookie
Message-Id: <1ea5v6s.12pya57jjhjysN%tony@svanstrom.com>

Bad, bad, bad x-poster.

Chello <stephane@siw.ch> wrote:

> It seems to be ok, but if I look at my cookies folder, that cookie doesn't
> appear anywhere!!! Am I wrong? What can I do? Do somebody have THE code?

Some webbrowsers keep all cookies in RAM until you quit 'em, maybe that's it?

Here's some code that will show you how to make your own cookie and how
they then look (watch out for linebreaks that might have been added):

-----
sub the_swedish_cookiemaker() {
   # (c)2000 svanstrom.com
   my($name,$value,$stay,$path,$domain,$sec) = @_;
   if (($domain =~ tr/\./\./) < 2) {$domain = ".$domain";}
   my(@days,@months,@temptime,,@ends,$cookietime,$i);
   @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
   @months = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
   (@temptime) = gmtime(time+$stay);
   $cookietime = "@days[$temptime[6]],$temptime[3]-@months[$temptime[4]]-".($temptime[5]+1900)." ";
   @ends = (':',':',' GMT',);
   foreach ($temptime[2],$temptime[1],$temptime[0]) {
      $i++;
      if ($_ < 10) {
         $cookietime .= "0$_$ends[$i-1]"
      } else {
         $cookietime .= "$_$ends[$i-1]"
      }
   }
   return("Set-Cookie: $name=$value; expires=$cookietime; path=$path; domain=$domain; $sec\n");
}

print &the_swedish_cookiemaker('namn','value',60*60*24*365,'/','.yourdomain.tld',0);
-----


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
 DSS: 0x9363F1DB, Fp: 6EA2 618F 6D21 91D3 2D82  78A6 647F F247 9363 F1DB
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©1999  <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: Fri, 05 May 2000 06:56:58 -0500
From: Randall Woodman <rwoodman@verio.net>
Subject: Re: Cookie
Message-Id: <3912B70A.845480D8@verio.net>

Visit Matt's Script Archive and grap the cookie library.  It will make life
easier for you.
http://www.worldwidemart.com/scripts/cookielib.shtml


Chello wrote:

> Hi all,
>
> First Question:
>
> I'm looking to write a cookie with that code:
>
> #!/usr/bin/perl -w
>
> use CGI;
>
> $q = new CGI;
>
> $cookie=$q->cookie(-name=>'moonkey_exchange',-value=>$cook_value,-expires=>'
> +1y');
>
> print $q->header(-cookie=>$cookie);
>
> It seems to be ok, but if I look at my cookies folder, that cookie doesn't
> appear anywhere!!! Am I wrong? What can I do? Do somebody have THE code?
>
> Second question:
>
> To retrieve informations from the same cookie I use:
>
> #!C:/perl/bin/perl.exe -w
>
> use strict;
>
> use CGI::Cookie;
>
> print qq(Content-type: text/html\n\n);
>
> my %cookies = fetch CGI::Cookie;
>
> my $cookie_value = $cookies{"moonkey_exchange"};
>
> print qq(<BR>COOKIE: $cookie_value\n);
>
> print qq(<BR>\n);
>
> But that one doesn't display any information from the cookie!!! What's
> happening??
>
> See ya
>
> Stéphane



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

Date: 5 May 2000 12:43:28 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Exceptions that can't be caught by eval {} and local $SIG
Message-Id: <957530192.6095@itz.pp.sci.fi>

In article <8etp47$koc@netnews.hinet.net>, John Lin wrote:
>(2) Why can't I catch the execute error by eval {} ?
>
>(3) I don't think $SIG{__WARN__} = sub {} is the solution.   But
>    DBD::Oracle v1.03 seems to be the newest version.  What can I do?

Warnings are not errors:

$ cat test.pl
eval {
    die   "Error in eval 1.\n";
    print "Still alive in eval 1.\n";
};
print "Caught: $@" if $@;
eval {
    warn  "Warning in eval 2.\n";
    print "Still alive in eval 2.\n";
};
print "Caught: $@" if $@;

$ perl test.pl
Caught: Error in eval 1.
Warning in eval 2.
Still alive in eval 2.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Fri, 05 May 2000 11:21:59 GMT
From: "Johnny Boy" <johnnylee@totalise.co.uk>
Subject: Re: file upload
Message-Id: <3912bdc9.0@news2.cluster1.telinco.net>

The system I'm hosting on doesn't give me access to the perl files, all I
needs is a script that allows file uploads to a specific directory and then
lets me rename.

HELP ME PLEASE ANYONE....I'm a bit stuck




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

Date: 05 May 2000 12:38:30 +0100
From: nobull@mail.com
Subject: Re: file upload
Message-Id: <u9r9bh6xc9.fsf@wcl-l.bham.ac.uk>

"Johnny Boy" <johnnylee@totalise.co.uk> writes:

> The system I'm hosting on doesn't give me access to the perl files, all I
> needs is a script that allows file uploads to a specific directory and then
> lets me rename.

So this would be a non-Perl script then?  What scripting languages
does your host allow you to use?  And why are you asking this question
in a Perl newsgroup?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 05 May 2000 07:42:55 -0500
From: "Paul R. Andersen" <andersen+@rchland.ibm.com>
Subject: Re: First Perl Program
Message-Id: <3912C1CF.F845B332@rchland.ibm.com>

Well, first of all, most any good book on CGI programming will show you
how to get some input from a web page.  The second part of what you want
to do is much harder.  Remember that the CGI is going to run on the
server so the user has to enter a uid and pw that are valid there.  Then,
its not clear if you mean to have some command execute as though the user
were really logged on.  If so, I believe you are SOL.  There has recently
been a discussion about doing a su inside a perl script and the
conclusion reached is that you cannot.

steven_coutts@hotmail.com wrote:

> Hello all, I am new to perl but have programmed before. What I want to
> do is to create a web page that users enter in there username and
> password, now I want a perl script to run a command on my linux box
> using the username and password supplied as command line parameters.
>
> Is this possible and can anyone give me any pointers to get started?
>
> Thanx!
>
> --
> Steven Coutts BSc(Hons)
> steven_coutts@hotmail.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Paul Andersen
-- I can please only ONE person per day.
-- Today is NOT your day.
-- Tomorrow isn't looking good either.





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

Date: Fri, 05 May 2000 05:16:54 -0700
From: Susan <susan.jaeckleNOsuSPAM@kodak.com.invalid>
Subject: getting started with perl on unix
Message-Id: <10405393.84b31c9c@usw-ex0110-076.remarq.com>

I'm a little lost.  I see perl5 on my unix box but don't
know how to use it.  I created a small perl script and get a
message "permission denied".  It looks to me like all of the
files in the perl5 subdirectories can be read by anyone.
Help!


* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Fri, 05 May 2000 13:30:53 +0200
From: Ulrich Ackermann <uackermann@orga.com>
Subject: Re: getting started with perl on unix
Message-Id: <3912B0ED.AA1196AD@orga.com>

Susan wrote:
> 
> I'm a little lost.  I see perl5 on my unix box but don't
> know how to use it.  I created a small perl script and get a
> message "permission denied".  It looks to me like all of the
> files in the perl5 subdirectories can be read by anyone.
> Help!

Where did you run your script? How are the permissions set for that
location?
What does the script look like?
Some more input, please!

Ulrich
-- 
Ulrich Ackermann
ORGA Kartensysteme GmbH (SY-PEAT-STA)
Tel.:+49.5254.991-925 
mailto:uackermann@orga.com


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

Date: 05 May 2000 12:35:42 +0100
From: nobull@mail.com
Subject: Re: getting started with perl on unix
Message-Id: <u9snvx6xgx.fsf@wcl-l.bham.ac.uk>

Susan <susan.jaeckleNOsuSPAM@kodak.com.invalid> writes:

> I'm a little lost.  I see perl5 on my unix box but don't
> know how to use it.  I created a small perl script and get a
> message "permission denied".  It looks to me like all of the
> files in the perl5 subdirectories can be read by anyone.

Yes but can the script be executed by you?

Try:
  chmod +x script

This has nothing to do with perl it applies to all scripting languages
on Unix.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 05 May 2000 05:46:12 -0700
From: Susan <susan.jaeckleNOsuSPAM@kodak.com.invalid>
Subject: Re: getting started with perl on unix
Message-Id: <2e00cd7c.8c57e10b@usw-ex0110-076.remarq.com>

I ran the script in one of my own directories.  Here it is:

#!/usr/local/lib/perl5/5.00503
package main;
print "1 \n";

print "Sid $sid variables are:\n";

print "******************************************\n";
print "ADMIN - $ENV{'ADMIN'}\n";
print "LOGS - $ENV{'LOGS'}\n";


* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Fri, 05 May 2000 05:50:12 -0700
From: Susan <susan.jaeckleNOsuSPAM@kodak.com.invalid>
Subject: Re: getting started with perl on unix
Message-Id: <20a3a96a.8d63802d@usw-ex0110-076.remarq.com>

Thanks but on this one permissions are wide open:

kshopc-117>ls -l db.pl
-rwxrwxrwx   1 oracle   dba          552 May  5 07:49 db.pl
kshopc-118>db.pl
db.pl: Permission denied




* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Fri, 05 May 2000 13:50:08 +0200
From: Andrass Ziska Davidsen <c960334@student.dtu.dk>
Subject: Re: getting started with perl on unix
Message-Id: <3912B570.B22BB69F@student.dtu.dk>

Susan wrote:
> 
> I'm a little lost.  I see perl5 on my unix box but don't
> know how to use it.  I created a small perl script and get a
> message "permission denied".  It looks to me like all of the
> files in the perl5 subdirectories can be read by anyone.
> Help!

How did you execute it?

It is possible, that you should alter the permissions for the file,
especially execute (e.g. chmod u+x file)

look it up in

man chmod


-- 
Andrass Ziska Davidsen
mailto:c960334@student.dtu.dk
DTU-stud.no.: c960334


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

Date: 5 May 2000 12:31:15 GMT
From: jmrappe@excite.com (John Rappe)
Subject: Re: getting started with perl on unix
Message-Id: <slrn8h5fmb.1mui.jmrappe@rufus.localdomain>

Susan <susan.jaeckleNOsuSPAM@kodak.com.invalid> wrote:
>I ran the script in one of my own directories.  Here it is:
>
>#!/usr/local/lib/perl5/5.00503

This is a directory.  Use 
$which perl
to find the location of the executable.

-- 
john


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

Date: Fri, 05 May 2000 07:46:28 -0500
From: "Paul R. Andersen" <andersen+@rchland.ibm.com>
Subject: Re: getting started with perl on unix
Message-Id: <3912C2A4.D7E6AE01@rchland.ibm.com>

Did you remember to chmod +x your script?  Have you got the first line of the script correct (something like: #!/usr/bin/perl)  I believe both of these will
cause a permissions error.


Susan wrote:

> I'm a little lost.  I see perl5 on my unix box but don't
> know how to use it.  I created a small perl script and get a
> message "permission denied".  It looks to me like all of the
> files in the perl5 subdirectories can be read by anyone.
> Help!
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

--
Paul Andersen
-- I can please only ONE person per day.
-- Today is NOT your day.
-- Tomorrow isn't looking good either.





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

Date: Fri, 05 May 2000 10:53:43 GMT
From: Juan Gama <bolshoe_noga@bigfoot.com>
Subject: Re: Help please -- pod2html
Message-Id: <gqcSOQpXYDfjt++xZH00aYaVMN9v@4ax.com>

On 5 May 2000 08:36:23 GMT, jmrappe@excite.com (John Rappe) said:

>Juan Gama <bolshoe_noga@bigfoot.com> wrote:

>>When I run pod2html (under Windows 98), it looks like it's working,
>>but it puts the HTML file on the screen, so it scrolls past rapidly
>>and lets me look at only the last screenful.  

>>Is there a way to make it go to a file?

>>I apologize for not finding this in the documentation, if it's there,
>>but I'm new here, and I'm bewildered by the mass of things to read.  

>perldoc pod2html
>lists the option:
>--outfile=<name>

Thank you.  But when I enter

   pod2html perlvar.pod outfile=c:\perl\perlvar.html

and variations of that, with or without the file name in quotes, it
always comes back saying:

   Can't open outfile: No such file or directory at
   C:/Perl/lib/Pod/Html.pm line 365, <POD> chunk 375.

Then it gives me 25 lines, each telling of something it can't resolve.
For example:

   pod2html.bat: perlvar.pod: cannot resolve L<BUGS> in 
   paragraph 48. at C:/Perl/lib/Pod/Html.pm line 1561.

But there is a happy ending.  I eventually noticed somehow that
pod2html.bat uses something called html.pm, and then I found that I
have the source for that.  I was able to modify the 'open' statement
for the output file in html.pm, and I then got my HTML file.

It also helped to open STDERR to go to a file, so that I could get the
error messages to sit still while I looked at them.

But it still gave me the 25 lines of things it couldn't resolve.



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

Date: Fri, 05 May 2000 12:51:37 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help please -- pod2html
Message-Id: <3915c385.3950755@news.skynet.be>

Juan Gama wrote:

>Thank you.  But when I enter
>
>   pod2html perlvar.pod outfile=c:\perl\perlvar.html
>
>and variations of that, with or without the file name in quotes, it
>always comes back saying:
>
>   Can't open outfile: No such file or directory at
>   C:/Perl/lib/Pod/Html.pm line 365, <POD> chunk 375.

Of course not. You forgot the hyphen/minus sign in front of "outfile".
You may also need to keep the filename perlpod.var for last.

You can also try

   pod2html perlvar.pod >c:\perl\perlvar.html

(untested)

-- 
	Bart.


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

Date: Fri, 05 May 2000 12:11:54 GMT
From: sambitm@my-deja.com
Subject: help reqd. for 'new' method
Message-Id: <8eudq0$l2a$1@nnrp1.deja.com>

Is it OK practice to load the 'new'
method with lots of work and Data?

And is there a way to rename the 'new'
method with something else(though
i dont think that wud be functionally
of any more help!)

Sambit


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


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

Date: Fri, 05 May 2000 14:59:19 +0200
From: Ulrich Ackermann <uackermann@orga.com>
Subject: Re: help reqd. for 'new' method
Message-Id: <3912C5A7.9B989595@orga.com>

sambitm@my-deja.com wrote:
> 
> Is it OK practice to load the 'new'
> method with lots of work and Data?
IMHO it depends on the kind of work and Data
that you are doing in your new-method.
Anything which is dealing with initialisation
should be done in an extra init-subroutine which 
can be called from within the new-method.
 
> And is there a way to rename the 'new'
> method with something else(though
??? use your prefered editor, I would say
(if it is your own modul, of course).

> i dont think that wud be functionally
> of any more help!)
It is not a must, to name that method new(),
although a lot of people are doing so.



Ulrich
-- 
Ulrich Ackermann
ORGA Kartensysteme GmbH (SY-PEAT-STA)
Tel.:+49.5254.991-925 
mailto:uackermann@orga.com


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

Date: 05 May 2000 12:53:52 +0100
From: nobull@mail.com
Subject: Re: How single-line switch (/s) works in regexps?
Message-Id: <u9pur16wmn.fsf@wcl-l.bham.ac.uk>

Larry Rosler <lr@hpl.hp.com> writes:

> In article <u9ya5qfrmr.fsf@wcl-l.bham.ac.uk> on 04 May 2000 13:04:44 
> +0100, nobull@mail.com <nobull@mail.com> says...
> 
> ...
> 
> > Given a prefix of string and a pattern is it possible to test if is
> > necessary to read in more to know if (or what) the pattern will match
> > in that prefix.
> > 
> > eg. 
> > 
> >   ("foo" . $unread) =~ /f/ # Matches
> >   ("foo" . $unread) =~ /o+/ # Matches but we dont know how many
> >   ("foo" . $unread) =~ /od/ # Don't know if is maches
> >   ("foo" . $unread) =~ /d/ # Doesn't match
> 
> Your example code bears little relation to your question.

It's not code, it's pseudo-code using the syntax of Perl.  This should
be blantently obvious since I'm taking about something that AFAIK
can't be done in Perl.  We are for ever telling people to write
pseudo-code following Perl syntax.

>  In these examples, the scalar to be matched is computed by
> concatenation before the matching operation is begun.

You are just deliberately pretending to dense, please stop it. I know
you are not relly that dense.  I _know_ Perl does not have lazy
evaluation in this situation, what I'm asking is if there is some why
to fake it.
 
> Perhaps what you mean is something like this:

No I really mean what I said.  

Given a prefix of string and a pattern is it possible to test if is
necessary to read in more to know if (or what) the pattern will match
in that prefix.

If you find the previous pseudo-code un-helpful then try this actual
code:

 need_more("foo", qr/f/) # Matches => false
 need_more("foo", qr/o+/) # Matches but we dont know how many => true
 need_more("foo", qr/od/) # Don't know if is maches => true
 need_more("foo", qr/d/) # Doesn't match => false

So my question is can we construct the need_more() function using Perl?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 05 May 2000 14:24:27 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: if file already exists then remove...
Message-Id: <3912BD7B.CF7CF81A@ife.ee.ethz.ch>

Henry wrote:

> What it means in practice is that NASA doesn't use Perl to calculate
> maneuver burns, orbit insertion trajectories, and other critical datum
> because if they did, they'd lose a heck of a lot more pilots and probes
> than they currently do.

Yes, and ESA used ADA to get the Ariane V debacle...
- Alex


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

Date: Fri, 05 May 2000 09:58:28 GMT
From: ammar_aganovic@my-deja.com
Subject: Re: Perl & delivering Databases?
Message-Id: <8eu601$d7o$1@nnrp1.deja.com>

In article <8es697$spk$1@porthos.nl.uu.net>,
  "Martijn Tonies" <remove_seal97@dds.nl> wrote:
> My guess is that your first plan would be slow... very slow... What
about a
> 3-tier solution here?

Which one would be slow? The one delivering the records through HTTP?
This about access file was silly, but would it be slow too, if I would
do a "select * from table* query via Perl/PHP3, and send the records
through normal http port, the client would recieve the records and
sttore them localy. Would it be slow, too? We are talking pure ASCII
here, would binary transfers be somewhat faster?

What is a 3-tier solution?

regrads,
Ammar


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


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

Date: Fri, 05 May 2000 10:13:07 GMT
From: ammar_aganovic@my-deja.com
Subject: Re: Perl & delivering Databases?
Message-Id: <8eu6rc$dt6$1@nnrp1.deja.com>

In article <39160278.72617631@news.firstworld.net>,
  efinley@efinley.com wrote:

> Why not just use the stuff in Bundle::DBI from CPAN?  I don't recall
> the name of the modules, but there is one (two?) that allows you to
> set up a proxy on the box that has the DB running.  The proxy accesses
> the DB from localhost, but provides remote network access to the Perl
> DBI.

I've downloaded a a 164k DBI module from CPAN. Is there anything more I
need?  I don't understand how do I set the DSNs in ODBC up to use such
a proxy? Or it can be used by a perl on a client only? Does the proxy
listen to specific port all the time? The root might not like that :(,
and I'd have a restart problems (would have to use at to start such a
proxy).

This sound like a good moment for the following question...

Can I install/use Perl modules without having the root to install them
globaly? I guess I could do a 'perl Makefile.pl', and a make, too. I
also guess I could use some calling convention to call the module with
a given path, right? The thing that confuses me is that there are loads
of users asking the root to install some Perl modules taht they want to
use...


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


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

Date: Fri, 05 May 2000 11:51:57 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl 5.6 stable??
Message-Id: <3912b510.250128@news.skynet.be>

bryan@NoSpam.panix.com wrote:

>I known this is considered a stable and Production release, but since I don't
>known when it was released - is a 5.6.1 coming anytime soon?  I have a feeling
>the answer will be go with 5.6.

It was released a few weeks ago. <www.perl.com> says it is stable. (See
top line of text in home page.) Well, I've read that they have worked
around 2 years on this, so I would hope it is stable.

The only problem you can have is, especially (only?) when using
Activestate Perl on Windows, that not all modules available for 5.005
have already been ported to 5.6.

-- 
	Bart.


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

Date: Fri, 05 May 2000 12:36:52 GMT
From: Dick Latshaw <latsharj@my-deja.com>
Subject: Re: Perl 5.6 stable??
Message-Id: <8euf92$ms5$1@nnrp1.deja.com>

In article <8etbgl$5ik$2@news.panix.com>,
  bryan@NoSpam.panix.com wrote:
> I known this is considered a stable and Production release, but since
> I don't know when it was released.

Depends on your definition of stability. Have a look at
bugs.activestate.com for the current 'issues'.
--
Regards,
Dick


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


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

Date: Fri, 05 May 2000 11:35:25 GMT
From: Jacco Bruins Slot <jaccobs@home.nl>
Subject: perlcc Perl -> C
Message-Id: <3912B1EC.168DC338@home.nl>

when i compile a simple program like hello world to C
perlcc works fine, how ever a more complex program witch uses modules
i get mutch errors. take a look at the following (from the book)
example:

#!/usr/bin/perl

use IO::Socket;

$sock = new IO::Socket::INET(LocalHost => 'localhost',
                             LocalPort => '2345',
                             Proto     => 'tcp',
                             Listen    => 5,
                             Reuse     => 1
                             );
die "Socket could not be created. Reason: $!" unless $sock;

while($new_sock = $sock->accept())
{
        while(defined($buf = <$new_sock>))
        {
                print "$buf\n";
        }
}
close($sock);

-------------- END -------------------

perl -MO=C server.pl >server.c    results in the following errors:
server.pl syntax OK
No definition for sub Socket::SO_DONTROUTE
No definition for sub Socket::SO_DONTROUTE (unable to autoload)
No definition for sub Socket::AF_DATAKIT
No definition for sub Socket::AF_DATAKIT (unable to autoload)
No definition for sub Socket::SO_RCVTIMEO
No definition for sub Socket::SO_RCVTIMEO (unable to autoload)
No definition for sub Socket::AF_UNSPEC
No definition for sub Socket::AF_UNSPEC (unable to autoload)
No definition for sub Socket::SOL_SOCKET
No definition for sub Socket::SOL_SOCKET (unable to autoload)
No definition for sub Socket::MSG_MAXIOVLEN
No definition for sub Socket::MSG_MAXIOVLEN (unable to autoload)
No definition for sub Socket::SO_OOBINLINE
No definition for sub Socket::SO_OOBINLINE (unable to autoload)
No definition for sub Socket::PF_NIT

And the list goes on

Can anyone help ?

[Jacco]


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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


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


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