[18264] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 432 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 7 03:05:46 2001

Date: Wed, 7 Mar 2001 00:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983952313-v10-i432@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 7 Mar 2001     Volume: 10 Number: 432

Today's topics:
        (Linux beginner) How to de-install and re-install Perl  <garry@heaton6.freeserve.co.uk>
    Re: (Linux beginner) How to de-install and re-install P (Gwyn Judd)
        DES Encrypting problems using Crypt::DES <david-news@trumpet.com.au>
        difference between <> and <ARGV> <johnlin@chttl.com.tw>
    Re: flock and close   with  empty read strangeness (Ilya Zakharevich)
    Re: Glob & long directory names <Jonathan.L.Ericson@jpl.nasa.gov>
    Re: HELP needed: using regular expressions (regex; rege <godzilla@stomp.stomp.tokyo>
        HELP needed: using regular expressions (regex; regexp)  <ekliao@pacbell.net>
    Re: HELP needed: using regular expressions (regex; rege (Tad McClellan)
    Re: HELP needed: using regular expressions (regex; rege <ekliao@pacbell.net>
    Re: HELP needed: using regular expressions (regex; rege <ekliao@pacbell.net>
    Re: How to set cookies? <gtoomey@usa.net>
        is there a better way ? <perler@MailAndNews.com>
    Re: is there a better way ? <jonni@ifm.liu.se>
        Newbie: How do I count something in a file <petr.zemanek@ff.cuni.cz>
    Re: Newbie: How do I count something in a file <godzilla@stomp.stomp.tokyo>
    Re: Perl for System V <gavin@nospam.com>
        PostgreSQL vs MySQL <acline@okstateerasecaps.edu>
    Re: PostgreSQL vs MySQL <bowman@montana.com>
    Re: PostgreSQL vs MySQL <Jonathan.L.Ericson@jpl.nasa.gov>
        Setting cookies in header to pass to Web Server? <jkit@jpmorgan.com>
    Re: Setting cookies in header to pass to Web Server? (Rafael Garcia-Suarez)
        Some keys don't work in debugger <dimitrio@perlnow.com>
    Re: statement for(list); (Randal L. Schwartz)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 6 Mar 2001 22:35:24 -0000
From: "Garry Heaton" <garry@heaton6.freeserve.co.uk>
Subject: (Linux beginner) How to de-install and re-install Perl on Linux
Message-Id: <983on8$esj$1@news7.svr.pol.co.uk>

I'm new to Linux/Unix and want to remove the default Perl installation, then
re-install from source code because I read somewhere that the Perl libraries
on some Linux distributions are incomplete. How do I remove and re-install?

Garry Heaton




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

Date: Wed, 07 Mar 2001 05:53:05 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: (Linux beginner) How to de-install and re-install Perl on Linux
Message-Id: <slrn9abj60.6j2.tjla@thislove.dyndns.org>

I was shocked! How could Garry Heaton <garry@heaton6.freeserve.co.uk>
say such a terrible thing:
>I'm new to Linux/Unix and want to remove the default Perl installation, then
>re-install from source code because I read somewhere that the Perl libraries
>on some Linux distributions are incomplete. How do I remove and re-install?

That depends on how it was installed in the first place. You might want
to ask in a linux specific group.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
: But for some things, Perl just isn't the optimal choice.

(yet)   :-)
             -- Larry Wall in <199702221943.LAA20388@wall.org>


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

Date: Wed, 7 Mar 2001 16:01:08 +1100
From: "Dave Lacey" <david-news@trumpet.com.au>
Subject: DES Encrypting problems using Crypt::DES
Message-Id: <984ffq$9dn$1@jazz-1.trumpet.com.au>

 Please can someone help me with this one - it is driving me crazy!!
I am pretty much a total novice with perl, and I'm having real trouble
getting the same results from a DES encrypt/decrypt process in both
Perl, and another one I use from a Delphi component.

 I'm sure this is because the Starting Variable is different (SV), but I
don't know how to specify one using in the Perl module, using:

 my $cipher = new Crypt::DES $key
 my $cipher = new Crypt::DES $key;
 my $ciphertext = $cipher->encrypt($plaintext);
 my $plaintext = $cipher->decrypt($ciphertext);

 This gets the same result each time, so the SV is obviously not generated
randomly. However I don't know how to find out what the SV is, or how
to change it!

 Any help would be GRATEFULL received ... thanks,
 Dave




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

Date: Wed, 7 Mar 2001 15:25:03 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: difference between <> and <ARGV>
Message-Id: <984nm2$pk2@netnews.hinet.net>

Dear all,

Is there any difference between <> and <ARGV>?

If they are equivalent,
in what situation will you write <ARGV> instead of <>?

Thank you.

John Lin


P.S.  This question is aroused from a bug in my program
which processes input from @ARGV

    while(<>) { print }

It will hang there to wait for STDIN inputs when @ARGV is empty.
I just want @ARGV not STDIN, so I cutesily modified it into

    while(<ARGV>) { print }

thinking that ARGV is only related to @ARGV, not STDIN.

But after another bug report and looking up 'perlop',
I see I was wrong.





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

Date: 7 Mar 2001 05:15:56 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: flock and close   with  empty read strangeness
Message-Id: <984g6c$45f$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to ZepHead 
<groovyt@erols.com>],
who wrote in article <groovyt-0CE37A.21074506032001@virt-reader.news.rcn.net>:
>  >How can the second admin see the changes
> > done by the first one *before* these changes are made? 
> 
> they are made to cache (until a write can get a lock to flush)
> If you read earlier posts I'm comparing greedy system to non greedy
> as well.

I did.  Never was it said (or maybe I missed it?) that flock() would
actually succeed immediately, and the writes would go through (and
close() would succeed immediately too?), but the "old" processes who
opened file for exclusive read would not see the changes - and "new"
processes will.

This looks like a substance abuser dream...  But maybe it makes some
sense, need to sit over it longer...

Ilya


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

Date: 07 Mar 2001 05:01:55 +0000
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Glob & long directory names
Message-Id: <868zmif9z0.fsf@jon_ericson.jpl.nasa.gov>

"Mac" <a.mcintosh@lilly.nospam.com> writes:

> I have a
> 'use file::glob'
> declaration and when using
> @files = glob("*.*")
> I get an array of all the file names - no name length limit - but I only get
> folder names that are 8.3 or less in length.
> If I glob("/123456789/*.*") I get the contents of *that* folder - excepting
> any folders with long names ...

According to the 5.6.0 perldelta, glob is implemented in terms of
File::Glob (case _does_ matter) anyway.  According to the File::Glob
pod, File::DosGlob is in the Perl core (though I'm not sure what it's
good for).  The File::DosGlob pod gives this example:

  glob('c:/Program\ Files/*/*.dll')

I think showing real code with input and output might help.  (I use
cygwin on my Win32 machine, so I don't have that problem here.)

Jon


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

Date: Tue, 06 Mar 2001 20:34:49 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: HELP needed: using regular expressions (regex; regexp) or  Parse::RecDescent to isolate Java/C++ statements
Message-Id: <3AA5BA69.1C5F3E34@stomp.stomp.tokyo>

Eric Liao wrote:

(snipped)

> I'll follow up by posting my code later.

Is there a problem you cannot post your current
code you are using to accomplish your task?
You live in the Watergate apartment complex
in Washington D.C. by chance?

Godzilla!


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

Date: 6 Mar 2001 20:05:11 -0600
From: Eric Liao <ekliao@pacbell.net>
Subject: HELP needed: using regular expressions (regex; regexp) or Parse::RecDescent to isolate Java/C++ statements
Message-Id: <et3bat0na7o5q8khda3t4oihivmhenmlcf@4ax.com>

Problem:
Given any valid Java (or c++) source code file, I need to separate it
into an array of statements.  The delimiters used are:

	a left curly brace: /\{/
or	a semicolon followed by a right curly brace: /;\s+\}/
or	a semicolon: /;/
or	a right curly brace, not preceded by a semicolon: /\}/

A statement can be several lines, such as:

	methodA("string1" +
		methodB + "string2");

The difficulty is, these four delimiters can appear in the statement
as characters or inside doublequoted strings and should not be treated
as delimiters:

	char a = '}';
	String b = "this is a semicolon => ; ";

Also, the semicolon can appear in for loop and should not be treated
as delimiter:

	for (exp1; exp2; exp3) { statement(s) }

I have tried either a regexp-only approach or a Parse::RecDescent
approach, but neither was error-free for me.  There must be subtle
bugs in my code, but for a start, I'd like to ask a top-level
question: can a problem of such nature be solved entirely by regular
expressions?  Which is a better approach?  Does a solution already
exist somewhere?

Any input is greatly appreciated.  I'll follow up by posting my code
later.

Thank you,
Eric



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

Date: Tue, 6 Mar 2001 21:05:11 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: HELP needed: using regular expressions (regex; regexp) or Parse::RecDescent to isolate Java/C++ statements
Message-Id: <slrn9ab5qm.8uk.tadmc@tadmc26.august.net>

Eric Liao <ekliao@pacbell.net> wrote:
>Problem:
>Given any valid Java (or c++) source code file, I need to separate it
>into an array of statements.  


You want to parse Java (or C++) code.


>The delimiters used are:
>
>	a left curly brace: /\{/
>or	a semicolon followed by a right curly brace: /;\s+\}/
>or	a semicolon: /;/
>or	a right curly brace, not preceded by a semicolon: /\}/


How have you arrived at your conclusion that those are the
(presumed only?) "delimiters"?


>A statement can be several lines, such as:
>
>	methodA("string1" +
>		methodB + "string2");


No problem (with an appropriate grammar).


>The difficulty is, these four delimiters can appear in the statement
>as characters 


I don't know what "as characters" means there.


>or inside doublequoted strings and should not be treated
>as delimiters:


No problem (with an appropriate grammar).


>Also, the semicolon can appear in for loop and should not be treated
>as delimiter:
>
>	for (exp1; exp2; exp3) { statement(s) }


You have found a few of the productions yourself through inspection.

But there are very likely others that you have missed.


>I have tried either a regexp-only approach 


Give up on that idea.


>or a Parse::RecDescent
>approach, 


The grammar is the thing. You need to know the grammar of a language
to write a parser for the language.


>but neither was error-free for me.  There must be subtle
>bugs in my code, 


That has never happened to me. You have my sympathy. heh.


>but for a start, I'd like to ask a top-level
>question: can a problem of such nature be solved entirely by regular
>expressions?  


You could perhaps make it happen with experimental _Perl_ 
regular expression features, but it would be in the
"ugly to horrid" range IMO.


>Which is a better approach?  


Use a real parser. Regexes aren't going to get you there.


>Does a solution already
>exist somewhere?


What you want is what needs to be done in the early stages of
compiling Java (or C++) code. Find an open source compiler and
see how they did it.

Or find a published grammar for the language and adapt it to use
rec descent or yacc modules.


>Any input is greatly appreciated.  I'll follow up by posting my code
>later.


I counsel rethinking your approach.

How "bullet proof" must your solution be?

Pattern matching will be a rickety house of cards no matter how
you slice it.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 6 Mar 2001 22:14:14 -0600
From: Eric Liao <ekliao@pacbell.net>
Subject: Re: HELP needed: using regular expressions (regex; regexp) or Parse::RecDescent to isolate Java/C++ statements
Message-Id: <5jcbat4le3t845thla6fic593vo0daq5nf@4ax.com>

Tad,

I have actually translated a java grammar from one metalanguage (for
ANTLR, from antlr.org) to one that is good for parse::recdescent.  but
I am just about to abort that effort because I think it is overkill
for my application.  it has taken me too much time to get the grammar
right.  and it's still buggy.  all i wanted was to analyze statements
that contain concatenated, doublequoted strings.  i don't need to know
why types of statements they are.  that's why i'm opting for the
short-cut regular expression solution.

>
>How "bullet proof" must your solution be?

i want the regular expression approach to be correct, meaning
satisfying all the requirements.  it either works or does not work.
there's no gray area.

the four types of delimiters are my own choices and they are good for
the application.




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

Date: 6 Mar 2001 22:48:06 -0600
From: Eric Liao <ekliao@pacbell.net>
Subject: Re: HELP needed: using regular expressions (regex; regexp) or Parse::RecDescent to isolate Java/C++ statements
Message-Id: <p2fbatognc8g5qqpu36h1cchr5ltbt06hd@4ax.com>

No there is no problem. I just need to organize it a bit.

On Tue, 06 Mar 2001 20:34:49 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:

>Eric Liao wrote:
>
>(snipped)
>
>> I'll follow up by posting my code later.
>
>Is there a problem you cannot post your current
>code you are using to accomplish your task?
>You live in the Watergate apartment complex
>in Washington D.C. by chance?
>
>Godzilla!



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

Date: Wed, 7 Mar 2001 12:56:34 +1000
From: "Gregory Toomey" <gtoomey@usa.net>
Subject: Re: How to set cookies?
Message-Id: <5ghp6.9717$v5.39808@newsfeeds.bigpond.com>

Here's my answer...

The following code fragments get web page and store/send a cookie!!
You can use this code to emulate what a browser.


1. Open a Web page and store a cookie in a file.

use LWP::UserAgent;
use HTTP::Cookies;

      $ua = new LWP::UserAgent;
      $ua->agent("$0/0.1 " . $ua->agent);
      $ua->timeout(30);
       $req = new HTTP::Request 'GET' => 'http://www.somesite.com';  #change
as apprporiate
      $req->header('Accept' => 'text/html');
      $res = $ua->request($req);

      if ($res->is_success) {
              $cookie_jar = new HTTP::Cookies( ignore_discard =>TRUE);
              $cookie_jar->extract_cookies($res);
               $cookie_jar->save('/usr/local/cookie_jar);   #change as
appropriate
                #web page is now in the variable$res
}

2. Open a Web page and send the stored cookie

                $ua = new LWP::UserAgent;
                $ua->agent("$0/0.1 " . $ua->agent);
                $ua->timeout(30);
                $req = new HTTP::Request 'GET' =>
'http://www.somesite.com/';
               $req = new HTTP::Request 'GET' =>
'http://www.somesite.com/somepage.htm';  #change as apprporiate


                $req->header('Accept' => 'text/html');
                $cookie_jar = new HTTP::Cookies( ignore_discard =>TRUE);
                $cookie_jar->load('/usr/local/cookie_jar') #change as
appropriate
                $cookie_jar->add_cookie_header($req);
                $res = $ua->request($req);

                if ($res->is_success) {
                #web page is now in the variable $res
                }

gtoomey

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

"Scott Heaney" <sheaney@ntscdallas.com> wrote in message
news:C9DF6105C11AC6AA.AB18A13B0A83AD7C.FDA956F366A5868F@lp.airnews.net...
> Hey all ->
>
> I'm having trouble trying to figure out how to set, retrieve, and use
> cookies using the CGI mod.  Any help is appreciated!
>
> Thanks,
> Scott
>
>




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

Date: Wed, 7 Mar 2001 01:20:55 -0500
From: Ralph Osle <perler@MailAndNews.com>
Subject: is there a better way ?
Message-Id: <3AA7F2C4@MailAndNews.com>

# given a text with records...
# ...
my $text = <<'EOF';
To : John
From : Tom
Subject : Hello

To : Edgar
From : Raven
Subject : NeverMore

To : Newbie
From : Larry
Subject : TMTOWTDI
EOF
# ...

# and a regex 
my $regex = 'To : (\w+)\s+From : (\w+)\s+Subject : (\w+)';

# i want to extract fields To,From,Subject by iterating
# the regex (\g) over $text and get records in a bidimensional array like
# @records = ( 
['John','Tom','Hello'],['Edgar','Raven','NeverMore'],['Newbie','Larry','TMTO
WT
DI'])

# sub should accept a regex and a text as params
# that is : number of fields per record is unknown until run-time

# it seems perl 's missing a token for the array ($1,$2,$3, ... , $+) after 
a 
match occurs
# is there a better way than simulate missing array by eval? tnx anyways

my @recs = extract($regex,$text);

foreach (@recs) { print "To : $_->[0] , From : $_->[1] , Subject : 
$_->[2]\n" 
}

sub extract {
	my ($regex,$text) = @_;

	# quick & lame way to get number of fields per record,
	# but it doesnt really matter here
	$fields_per_rec = $regex =~ tr/(//;

	# simulate missing array as string to eval.
	# e.g. $fields_per_rec = 4 --> $missing = '$1,$2,$3,$+'
	my $missing;
	for (1..$fields_per_rec-1) { $missing .= "\$$_," }
	$missing .= '$+';

	my @records = ();
	while ($text =~ /$regex/g) {
		# would be push @records, [$1, $2, .. $+];
		push @records , eval "[$missing]"
	}
	return @records
}

------------------------------------------------------------
 Get your FREE web-based e-mail and newsgroup access at:
                http://MailAndNews.com

 Create a new mailbox, or access your existing IMAP4 or
 POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------



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

Date: Wed, 7 Mar 2001 09:04:03 +0100
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Re: is there a better way ?
Message-Id: <984pv5$97t$1@newsy.ifm.liu.se>

> sub extract {
> my ($regex,$text) = @_;
>
> # quick & lame way to get number of fields per record,
> # but it doesnt really matter here
> $fields_per_rec = $regex =~ tr/(//;
>
> # simulate missing array as string to eval.
> # e.g. $fields_per_rec = 4 --> $missing = '$1,$2,$3,$+'
> my $missing;
> for (1..$fields_per_rec-1) { $missing .= "\$$_," }
> $missing .= '$+';
>
> my @records = ();
> while ($text =~ /$regex/g) {
> # would be push @records, [$1, $2, .. $+];
> push @records , eval "[$missing]"
> }
> return @records
> }

Something like this would work without eval
sub extract {
my ($regex,$text) = @_;

my @records = ();
my @record;
while (@record=$text=~m/$regex(.*)/s) {
 $text=pop @record;
 push @records , [@record];
}
return @records
}


--
 _____________________     _____________________
|   Jonas Nilsson     |   |                     |
|Linkoping University |   |      Telephone      |
|       IFM           |   |      ---------      |
| Dept. of Chemistry  |   | work: +46-13-285690 |
|  581 83 Linkoping   |   | fax:  +46-13-281399 |
|      Sweden         |   | home: +46-13-130294 |
|_____________________|   |_____________________|
> ------------------------------------------------------------
>  Get your FREE web-based e-mail and newsgroup access at:
>                 http://MailAndNews.com
>
>  Create a new mailbox, or access your existing IMAP4 or
>  POP3 mailbox from anywhere with just a web browser.
> ------------------------------------------------------------
>




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

Date: Mon, 05 Mar 2001 16:35:14 +0100
From: petr zemanek <petr.zemanek@ff.cuni.cz>
Subject: Newbie: How do I count something in a file
Message-Id: <3AA3B232.8040104@ff.cuni.cz>

Hi, everybody,

what I need is a script that would count instances of a string
in a file. It should look up for just the string, in this case
it is numerals.

The input file looks like this:
113    big
1    extraordinary
51    fine
etc. (the divider is a tab).

I need to count how many instances of words occurring e.g. once (and
just once) are in the file.

I wrote a script, but it is obviously not doing what I need (although
it does not report any problems). The resulting number I get is "1",
which is certainly wrong (it should give biiig numbers). Can anybody 
help me?

Thanks a lot in advance.

Petr Zemanek

----------------------------------
Here is the script:


#!/usr/local/bin/perl
#
##################
# definition on what is being counted - in this case it's numerals
# 1, but exactly this one, i.e. not number 100, 1000, 91, etc.

$one = (1);

############################
# open file and read its contents to an array (@words)

open FILE, 'file.txt';
@words = FILE;
close FILE;

#############################
# counting of occurrences of numeral 1 ($one).

foreach $one(@words){
   $count_one{$one}++;
   $count_one++;
   };    # end of this "foreach" cycle.


####################
# printing

print $count_one, "\n";

# END of this script.



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

Date: Tue, 06 Mar 2001 22:02:58 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Newbie: How do I count something in a file
Message-Id: <3AA5CF12.1CB608F7@stomp.stomp.tokyo>

petr zemanek wrote:

(snippage)

> ...count instances of a string
> ...it is numerals.
> ...count how many instances of words
> ...instances of words occurring...once and just once
> ...The resulting number I get is "1",
> ...it should give biiig numbers


There are many here to assist you. However,
you need to decide what you want to do. Look
over your words and you will notice absolute
inconsistency in your statements. It is clear
you are exceptionally confused and truly do
not know what is your goal. Work on mental
clarity, then consider posting again, in a
clear and concise manner.

Godzilla!


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

Date: Wed, 7 Mar 2001 13:07:08 +1100
From: "Gavin Cato" <gavin@nospam.com>
Subject: Re: Perl for System V
Message-Id: <pJgp6.10$jz.452726@news.interact.net.au>

Well have you even tried to read the README files etc.. inside the tarball?

They explain pretty clearly how to install it, not that it's rocket science
or anything.

Gav




"Garrett Groff" <groffg@gmgdesign.com> wrote in message
news:983mm2$2s5$1@zrtph05m.us.nortel.com...
> I need to install Perl on System V.  I'd like to use the source, but I
> downloaded one compressed source file, containing dozens upon dozens of
> files. Is this really going to compile???  How should I compile it?  g++
*.c
> I'm dubious that that is going to work w/o time-consuming revisions to the
> source.  Can anyone HELP?!
>
> regards,
> Garrett
>
>




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

Date: Tue, 06 Mar 2001 21:15:37 +0500
From: "Aaron Cline" <acline@okstateerasecaps.edu>
Subject: PostgreSQL vs MySQL
Message-Id: <2Fhp6.226$Rx.2798@news.onenet.net>

Ok, I'm going to do it.  

/me opens pandora's box.

I getting into using perl with a database program.  I was leaning towards
Postgres, but now that I have read some things about MySQL I am leaning
that way as well.  It probably doesn't really matter.  

My database will probably have about 4 to 5 tables.  I'm not very SQL
knowledgable as of yet, so I can't describe it any better.  I just don't
want to get started in one database when I should have gotten started in
another.  

A few key concerns:

	1.  Ease of importing backup and replacement databases into an existing
setup.  
	2.  Possible to backup to a remote server?
	3.  Perl's ease of integration (as far as I know this is about the same
for both database's because of DBI).
	4.  Searching many thousands of entries.  Speaking in terms of
spreadsheets, the tables will be few columns, but many rows.

Most important.
	5.  # of users who will help me when I get stuck :)

Thanks for any input.

Aaron Cline


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

Date: Tue, 6 Mar 2001 20:14:36 -0700
From: "bowman" <bowman@montana.com>
Subject: Re: PostgreSQL vs MySQL
Message-Id: <OKip6.1176$646.5522@newsfeed.slurp.net>


Aaron Cline <acline@okstateerasecaps.edu> wrote in message
news:2Fhp6.226$Rx.2798@news.onenet.net...
>
> I getting into using perl with a database program.  I was leaning towards
> Postgres, but now that I have read some things about MySQL I am leaning
> that way as well.  It probably doesn't really matter.

No, it really doesn't. I have a little PerlTk thing to look up nutritional
data from the USDA database, and depending on the phase of the moon, I've
loaded the data into MySql, Postgres, and Db2 with no trouble.

Postgres has come a long way, and would be my choice, unless you've found
one of the Db2 CD's in a box of cereal or wherever. It has speeded up
considerably. Unless you are going into a production environment, the little
quirks of which supports left outer joins or transactions probably is
meaningless.

the DBI/DBD is the greatest thing since sliced bread, compared to doing CLI
or embedded SQL in C.






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

Date: 07 Mar 2001 04:38:23 +0000
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: PostgreSQL vs MySQL
Message-Id: <86d7bufb28.fsf@jon_ericson.jpl.nasa.gov>

"Aaron Cline" <acline@okstateerasecaps.edu> writes:

> 	3.  Perl's ease of integration (as far as I know this is about the same
> for both database's because of DBI).

Yep, and this is the only part of this post that is on-topic.

Jon


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

Date: Mon, 05 Mar 2001 14:05:17 -0500
From: John Kit <jkit@jpmorgan.com>
Subject: Setting cookies in header to pass to Web Server?
Message-Id: <3AA3E36D.2D3E32D6@jpmorgan.com>

Can anyone point me to some info on setting cookie header in
my sudo brower.pl application to pass to a web server.  I am trying
to retrieve a html page from a web server which needs to 
retrieve a cookie from my browser.pl.  How do I do this?

Thanks ahead of time.

John


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

Date: Wed, 07 Mar 2001 07:24:24 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Setting cookies in header to pass to Web Server?
Message-Id: <slrn9abogr.rva.rgarciasuarez@rafael.kazibao.net>

John Kit wrote in comp.lang.perl.misc:
> Can anyone point me to some info on setting cookie header in
> my sudo brower.pl application to pass to a web server.  I am trying
> to retrieve a html page from a web server which needs to 
> retrieve a cookie from my browser.pl.  How do I do this?

Use the LWP::UserAgent class (from the libwww bundle, get it from CPAN).
The man page for LWP::UserAgent explains how to construct an
HTTP request object and how to use it to retrieve a document from a web
server. Just add a Cookie: header in your request with the relevant
cookie info.

-- 
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Tue, 6 Mar 2001 21:32:24 -0500
From: Dimitri Ostapenko <dimitrio@perlnow.com>
Subject: Some keys don't work in debugger
Message-Id: <%4hp6.6484$a61.146325567@news1.mountaincable.net>

Arrow keys don't work in debugger  in latest Mandrake or debian and I can't 
figure why.  I tried different TERM settings to no avail. Would it be 8 bit 
support? 

Can anybody help?

tx
-- 
Dimitri Ostapenko
dimirio@perlnow.com



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

Date: 06 Mar 2001 18:22:15 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: statement for(list);
Message-Id: <m1vgpm2u94.fsf@halfdome.holdit.com>

>>>>> "Martien" == Martien Verbruggen <mgjv@tradingpost.com.au> writes:

Martien> I just read Abigail's post containing some quotes from Larry. This one
Martien> seemed appropraite at this point in the discussion:

Martien> But the possibility of abuse may be a good reason for leaving
Martien> capabilities out of other computer languages, it's not a good reason
Martien> for leaving capabilities out of Perl.
Martien>                        [Larry Wall in `Macros'. {perl5-porters}
Martien>                        <199709251614.JAA15718@wall.org> 25 Sep 1997]

Martien> I happen to agree more with this quote, than with the statement your
Martien> refer to. It's also more recent.

No, he's also fairly recently said something like "Just because
we provide more than one way to do something doesn't mean we have
to add a tenth and eleventh way".  And I think that would supercede
the quote above, because the quote above is about adding the first
or second way. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

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 V10 Issue 432
**************************************


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