[10530] in Perl-Users-Digest
Perl-Users Digest, Issue: 4122 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 1 02:07:16 1998
Date: Sat, 31 Oct 98 23:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 31 Oct 1998 Volume: 8 Number: 4122
Today's topics:
Compare 2 files <webmaster@ouweb.com>
Re: CPAN module <shulman@caltech.edu>
Re: CPAN module <ljz@asfast.com>
Re: flock in IIS4.0 <gellyfish@btinternet.com>
Re: FTP from Win32 helphand@pacbell.net
Re: Function Parameters? (Ronald J Kimball)
Re: Function Parameters? (Michael Rubenstein)
Re: Function Parameters? (David Alan Black)
Re: help a poor student dturley@pobox.com
Re: help a poor student (David Alan Black)
How does one sort associative array numerically? (Loans2001)
Re: How does one sort associative array numerically? <nick@perlfect.com>
Re: How to tell if a file is already open without flock <gellyfish@btinternet.com>
Re: Perl for the mainframe? <gellyfish@btinternet.com>
Re: Recovering from aborted script <gellyfish@btinternet.com>
Re: Size of JPEG and GIF (Larry Rosler)
socket: client question--help. <sam.berman@att.com>
Stop a child process <mm93064@central.ntua.gr>
test <webmaster@ouweb.com>
Re: test (Alastair)
Re: Testing Perlscript at home <gellyfish@btinternet.com>
Trouble with DBI::Pg module on linux <aaron@soltec.net>
uninstalling modules <aravind@genome.wi.mit.edu>
Re: What's with these Curly brackets??? (Bart Lateur)
Re: What's with these Curly brackets??? (John Hardy)
Re: Why is junk being appended to my saved data file? <bill@fccj.org>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 31 Oct 1998 15:43:48 PST
From: "Simon B." <webmaster@ouweb.com>
Subject: Compare 2 files
Message-Id: <71g7bk$bc8@journal.concentric.net>
Hello, I need a CGI perl script that can compare 2 files and if it find
duplicate entries in one of the two files than it delete one line in one of
the database...
Please answer me...
Thank you for your support
------------------------------
Date: Sat, 31 Oct 1998 18:03:26 -0800
From: Michael Shulman <shulman@caltech.edu>
Subject: Re: CPAN module
Message-Id: <363BC16E.F04B9BD9@caltech.edu>
Alastair wrote:
> I'm not sure about NT but this has the hallmarks of being a lockfile issue. I
> have a '.cpan' directory (unix) in my home directory that has a file called
> 'lock' in it when the CPAN module's active. Try removing it.
Hey, cool! It worked! Thanks!
--
________________________________________________________________________
| \/|R|TR|LB|/\ | QOTD: "Half of the people in the world are |
| Michael Shulman | below average." |
| shulman@caltech.edu | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 01 Nov 1998 01:14:51 -500
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: CPAN module
Message-Id: <lt4ssklz1g.fsf@asfast.com>
Michael Shulman <shulman@caltech.edu> writes:
> Okay, now I have another problem. Whenever I try to install something, I
> get the error message:
> Makefile:698: *** missing separator. Stop.
> And from that point on nothing works. Can anyone tell me what to do?
> Thanks.
The `make' program is rather picky about the use of spaces versus tabs
in Makefiles. My guess is that there are spaces on line 698 of the
Makefile where there should be one or more tabs. If this line is
indented, change the leading whitespace to one or more tabs and try
again. There's a very good chance that this will fix your problem.
--
Lloyd Zusman ljz@asfast.com
perl -le '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x"'
------------------------------
Date: 1 Nov 1998 00:44:06 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: flock in IIS4.0
Message-Id: <71gasm$11n$1@gellyfish.btinternet.com>
On Sun, 25 Oct 1998 08:02:49 GMT rk27@my-dejanews.com wrote:
>
>
> hi,
>
> Is there anyway to implement the flock function in win32 perl on IIS 4.0?
>
> What I want to do is to lock a file, open the file, edit the contents of the
> file, close the file and then release the lock.
>
flock does work with Perl for Win32 on NT which is implied by your iis4 -
it doesnt however work on '95.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 01 Nov 1998 00:48:37 GMT
From: helphand@pacbell.net
Subject: Re: FTP from Win32
Message-Id: <363ba98a.2156047103@news.pacbell.net>
On Fri, 30 Oct 1998 12:36:32 -0500, Tom McGee <tmcgee@bondmarkets.com>
wrote: [courtesy copy emailed]
>
>It's my understanding (and experience) that Net::FTP doesn't work on
>Win32; has anyone been able to come up something that does?
>
I'm using 5.004, the GS port (Win95), and my experience is that
Net::FTP works under some setups and not under others. I can get it
flawlessly working on machines on my LAN when the machine's only
networking connection is that single LAN connection. (I did have to
setup a \windows\hosts file - use the hosts.sam file as a sample).
I cannot get it working on a machine that has multiple connections,
in particular a dailout one with a fixed IP number and DNS server
specified. In this configuration, Net::FTP falls apart on any get,
put, or dir command (but it does open and login ok) ... it takes a
ridiculous amount of time to return any results, to the point that I
thought it was hung.. but I left it running one time and discovered it
actually does eventually complete.
Neither setup involves firewalls, results are the same if I set
passive mode. I experimented targeting two different ftp servers,
one Win95 based the other on a Dec Alpha running VMS, results are
identical so the problem doesn't seem to be related to the server. I
can access either server quite nicely using the ftp.exe program
included with Win95.
I don't quite grok what's going on, but I suspect that the real
problem is a win95 one related to a specific type of network
configuration. My solution was to give up and move the application to
a machine that had only a single, simple network connection.
HTH,
Scott
--------
Delta Performance Group, "Achieving the Competitive Edge"
http://www.deltagrp.com/
------------------------------
Date: Sat, 31 Oct 1998 18:44:24 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Function Parameters?
Message-Id: <1dhs0ot.16y3qo1yabtnmN@bos-ip-1-56.ziplink.net>
Ricardo Dague <trikiw@hotmail.com> wrote:
> What's the best
> way to make function parameters? Like this?
>
> sub Something
> {
> my($n,$i,$j) = @_;
> . . .
> }
> Something(12);
>
> Where $n is the "real" parameter and $i and $j are local
> vars.
You should only put the variables for the "real" parameters in the
assignment from @_. Otherwise, the local variables look like parameters
too.
I like this way:
sub Something {
my($n) = @_;
my($i, $j);
. . .
}
Something(12);
Some people prefer this way:
sub Something {
my $n = $_[0];
my($i, $j);
. . .
}
Something(12);
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 01 Nov 1998 03:13:58 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Function Parameters?
Message-Id: <363dc885.262451965@nntp.ix.netcom.com>
On 31 Oct 1998 21:24:30 -0500, dblack@pilot.njin.net (David Alan
Black) wrote:
>miker3@ix.netcom.com (Michael Rubenstein) writes:
>
>>On Sat, 31 Oct 1998 22:21:23 GMT, Ricardo Dague <trikiw@hotmail.com>
>
>>You shouldn't use this construction with @_ when you don't intend the
>>variables to be assigned parameters. Don't use something like
>
>> my ($a, $i, $j) = @_;
>
>>to make $i and $j lexical. There's nothing wrong with this as far as
>>the language definition goes and the compiler/interpretter will be
>>happy, but the next person to look at your code probably won't be.
>>Instead use two (or more) statements:
>
>You might want to do something like my ($a, $i, $j) = @_, if the
>subroutine takes a variable number of arguments and you test them
>later (taking one action if only $a is initialized, different actions
>if $i and/or $j are).
In other words, you might want to do this if $i and $j are (possibly
missing) parameters. The question being asked was whether one wants
to use this construction to make $i and $j work variables; I answered
that question.
>
>> my ($a) = @_;
>> my ($i, $j);
>
>If you're initializing only one scalar from @_, it's better to shift,
>in part because parens around the one argument to my() are optional
>and might come and go.....
I mention below that shift may be used. However, I generally prefer
the form I gave since it is clearer when there is more than one
parameter. The three most important things in programming are
1. Consistency
2. CONSISTENCY!
III. consistency.
Furthermore, I generally prefer not to modify an array with shift when
my only purpose is to get the first element.
>
>>Remember @_ is an array. You may manipulate it like any other. In
>>particular, parameters may be accessed using subscripts (e.g., $_[0])
>>or may be removed from the array with shift or pop. I usually prefer
>>to assign them to lexical variables as I think it's clearer, but
>>that's for those reading the program not the language processor.
>
>
>There's another difference: if you manipulate the elements of @_
>itself, you are manipulating the original variables in the argument
>list. Thus:
>
[example elided]
Right. I felt that this was a bit advanced for an obvious beginner.
--
Michael M Rubenstein
------------------------------
Date: 31 Oct 1998 21:24:30 -0500
From: dblack@pilot.njin.net (David Alan Black)
Subject: Re: Function Parameters?
Message-Id: <71ggou$gv4$1@pilot.njin.net>
miker3@ix.netcom.com (Michael Rubenstein) writes:
>On Sat, 31 Oct 1998 22:21:23 GMT, Ricardo Dague <trikiw@hotmail.com>
>You shouldn't use this construction with @_ when you don't intend the
>variables to be assigned parameters. Don't use something like
> my ($a, $i, $j) = @_;
>to make $i and $j lexical. There's nothing wrong with this as far as
>the language definition goes and the compiler/interpretter will be
>happy, but the next person to look at your code probably won't be.
>Instead use two (or more) statements:
You might want to do something like my ($a, $i, $j) = @_, if the
subroutine takes a variable number of arguments and you test them
later (taking one action if only $a is initialized, different actions
if $i and/or $j are).
> my ($a) = @_;
> my ($i, $j);
If you're initializing only one scalar from @_, it's better to shift,
in part because parens around the one argument to my() are optional
and might come and go....
>Remember @_ is an array. You may manipulate it like any other. In
>particular, parameters may be accessed using subscripts (e.g., $_[0])
>or may be removed from the array with shift or pop. I usually prefer
>to assign them to lexical variables as I think it's clearer, but
>that's for those reading the program not the language processor.
There's another difference: if you manipulate the elements of @_
itself, you are manipulating the original variables in the argument
list. Thus:
#!/usr/local/bin/perl -w
sub change { $_[0] *= 10 };
sub retain { my $n = shift; $n *= 10 }
my ($x, $y) = (3,4);
print "x: $x\n";
print "Return value of change(\$x): ", change($x), "\n";
print "Changed \$x: $x\n";
print "y: $y\n";
print "Return value of retain(\$y): ", retain($y), "\n";
print "Retained \$y: $y\n";
__END__
Output:
x: 3
Return value of change($x): 30
Changed $x: 30
y: 4
Return value of retain($y): 40
Retained $y: 4
David Black
dblack@pilot.njin.net
------------------------------
Date: Sun, 01 Nov 1998 01:51:10 GMT
From: dturley@pobox.com
Subject: Re: help a poor student
Message-Id: <71geqe$mul$1@nnrp1.dejanews.com>
In article <71eo9l$jrn$1@merki.connect.com.au>,
"James Greenhalgh" <mghalgh@goulburn.net.au> wrote:
> We have to design a stupid text adventure in a language of our choice for
> school. I know bugger all about perl but I want to learn. It probably seems
> simple to anyone except a retard like me but what gives with this script?
> msg me at mghalgh@goulburn.net.au . And could the smart arse programmers who
> do it for a living please give the insults a miss.
Learn some manners and then if you ask nicely for help, even us "smart arse
programmers who do it for a living" might be willing to help you.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 31 Oct 1998 22:37:57 -0500
From: dblack@pilot.njin.net (David Alan Black)
Subject: Re: help a poor student
Message-Id: <71gl2l$h8o$1@pilot.njin.net>
Hello -
"James Greenhalgh" <mghalgh@goulburn.net.au> writes:
>We have to design a stupid text adventure in a language of our choice for
Well, you've sure done that....
>school. I know bugger all about perl but I want to learn. It probably seems
Your post supports the first half of that sentence, anyway.
>simple to anyone except a retard like me but what gives with this script?
You could make it a lot shorter:
while (<STDIN>) { print "what??" }
>msg me at mghalgh@goulburn.net.au . And could the smart arse programmers who
>do it for a living please give the insults a miss.
That's where you made your biggest mistake - I don't do it for a living.
David Black
dblack@pilot.njin.net
P.S. 'msg' you?
------------------------------
Date: 1 Nov 1998 00:57:58 GMT
From: loans2001@aol.com (Loans2001)
Subject: How does one sort associative array numerically?
Message-Id: <19981031195758.00102.00001904@ng-fc2.aol.com>
I wrote this program. I don't understand why when the file is read in via STDIN
why when it is printed out, it's not in any order. The file read in, Loans.htm
is a key and value of a loan size (e.g. 40,000) with a value being another
number like 4.3.
There is a second file with rates and rebates (eg. 7.25 as the key, and the
value for the key is 2.0) I use both these files together, though they could
probably be done better with one array.
ANyway, So I read in the loans.htm file: below:
40,000
6.4
50,000
6.2
60,000
5.0
70,000
3.0
80,000
2.5
90000
2.25
100000
2.0
110000
1.75
120000
1.5
and so on to 200000
and the rates.htm file:
7.25
1.75
7.125
1.5
7.0
1.25
6.875
1.0
The Html which gets printed, doesn't print the table from 40000 to 200000. It
comes out strange, with 40,000 nd 50,000 and the end. How do I sort the file to
print it correctly?
Here is the program:
#!/perl5
# read in the file
open(RATES, "rates.htm") || die "Cannot open Rates file!";
%ratefile = <RATES>;
open(LOANS, "loans.htm") || die "Cannot open Loans file!";
%loanfile = <LOANS>;
print "Content-type: text/html\n\n";
print "<HTML><HEAD>\n";
print "<TITLE>Mortgage Interest Rates & Pricing</TITLE></HEAD>\n";
print "<BODY><TABLE>\n";
# begin the loop
print "<TR><TD></TD>";
while (($rate,$rebate) = each(%ratefile)) {
chop ($rate);
print "<TD><B>$rate</B></TD>";
}
print "</TR>\n";
while (($loan, $loansize) = each(%loanfile)) {
print "<TD>$loan</TD>";
while (($rate,$rebate) = each(%ratefile)) {
$diff = $loansize-$rebate;
$cost = $loan * ($diff/100);
print "<TD>";
print int ($cost);
print "</TD>";
}
print "</TR>\n";
}
print "</table></body></html>";
while (($loan, $loansize) = each(%loanfile)) {
print "<TD>$loan</TD>";
print $loansize;
}
If anyone could shed some light on this, I'd really appreciate it. I tried the
Learning Perl book. I couldn't figure out how to sort it ascending by loan
amount.
Scot King
Coastal Mortgage
http://www.coastalmortgage.org
------------------------------
Date: Sun, 01 Nov 1998 08:28:22 +0000
From: Nick Moraitakis <nick@perlfect.com>
Subject: Re: How does one sort associative array numerically?
Message-Id: <363C1BA5.839B8DA5@perlfect.com>
--------------1255D182BC33B974D72A1F50
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hashes cannot be sorted, by their nature. If you want to diplay results by key or
by value and sort the key or value order, then have a look at
http://perlfect.com/articles/sorting.shtml
(I hope people her don't consider this url-spamming... it is a brief sorting
tutorial)
--
Nick Moraitakis
http://perlfect.com
--------------1255D182BC33B974D72A1F50
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
Hashes cannot be sorted, by their nature. If you want to diplay results
by key or by value and sort the key or value order, then have a look at
<A HREF="http://perlfect.com/articles/sorting.shtml">http://perlfect.com/articles/sorting.shtml</A>
<P>(I hope people her don't consider this url-spamming... it is a brief
sorting tutorial)
<BR>
<PRE>--
Nick Moraitakis
<A HREF="http://perlfect.com">http://perlfect.com</A></PRE>
</HTML>
--------------1255D182BC33B974D72A1F50--
------------------------------
Date: 1 Nov 1998 00:28:37 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: How to tell if a file is already open without flock()?
Message-Id: <71g9vl$11j$1@gellyfish.btinternet.com>
On Fri, 23 Oct 1998 10:45:43 -0400 Kevin Ternes <jkternes@domain-tech.com> wrote:
> Here's my environment:
>
> I've a Perl script that periodically scans a spooling area for
> new text files. If it finds any files, it moves them out of the
> spool to an archive and then does further processing on them.
>
> The files may be delivered to the spooling area by a number of
> methods. The delivering scripts we have written all open the
> files with an flock. And my scanning script will only attempt
> to move a spooled file if it can get an exclusive lock on it.
>
> The problem is that certain other delivery methods, like FTPD
> and RCPD, that feed the spool do not seem to put put locks on
> files they are writing.
>
> Does anyone know a means for determining if another process has
> a file open without making a system() call?
>
I would suggest that the simplest way would be to execute the 'fuser'
command with the backticks - I think that different systems will have
different ways to determine the openers of a file.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 31 Oct 1998 23:37:58 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Perl for the mainframe?
Message-Id: <71g70m$117$1@gellyfish.btinternet.com>
On Sat, 31 Oct 1998 03:34:49 GMT Ken Munro <ken.munro@ns.sympatico.ca> wrote:
> This may seem like an absurd question, but is there a port of the Perl
> interpreter for the OS390 MVS IBM mainframe?
>
> I've written a Perl script to process mainframe JCL. Can I run it on the
> mainframe itself, rather than having to do some intermediary file
> transfering?
>
Yep, it can be found on CPAN at www.perl.com/CPAN - but I dont know anything
else about it.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 31 Oct 1998 17:27:31 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Recovering from aborted script
Message-Id: <71fha3$sr$1@gellyfish.btinternet.com>
On Mon, 26 Oct 1998 11:43:38 -0800 Kevin Mattson <kmattson@qualcomm.com> wrote:
> How can I detect when a user has hit CNTRL-C or CNTRL-Break while a Perl
> script is running? I'd like to do some additional clean-up before the
> script exits.
>
> I'm using ActiveState's ActivePerl for Win32 (Build 502). Previously, I
> was using Build 316, which worked ok since it threw a "__DIE__" signal
> when the user hit CNTRL-C.
>
You need to trap the appropriate signal which in this case is SIGINT -
#!/usr/bin/perl
BEGIN {
$SIG{INT} = sub { print "bye now" ; exit};
}
while()
{
}
Works as expected on my system. You would probably want to reset the handler
once you have trapped your first INT lest an impatient user should hit Ctrl-C
more than once - you should also check out the Caveats on this subject in
the Perl documentation.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 31 Oct 1998 17:39:03 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Size of JPEG and GIF
Message-Id: <MPG.10a55b8f15538a269898f9@nntp.hpl.hp.com>
> On 30 Oct 1998, John Beppu wrote:
>
> > >I'm writing a small HTML generator in PERL, and wants to find out the size of
> > >GIF and JPEG images. So that I can write the HEIGHT= and WIDTH= options in
Half a dozen answers so far about various external commands; not one
about the Perl solution, which is fairly trivial: Look in CPAN for the
Image::Size module.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 31 Oct 1998 22:20:33 -0500
From: sam berman <sam.berman@att.com>
Subject: socket: client question--help.
Message-Id: <363BD380.5A7754BE@att.com>
Help from anyone would be appreciated.
From the perl camel book there is the following line
$iaddr = inet_aton($remote);
I tried $iaddr = inet_aton("www.yahoo.com");
and it fails. I can make it work for some local machines.
I don't know how this works internally. Does it matter if I am
behind
a firewall or ....
Running on Solaris 2.5.1, perl 5.004_004.
--
appreciatively,
sam
------------------------------
Date: Sun, 1 Nov 1998 04:43:54 +0200
From: "Manos" <mm93064@central.ntua.gr>
Subject: Stop a child process
Message-Id: <71ghmk$r4s$1@medousa.forthnet.gr>
Hi there,
i am new in Perl and i would like some help on this:
When i close a pipe with close() , it waits for the programm running on the
pipe to finish..
Is it possible with a Perl command, to stop the programm running on the
pipe after ,for example, a specific time limit?
If it is possible, what is this command and it's syntax ??
(plz give me an example..)
Thank you in advance.
------------------------------
Date: 31 Oct 1998 15:36:09 PST
From: "Simon B." <webmaster@ouweb.com>
Subject: test
Message-Id: <71g6t9$b19@journal.concentric.net>
test
------------------------------
Date: Sun, 01 Nov 1998 00:46:34 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: test
Message-Id: <slrn73nbp8.an.alastair@calliope.demon.co.uk>
Simon B. <webmaster@ouweb.com> wrote:
>test
Does the webmaster at Ouweb not know that there are numerous _test_ groups for
'test' messages?
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 31 Oct 1998 23:41:32 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Testing Perlscript at home
Message-Id: <71g77c$11a$1@gellyfish.btinternet.com>
On Sat, 31 Oct 1998 00:23:14 +0100 Hakan Kilic <a9609339@unet.univie.ac.at> wrote:
> Hello!
>
> Can I test my self written Perl at home, without sending it to the server.
>
> I tried "perl -c .." but it didn't tell the truth.
>
> And I had trouble with the debugger, because I wanted to evaluate a form of
> mine.
>
> Is there a way to test html-forms in connection with my perl cgi at home,
> without sending it to the server?
>
Install Linux (preferably) on your PC.#
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 31 Oct 1998 18:32:35 -0600
From: "Aaron of Sloth" <aaron@soltec.net>
Subject: Trouble with DBI::Pg module on linux
Message-Id: <71ga45$9rb$1@hirame.wwa.com>
Hello all,
I'm not sure if this is the best spot to post this, but I don't see any
better one
I'm trying to install DBD::Pg
however I have the following errors
I am using perl 5.00502
and have DBI 1.02 installed
[aaron@localhost DBD-Pg-0.73]$echo $POSTGRES_HOME
/var/lib/pgsql
[aaron@localhost DBD-Pg-0.73]$ perl Makefile.PL
Configuring Pg
Remember to actually read the README file !
$POSTGRES_HOME not defined. Searching for PostgreSQL...
Found PostgreSQL in
Checking if your kit is complete...
Looks good
Writing Makefile for DBD::Pg
[aaron@localhost DBD-Pg-0.73]$ make
mkdir blib
mkdir blib/lib
mkdir blib/lib/DBD
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/DBD
mkdir blib/arch/auto/DBD/Pg
mkdir blib/lib/auto
mkdir blib/lib/auto/DBD
mkdir blib/lib/auto/DBD/Pg
mkdir blib/man3
cp Pg.pm blib/lib/DBD/Pg.pm
/bin/perl -I/usr/lib/perl5/5.00502/i386-linux-thread
-I/usr/lib/perl5/5.00502 /u
sr/lib/perl5/5.00502/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.00502/ExtUtils/t
ypemap Pg.xs >Pg.tc && mv Pg.tc Pg.c
cc -c -I/include -I/usr/local/include/pgsql -I/usr/include/pgsql
-I/usr/lib/perl
5/5.00502/i386-linux-thread/DBI
-I/usr/lib/perl5/site_perl/5.005/i386-linux-thre
ad/auto/DBI -D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include -O2
-DVE
RSION=\"0.73\" -DXS_VERSION=\"0.73\" -fpic
-I/usr/lib/perl5/5.00502/i386-linux-t
hread/CORE Pg.c
In file included from /usr/include/libpq/pqcomm.h:22,
from /usr/include/libpq-fe.h:28,
from Pg.h:12,
from Pg.xs:12:
/usr/include/c.h:66: warning: empty declaration
cc -c -I/include -I/usr/local/include/pgsql -I/usr/include/pgsql
-I/usr/lib/perl
5/5.00502/i386-linux-thread/DBI
-I/usr/lib/perl5/site_perl/5.005/i386-linux-thre
ad/auto/DBI -D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include -O2
-DVE
RSION=\"0.73\" -DXS_VERSION=\"0.73\" -fpic
-I/usr/lib/perl5/5.00502/i386-linux-t
hread/CORE dbdimp.c
In file included from /usr/include/libpq/pqcomm.h:22,
from /usr/include/libpq-fe.h:28,
from Pg.h:12,
from dbdimp.c:12:
/usr/include/c.h:66: warning: empty declaration
dbdimp.c: In function `dbd_db_login':
dbdimp.c:122: `thr' undeclared (first use in this function)
dbdimp.c:122: (Each undeclared identifier is reported only once
dbdimp.c:122: for each function it appears in.)
dbdimp.c: In function `dbd_db_disconnect':
dbdimp.c:282: `thr' undeclared (first use in this function)
dbdimp.c: In function `dbd_st_execute':
dbdimp.c:617: `thr' undeclared (first use in this function)
dbdimp.c: In function `dbd_st_finish':
dbdimp.c:697: `thr' undeclared (first use in this function)
make: *** [dbdimp.o] Error 1
------------------------------
Date: Sat, 31 Oct 1998 22:58:31 -0500
From: Aravind Subramanian <aravind@genome.wi.mit.edu>
Subject: uninstalling modules
Message-Id: <363BDC66.9EB7846B@genome.wi.mit.edu>
I am trying to set up a web page that provides the following
functionality:
List currently installed CPAN modules
Install a CPAN module
Upgrade a CPAN module
Uninstall a CPAN module
CPAN.pm is of great help in doing most of this. Except, I can't figure
out how to uninstall a perl module (either using CPAN.pm or by some
other means).
Any suggestions?
Thanks,
aravind
------------------------------
Date: Sun, 01 Nov 1998 00:07:10 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: What's with these Curly brackets???
Message-Id: <363fa550.6001160@news.ping.be>
Matt Knecht wrote:
>you're missing a right bracket somewhere else, not in this sub (All your
>brackets here have partners in the sub you posted). Without a good
>editor, finding this sort of typo can be a nightmare.
What I do, without such an editor, is temporarily remove subs that are
ok, or just the opposite: commenting out parts that are suspect. If I
get syntax errors with this statement, but not without, then the erro is
IN this statement. Easy as that.
Temporarily removing things that are ok (put them in other temporary
windows, so you wan put them back later) helps the compiler diagnosing
more accurately what is wrong.
Bart.
------------------------------
Date: Sun, 01 Nov 1998 01:20:30 GMT
From: jhardy@cins.com (John Hardy)
Subject: Re: What's with these Curly brackets???
Message-Id: <yHO_1.563$_t.439456@198.235.216.4>
In article <363fa550.6001160@news.ping.be>, bart.mediamind@ping.be says...
>
>Matt Knecht wrote:
>
>>you're missing a right bracket somewhere else, not in this sub (All your
>>brackets here have partners in the sub you posted). Without a good
>>editor, finding this sort of typo can be a nightmare.
>
>What I do, without such an editor, is temporarily remove subs that are
>ok, or just the opposite: commenting out parts that are suspect. If I
>get syntax errors with this statement, but not without, then the erro is
>IN this statement. Easy as that.
>
>Temporarily removing things that are ok (put them in other temporary
>windows, so you wan put them back later) helps the compiler diagnosing
>more accurately what is wrong.
>
> Bart.
I have counted all the brackets and there are 7 - 7 through the whole script,
so thats a match and they all seem to be in the right place.
When I take the sub out of the script it works fine, yet the sub also works
fine on it's own??? I put in another sub to test, very short
sub test_ing {
print "this is a test \n";
}
and perl tells me that the last bracket is a syntax error, when I take it
out it tells me it's missing?????????????????????
I'm begining to think it must have something to do with my editor although it
is a very sinple editor that I have always used (Ultra Edit)
All other scripts are running fine, so I din't know??!!
------------------------------
Date: Sat, 31 Oct 1998 21:11:37 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: Why is junk being appended to my saved data file?
Message-Id: <363BC359.7CCEA7BA@fccj.org>
IFN wrote:
>
> Hi all,
> Whenever I post a newsgroup question I send forty copies...
Sorry, I couldn't resist :]
-Sneex-
________________________________________________________________________
Bill Jones | FCCJ Webmaster | x3089 | http://webmaster.fccj.org:81
------------------------------------------------------------------------
__ _ RedHat 5.1 Manhatten
/ /(_)_ __ _ ___ __ http://www.apache.org
/ / | | '_ \| | | \ \/ / http://www.redhat.com
/ /__| | | | | |_| |> < http://www.perl.com
\____/_|_| |_|\__,_/_/\_\ http://www.gimp.org
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4122
**************************************