[18858] in Perl-Users-Digest
Perl-Users Digest, Issue: 1026 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 31 09:05:55 2001
Date: Thu, 31 May 2001 06:05:19 -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: <991314319-v10-i1026@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 31 May 2001 Volume: 10 Number: 1026
Today's topics:
Re: Can't Compile 5.6.1 on AIX (H. Merijn Brand)
Re: Complicated...heh (Rachel Coleman)
Re: Complicated...heh <bart.lateur@skynet.be>
Re: datacalc.pm (Bernard El-Hagin)
Re: Fcntl usage with tie? <m.grimshaw@salford.ac.uk>
Re: Fcntl usage with tie? <bart.lateur@skynet.be>
Re: Fcntl usage with tie? <m.grimshaw@salford.ac.uk>
Re: Fcntl usage? <m.grimshaw@salford.ac.uk>
Re: Fcntl usage? <bart.lateur@skynet.be>
Re: Fcntl usage? <m.grimshaw@salford.ac.uk>
frustration with cgi.pm and setting cookies. <kennethj@student.uit.no>
Re: frustration with cgi.pm and setting cookies. <kennethj@student.uit.no>
Re: frustration with cgi.pm and setting cookies. <andras@mortgagestats.com>
Re: frustration with cgi.pm and setting cookies. <kennethj@stud.cs.uit.no>
Getting Users' IP <peter.reid2000@ntlworld.com>
Re: Getting Users' IP <news@_NOSPAM_mtvwebdesign.hypermart.net>
NEWBIE - Can't run a perl script <clive@bromley.ac.uk>
Re: NEWBIE - Can't run a perl script (Eric Bohlman)
Re: NEWBIE - Can't run a perl script <news@_NOSPAM_mtvwebdesign.hypermart.net>
Re: NEWBIE - Can't run a perl script (Bernard El-Hagin)
Re: OT: killfiles (was: Re: Perl Community Stars (?)) (Helgi Briem)
perl and Informix <north@nmpm.com.my>
Re: perl and Informix <Laszlo.G.Szijarto@grc.nasa.gov>
Re: perl popup <07950232225@one2one.net>
Re: perl popup <ron@savage.net.au>
Re: Perl script error during testing (Helgi Briem)
Re: Perl script error during testing <sloon@mindless.com>
Re: printf/sprintf round problem? (Anno Siegel)
Re: Reading binary data (method and style)? <mitia.nospam@northwestern.edu.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 31 May 2001 12:34:04 +0200
From: h.m.brand@hccnet.nl (H. Merijn Brand)
To: comp.lang.perl.misc
Subject: Re: Can't Compile 5.6.1 on AIX
Message-Id: <Xns90B27FD8DA6EBMerijn@192.0.1.90>
Griff Hamlin <Griff_member@newsguy.com> wrote in
news:9f34of02g48@drn.newsguy.com:
> Hello,
>
> I can't seem to compile Perl 5.6.1 on AIX 4.3.2 or 4.3.3. When I do the
> 'make test' after using 'CC=cc sh Configure' and 'make' it goes through
> all the tests and about 6 of them fail. I can actually press on and do
> 'make install' but then CPAN causes a coredump. Anyone have any experience
> with this? It seems to work just fine on AIX 4.3.1.
Which compiler?
Tried "Configure -Dusenm=n -des" ?
Tried "Configure -Dusemymalloc -des" ?
Please post result on success
--
H.Merijn Brand Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 626 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
------------------------------
Date: 31 May 2001 09:57:16 GMT
From: rachel@lspace.org (Rachel Coleman)
Subject: Re: Complicated...heh
Message-Id: <slrn9hc5bs.70d.rachel@colon.hist.cam.ac.uk>
On Wed, 30 May 2001 21:45:18 -0500, Steven Michaels <smichae@ilstu.edu> wrote:
>In some files, they are on two lines, separated by a new
>line \n. The program below currently does the job, but is
>EXTREMELY slow, especially considering that it goes
>through thousands of files and has to look at each individual
>line.
<snip>
>@essay = split(/\n/,$buf);
<snip code for dealing with newlines>
>$buf consists of thousands of weather warnings.
This looks as though you are reading all the thousands of files into
memory and then attempting to process them. Depending on the size of all
the data read in, this could cause your system to run out of memory, thus
making the program run slowly.
You might find it faster to have a loop that reads and processes each file
individually, thus avoiding the risk of running out of memory.
Best wishes,
Rachel
------------------------------
Date: Thu, 31 May 2001 11:02:14 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Complicated...heh
Message-Id: <d89chtcnsqpce3oad377skbiuf8b9mevlf@4ax.com>
Steven Michaels wrote:
>My exact data can be found by viewing the source of the following
>page: http://weather.myip.org/source.txt
"Cannot connect to server".
--
Bart.
------------------------------
Date: Thu, 31 May 2001 07:12:51 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: datacalc.pm
Message-Id: <slrn9hbr36.2s4.bernard.el-hagin@gdndev25.lido-tech>
On 30 May 2001 23:22:48 -0700, Dirk Lorenz <dirk.lorenz@de.ac-service.com>
wrote:
>Hellp NG,
>
>where can i get a compiled Version of the module datcalc.pm for Active
>Perl bcause i have no C Compiler.
You don't need a C compiler to use a Perl module. Or to use Perl, for
that matter.
Cheers,
Bernard
--
perl -le '$#="Just another Perl hacker,"; print print;'
------------------------------
Date: Thu, 31 May 2001 11:51:55 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: Fcntl usage with tie?
Message-Id: <3B16224B.8D00D425@salford.ac.uk>
I have:
##########################
#!/usr/local/bin/perl -w
use VH;
use strict; use diagnostics;
#use POSIX;
use Fcntl;
my $db = new DB;
my %DB;
if(!(%DB = $db->open_db('test.db', "O_RDONLY")))
{
print "Failed\n\n";
}
else
{
my $key;
print "Success\n\n";
# foreach $key(keys %DB)
# {
# print "$key = $DB{$key}\n";
# }
}
##############################
My (primitive as I'm experimenting with OOP) VH.pm package is:
##############################
#!/usr/local/bin/perl -w
package VH;
use strict; use diagnostics;
use Exporter;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(new open_db);
# All open, close, read and write database operations
package DB;
use DB_File;
sub new
{
my $class = shift;
my $self = {};
%$self = @_;
bless $self;
}
sub open_db
{
my $self = shift;
my @input = @_;
my %DB;
tie(%DB, 'DB_File', $input[0], $input[1]) || return 0;
return %DB;
}
1;
############################
> Add this line to your program:
>
> use Fcntl;
>
> John
> --
> use Perl;
> program
> fulfillment
------------------------------
Date: Thu, 31 May 2001 11:28:45 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Fcntl usage with tie?
Message-Id: <koacht4ll6sctftedplkaq64po9f7jiom1@4ax.com>
Mark Grimshaw wrote:
>if(!(%DB = $db->open_db('test.db', "O_RDONLY")))
Drop the quotes. O_RDONLY is a "constant", i.e. a sub. For example,
O_RDONLY() should work
--
Bart.
------------------------------
Date: Thu, 31 May 2001 12:38:21 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: Fcntl usage with tie?
Message-Id: <3B162D2D.DE6F9C7@salford.ac.uk>
That's done it - thanks! Strange though - what started this enquiry off
was strict complaining about barewords when I used O_RDONLY without the
quotes. Now I get no complaints with:
if(!(%DB = $db->open_db('test.db', O_RDONLY)))
Bart Lateur wrote:
>
> Mark Grimshaw wrote:
>
> >if(!(%DB = $db->open_db('test.db', "O_RDONLY")))
>
> Drop the quotes. O_RDONLY is a "constant", i.e. a sub. For example,
> O_RDONLY() should work
>
> --
> Bart.
------------------------------
Date: Thu, 31 May 2001 11:43:58 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: Fcntl usage?
Message-Id: <3B16206E.AC836142@salford.ac.uk>
> That seems odd. strict shouldn't start giving you warnings like this.
> They come from 'use warnings', or the -w option. strict should make
> your program uncompilablei when you have unrecognised barewords.
You're right - my mistake.
> Looks like O_RDONLY hasn't been imported. Are you sure that you have
>
> use Fcntl;
>
Yes - and I've also tried:
use Fcntl qw(:DEFAULT);
looked at man Fcntl and also at Fcntl.pm to make sure O_RDONLY etc. are
defined - they are.
------------------------------
Date: Thu, 31 May 2001 10:57:18 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Fcntl usage?
Message-Id: <fk8chtohu9195cu9p3trs29ro8b59iiknl@4ax.com>
[Sorry to piggyback, but the original post has vanished. It looks like
it was cancelled.]
Martien Verbruggen wrote:
>Mark Grimshaw <m.grimshaw@salford.ac.uk> wrote:
>> Trying to use Fcntl; with O_RDONLY, OCREAT etc. for tie operations with
>> Berkeley DB on 5.005_02 built for IP22-irix.
>>
>> Everything works fine but when I use strict; I get warnings (still
>> works).
"O_RDONLY" and "OCREAT" can't both be right. It looks inconsistent.
Yup. It's "O_CREAT".
And print out their values. They all should produce numbers. My guess is
that at least one is a string, while it should be a zero. That's how it
can still work.
--
Bart.
------------------------------
Date: Thu, 31 May 2001 12:24:47 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: Fcntl usage?
Message-Id: <3B1629FF.D60B2632@salford.ac.uk>
Bart Lateur wrote:
>
> [Sorry to piggyback, but the original post has vanished. It looks like
> it was cancelled.]
I cancelled it about an hour after sending it a few days back when I
realised (as you later pointed out) that it wasn't 'use strict' that was
throwing up the warning ;).
>
> "O_RDONLY" and "OCREAT" can't both be right. It looks inconsistent.
>
Typo.
> Yup. It's "O_CREAT".
>
> And print out their values. They all should produce numbers. My guess is
> that at least one is a string, while it should be a zero. That's how it
> can still work.
print "\nRDONLY ", O_RDONLY, "\n";
print "\nCREAT ", O_CREAT, "\n";
print "\nWRONLY ", O_WRONLY, "\n";
print "\nRDRW ", O_RDWR, "\n";
print "\nRDWR-CREAT ", O_RDWR|O_CREAT, "\n\n";
produces:
RDONLY 0
CREAT 256
WRONLY 1
RDRW 2
RDWR-CREAT 258
I could have (and have in the past) used just the numbers but would like
to use the constants for portability. I've read somewhere that O_RDONLY
cannot be guaranteed to be 0 on all systems.
------------------------------
Date: Thu, 31 May 2001 13:12:53 +0200
From: kenneth johansen <kennethj@student.uit.no>
Subject: frustration with cgi.pm and setting cookies.
Message-Id: <3B162735.9A9325B7@student.uit.no>
Im sorry if this has been beaten to deah in another thread.
im also sorry if this is the wrong group, but im not sure where else to
try.
anyways. for the last couple of weeks i have been working on a project
that requires me to set a cookie. For my project i have chosen to use
cgi.pm
so heres the deal, i set the cookie, i check it (look fine), then do a
redirect to a "cookie_test.cgi" file
that checks the cookie.. the problem is that "cookie_test.cgi" doesnt
find any cookie.
Afew lines of code:
i set the cookie and redirect with:
-------------------------------
my $cookie = $q->cookie( -name => "somehing",
-path => "/somewhere",
-value => "something",
-expires=> "somedate");
print $q->redirect (-url =>"http://somewhere/path/to/cookie_test.cgi",
-cookie => $cookie);
------------------------------------
in cookie_test.cgi i read the cookie with:
--------------------------------------------
my $cookie = $q->cookie( -name => "something" );
---------------------------------------------
and this doesnt return anything
in both programs im using:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $q = new CGI;
any reply appriciated as im all out of ideas.
regards
kenneth johansen
kennethj@stud.cs.uit.no
------------------------------
Date: Thu, 31 May 2001 13:23:18 +0200
From: kenneth johansen <kennethj@student.uit.no>
Subject: Re: frustration with cgi.pm and setting cookies.
Message-Id: <3B1629A6.9EF46F64@student.uit.no>
kenneth johansen wrote:
> Im sorry if this has been beaten to deah in another thread.
> im also sorry if this is the wrong group, but im not sure where else to
> try.
>
> anyways. for the last couple of weeks i have been working on a project
> that requires me to set a cookie. For my project i have chosen to use
> cgi.pm
>
> so heres the deal, i set the cookie, i check it (look fine), then do a
> redirect to a "cookie_test.cgi" file
> that checks the cookie.. the problem is that "cookie_test.cgi" doesnt
> find any cookie.
> Afew lines of code:
>
> i set the cookie and redirect with:
> -------------------------------
> my $cookie = $q->cookie( -name => "somehing",
> -path => "/somewhere",
> -value => "something",
> -expires=> "somedate");
> print $q->redirect (-url =>"http://somewhere/path/to/cookie_test.cgi",
> -cookie => $cookie);
> ------------------------------------
>
> in cookie_test.cgi i read the cookie with:
> --------------------------------------------
> my $cookie = $q->cookie( -name => "something" );
> ---------------------------------------------
> and this doesnt return anything
>
> in both programs im using:
>
> #!/usr/bin/perl -wT
> use strict;
> use CGI;
> my $q = new CGI;
>
> any reply appriciated as im all out of ideas.
>
> regards
> kenneth johansen
> kennethj@stud.cs.uit.no
perhaps i should mention that the code im using is based upon "testing for
cookies" in the "CGI programming with perl" from O'reilly.
i have followed their script, but alas it doesnt work :(
regards
kenneth johansen
kennethj@stud.cs.uit.no
------------------------------
Date: Thu, 31 May 2001 08:11:14 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: frustration with cgi.pm and setting cookies.
Message-Id: <3B1634E2.FBD176F8@mortgagestats.com>
kenneth johansen wrote:
> Im sorry if this has been beaten to deah in another thread.
> im also sorry if this is the wrong group, but im not sure where else to
> try.
>
> anyways. for the last couple of weeks i have been working on a project
> that requires me to set a cookie. For my project i have chosen to use
> cgi.pm
>
> so heres the deal, i set the cookie, i check it (look fine), then do a
> redirect to a "cookie_test.cgi" file
> that checks the cookie.. the problem is that "cookie_test.cgi" doesnt
> find any cookie.
> Afew lines of code:
>
> i set the cookie and redirect with:
> -------------------------------
> my $cookie = $q->cookie( -name => "somehing",
> -path => "/somewhere",
> -value => "something",
> -expires=> "somedate");
> print $q->redirect (-url =>"http://somewhere/path/to/cookie_test.cgi",
> -cookie => $cookie);
> ------------------------------------
>
> in cookie_test.cgi i read the cookie with:
> --------------------------------------------
> my $cookie = $q->cookie( -name => "something" );
> ---------------------------------------------
> and this doesnt return anything
>
> in both programs im using:
>
> #!/usr/bin/perl -wT
> use strict;
> use CGI;
> my $q = new CGI;
You are setting a cookie called "somehing" and you are trying to read one
called "something". You can't blame the poor machine for not finding it.
------------------------------
Date: Thu, 31 May 2001 13:35:14 +0200
From: Kenneth Johansen <kennethj@stud.cs.uit.no>
Subject: Re: frustration with cgi.pm and setting cookies.
Message-Id: <3B162C72.A4DB4221@stud.cs.uit.no>
Andras Malatinszky wrote:
> kenneth johansen wrote:
>
> > Im sorry if this has been beaten to deah in another thread.
> > im also sorry if this is the wrong group, but im not sure where else to
> > try.
> >
> > anyways. for the last couple of weeks i have been working on a project
> > that requires me to set a cookie. For my project i have chosen to use
> > cgi.pm
> >
> > so heres the deal, i set the cookie, i check it (look fine), then do a
> > redirect to a "cookie_test.cgi" file
> > that checks the cookie.. the problem is that "cookie_test.cgi" doesnt
> > find any cookie.
> > Afew lines of code:
> >
> > i set the cookie and redirect with:
> > -------------------------------
> > my $cookie = $q->cookie( -name => "somehing",
> > -path => "/somewhere",
> > -value => "something",
> > -expires=> "somedate");
> > print $q->redirect (-url =>"http://somewhere/path/to/cookie_test.cgi",
> > -cookie => $cookie);
> > ------------------------------------
> >
> > in cookie_test.cgi i read the cookie with:
> > --------------------------------------------
> > my $cookie = $q->cookie( -name => "something" );
> > ---------------------------------------------
> > and this doesnt return anything
> >
> > in both programs im using:
> >
> > #!/usr/bin/perl -wT
> > use strict;
> > use CGI;
> > my $q = new CGI;
>
> You are setting a cookie called "somehing" and you are trying to read one
> called "something". You can't blame the poor machine for not finding it.
rest assured, "somehing" was a typo on my part in this post, the actuall
words
used are the same.
regards
kenneth johansen
kennethj@stud.cs.uit.no
------------------------------
Date: Thu, 31 May 2001 10:52:24 GMT
From: Peter Reid <peter.reid2000@ntlworld.com>
Subject: Getting Users' IP
Message-Id: <1103_991306344@peterrei>
I had been using
my $userip=remote_host;
to store the IP address of everyone submitting entries to my guestbook. When it came to making a complaint to an ISP, they said I was recording the IP of their proxy
server and not of the person who had abused my guestbook. They said I should use
my $userip=HTTP_CLIENT_IP;
but Perl just says "Bareword 'HTTP_CLIENT_IP' not allowed while strict subs in use" which to me means it doesn't understand the variable!!?? What is the correct
environment variable of the client IP -- the person accessing my script????
Peter
------------------------------
Date: Thu, 31 May 2001 13:28:33 +0200
From: "Maarten Veerman" <news@_NOSPAM_mtvwebdesign.hypermart.net>
Subject: Re: Getting Users' IP
Message-Id: <9f59t2$o3e$1@news.tudelft.nl>
Well, it seems that in the first line, you are calling a sub named
remote_host or something, since there is no internal perl variable/function
named remove_host.
Search for: sub remote_host
or something and see what's in there.
About the HTTP_CLIENT_IP. I don't think that is a standard environment
variable.
You should try REMOTE_ADDR.
my $userip = $ENV{'REMOTE_ADDR'} || $ENV{'HTTP_CLIENT_IP'} ||
$ENV{'REMOTE_HOST'};
This code will set userip to remote-host if neither remote_addr nor
http_client_ip didn't exist
Maarten
"Peter Reid" <peter.reid2000@ntlworld.com> wrote in message
news:1103_991306344@peterrei...
> I had been using
>
> my $userip=remote_host;
>
> to store the IP address of everyone submitting entries to my guestbook.
When it came to making a complaint to an ISP, they said I was recording the
IP of their proxy
> server and not of the person who had abused my guestbook. They said I
should use
>
> my $userip=HTTP_CLIENT_IP;
>
> but Perl just says "Bareword 'HTTP_CLIENT_IP' not allowed while strict
subs in use" which to me means it doesn't understand the variable!!?? What
is the correct
> environment variable of the client IP -- the person accessing my
script????
>
> Peter
>
------------------------------
Date: Thu, 31 May 2001 12:14:33 +0100
From: "Clive Gould" <clive@bromley.ac.uk>
Subject: NEWBIE - Can't run a perl script
Message-Id: <9f590n$41v$1@canard.ulcc.ac.uk>
Help - I am running Apache 1.3.19-5 under Redhat 7.1
I have a perl script which reads:
#!/usr/bin/perl
print "Hello Perly World /n";
I can run a perl script from the command line just by typing ./trivial and
it prints
"Hello Perly World"
I am now trying to run the same script using Apache by typing
http://mypc/trivial.pl
I have enabled CGI scripting.
Internet Explorer 5.5 on the client reports an Internal Server Error 500
The appropriate error log entry for Apache reads:
..malformed header from script. Bad Header=Hello Perly World:
/var/www/html/trivial.pl
What am I doing wrong?
Thanks
Clive
------------------------------
Date: 31 May 2001 11:32:14 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: NEWBIE - Can't run a perl script
Message-Id: <9f5a3u$h50$2@bob.news.rcn.net>
Clive Gould <clive@bromley.ac.uk> wrote:
> I have a perl script which reads:
> #!/usr/bin/perl
> print "Hello Perly World /n";
[snip]
> The appropriate error log entry for Apache reads:
> ..malformed header from script. Bad Header=Hello Perly World:
> /var/www/html/trivial.pl
> What am I doing wrong?
Forgetting that CGI programs have to output CGI headers before any data.
See any CGI tutorial.
------------------------------
Date: Thu, 31 May 2001 13:33:06 +0200
From: "Maarten Veerman" <news@_NOSPAM_mtvwebdesign.hypermart.net>
Subject: Re: NEWBIE - Can't run a perl script
Message-Id: <9f5a5i$o40$1@news.tudelft.nl>
You are not printing a content-type header:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello Perly World\n";
Not that it is: \n and not /n!
\n is newline
after a header you should type: \n\n, 2 newlines, that end the header.
Maarten
"Clive Gould" <clive@bromley.ac.uk> wrote in message
news:9f590n$41v$1@canard.ulcc.ac.uk...
> Help - I am running Apache 1.3.19-5 under Redhat 7.1
>
> I have a perl script which reads:
>
> #!/usr/bin/perl
> print "Hello Perly World /n";
>
> I can run a perl script from the command line just by typing ./trivial and
> it prints
> "Hello Perly World"
>
> I am now trying to run the same script using Apache by typing
>
> http://mypc/trivial.pl
>
> I have enabled CGI scripting.
>
> Internet Explorer 5.5 on the client reports an Internal Server Error 500
>
> The appropriate error log entry for Apache reads:
>
> ..malformed header from script. Bad Header=Hello Perly World:
> /var/www/html/trivial.pl
>
> What am I doing wrong?
>
> Thanks
>
> Clive
>
>
>
------------------------------
Date: Thu, 31 May 2001 11:35:48 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: NEWBIE - Can't run a perl script
Message-Id: <slrn9hcag5.2s4.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 31 May 2001 12:14:33 +0100, Clive Gould <clive@bromley.ac.uk> wrote:
>Help - I am running Apache 1.3.19-5 under Redhat 7.1
>
>I have a perl script which reads:
>
>#!/usr/bin/perl
>print "Hello Perly World /n";
>
>I can run a perl script from the command line just by typing ./trivial and
>it prints
>"Hello Perly World"
>
>I am now trying to run the same script using Apache by typing
>
>http://mypc/trivial.pl
>
>I have enabled CGI scripting.
>
>Internet Explorer 5.5 on the client reports an Internal Server Error 500
>
>The appropriate error log entry for Apache reads:
>
>..malformed header from script. Bad Header=Hello Perly World:
>/var/www/html/trivial.pl
>
>What am I doing wrong?
What you're doing wrong is not looking in the FAQ.
perldoc -q 500
Cheers,
Bernard
--
perl -le '$#="Just another Perl hacker,"; print print;'
------------------------------
Date: Thu, 31 May 2001 11:54:53 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: OT: killfiles (was: Re: Perl Community Stars (?))
Message-Id: <3b162ed7.97436867@news.isholf.is>
On Wed, 30 May 2001 17:00:45 -0700, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
>"Hello. My name is Damian. I am hateful."
>
>* applauds *
>
>You and your friends are on the road to recovery!
>
>Godzilla!
You have no one to blame but yourself. Even
though your behaviour has vastly improved since
your return, you are still paying the price for
your earlier childish tantrums and arrogance.
Not to mention bad code and bad coding practices.
You still have a lot to learn, but I think
your current incarnation has at least something
to offer, so I am not killfiling you for now.
Plus I find some of your posts amusing.
I understand that your feelings are hurt, by being in
probably more killfiles than anyone else on Usenet but
you are an adult and must take responsibility
for your actions.
Regards,
Helgi Briem
------------------------------
Date: Thu, 31 May 2001 17:55:55 +0800
From: miss <north@nmpm.com.my>
Subject: perl and Informix
Message-Id: <3B16152B.ED538A@nmpm.com.my>
Hai all;
If I want to using Perl and Informix as my database.What I should
install???
(my is Win98)
should I install dbd::informix????
Please teach me step by step.
Thanks alot.
------------------------------
Date: Thu, 31 May 2001 08:04:13 -0400
From: "Laszlo G. Szijarto" <Laszlo.G.Szijarto@grc.nasa.gov>
Subject: Re: perl and Informix
Message-Id: <9f5buo$702$1@sulawesi-fi.lerc.nasa.gov>
you'll need the following elements -- installed in this order
Informix (installed somewhere)
ESQL/C 5.00 or later or Cleint SDK 2.00 or later (required by
DBD-Informix-1.00.PC1) installed on the client
PERL 5.004 or later (required by DBD-Informix-1.00.PC1 and 5.004_04
recommended by DBI-1.15) on client
DBI-1.15 (generic database functionality for PERL) on client
DBD-Informix-1.00.PC1 (Informix-specific database drivers -- works in
conjunction with DBI) on client
to connect to remote clients, you'll need to make appropriate entries in
sqlhosts and have the corresponding /etc/services entry -- now, this last
part I've only done on Linux and not on Windows at all, but, to answer your
question, yes, you need DBI and DBD-Informix.
Laszlo
------------------------------
Date: Thu, 31 May 2001 09:55:24 +0100
From: John Imrie <07950232225@one2one.net>
Subject: Re: perl popup
Message-Id: <3B1606FC.5E88A0A9@one2one.net>
Banshee wrote:
> Hi,
>
> I was wondering if it is possible to write a perl script that pops up a
> window (at predefined size) to dynamically display info. Rather like a
> Javascript on-the-fly pop up window.
>
> Is this possible or is it beyond the scope of perl?
>
> TIA,
> Malissa
Are you trying to get a new web browser window to appear or are you trying
to write a Perl GUI program ?
John
------------------------------
Date: Thu, 31 May 2001 20:32:13 +1000
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: perl popup
Message-Id: <8foR6.3225$Yr1.146626@ozemail.com.au>
On 27-May-2001 I announced on comp.lang.perl.modules a tut which pops up a window in a Perl/CGI script. It that relevant? See:
http://savage.net.au/Perl-tutorials.html
--
Cheers
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html
Banshee <defont@nospam.iinet.net.au> wrote in message news:3b159fbd$0$12445@echo-01.iinet.net.au...
> Hi,
>
> I was wondering if it is possible to write a perl script that pops up a
> window (at predefined size) to dynamically display info. Rather like a
> Javascript on-the-fly pop up window.
>
> Is this possible or is it beyond the scope of perl?
>
> TIA,
> Malissa
>
>
------------------------------
Date: Thu, 31 May 2001 11:32:32 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Perl script error during testing
Message-Id: <3b162b2a.96496044@news.isholf.is>
On Wed, 30 May 2001 14:08:02 GMT, sloon <sloon@mindless.com>
wrote:
>I am SO SORRY that I actually posted a message here...I'll forever
>view this newsgroup as a place akin to the Taliban regime with zealots
>rushing around trying to find a reason to persecute someone...
>
>What a life some of these people must have...simmering frustration
>just below the surface..ready to snap at anyone. Whew!!!
>When do the Crusades start?
>
The simmering frustration is largely due to
rude, stupid people like you.
Don't let the door hit your ass on the way out.
Helgi Briem
------------------------------
Date: Thu, 31 May 2001 12:49:17 GMT
From: sloon <sloon@mindless.com>
Subject: Re: Perl script error during testing
Message-Id: <00fcht0d6v5ccdbemf2932p78af435f1ho@4ax.com>
Oh please....get a life....
I'm an adult, and an intelligent one, and I find your comments
childish and rude.
Why you try and blame your lack of manners on me is a mystery...why
you don't let this thread just die is a bigger mystery.
On Thu, 31 May 2001 11:32:32 GMT, helgi@NOSPAMdecode.is (Helgi Briem)
wrote:
>On Wed, 30 May 2001 14:08:02 GMT, sloon <sloon@mindless.com>
>wrote:
>
>>I am SO SORRY that I actually posted a message here...I'll forever
>>view this newsgroup as a place akin to the Taliban regime with zealots
>>rushing around trying to find a reason to persecute someone...
>>
>>What a life some of these people must have...simmering frustration
>>just below the surface..ready to snap at anyone. Whew!!!
>>When do the Crusades start?
>>
>The simmering frustration is largely due to
>rude, stupid people like you.
>
>Don't let the door hit your ass on the way out.
>
>Helgi Briem
------------------------------
Date: 31 May 2001 09:47:43 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: printf/sprintf round problem?
Message-Id: <9f53vv$12k$1@mamenchi.zrz.TU-Berlin.DE>
According to Arnar M Hrafnkelsson <addi@umich.edu>:
> "Robert Berlinger" <rnb@aecom.yu.edu> writes:
>
> > Why does
> >
> > $a = 7;
> > $b = $a * 1.15;
> > printf ("%.1f\n", $b);
> > printf ("%.1f\n", 8.05);
> >
> > print
> >
> > 8.0
> > 8.1
> >
> > when 7*1.5 = 8.05 which should round to 8.1? This is perl, v5.6.1 built for
> > sun4-solaris.
> >
> > What am I missing? Thanks.
>
> I think this is called IEEE rounding.
[demo snipped]
> Notice how the break even points of n.5 are rounded up if n is odd but down
> if n is even? That's the way IEEE rounding works.
The description of IEEE rounding is correct, but it doesn't explain
the behavior the OP has observed. Note that he was rounding two
numbers (8.05 and 7*1.15) that he thought were equal. Jay Tilton has
correctly pointed out that they aren't, due to binary representation.
Anno
------------------------------
Date: Thu, 31 May 2001 02:07:12 -0500
From: Dmitry Epstein <mitia.nospam@northwestern.edu.invalid>
Subject: Re: Reading binary data (method and style)?
Message-Id: <3B15EDA0.24ECA83@northwestern.edu.invalid>
Ilya Zakharevich wrote:
>
> [A complimentary Cc of this posting was sent to
> Dmitry Epstein
> <mitia.nospam@northwestern.edu.invalid>], who wrote in article <3B14A1BE.B79E2B38@northwestern.edu.invalid>:
> > But, since each field has a particular meaning, what I would like to do
> > is to somehow write this with comments. It would then be easier to read
> > and modify the code. So, what I would like to do is something like this
> > (I know the following doesn't work):
> >
> > "v # foo
> > v # bar
> > a # baz
> > ...
>
> Upgrade.
Huh?
> Hope this helps,
Not really...
Anyway, I changed my mind and made an array. Since I am going to also
print out all these values, I did something like this:
my @REC_FORMAT = (
[ '2a', '%v02x' ], # comment
[ 'v', '%04x' ], # comment
...
);
Then I just made myself two strings:
my $UNPACK_FORMAT = join( "", map($_->[0], @REC_FORMAT);
my $PRINT_FORMAT = join( "\t", map($_->[1], @REC_FORMAT) . "\n";
--
Dmitry Epstein
Northwestern University, Evanston, IL. USA
mitia(at)northwestern(dot)edu
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 1026
***************************************