[12464] in Perl-Users-Digest
Perl-Users Digest, Issue: 6064 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 20 05:07:27 1999
Date: Sun, 20 Jun 99 02:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 20 Jun 1999 Volume: 8 Number: 6064
Today's topics:
%IS THIS SCRIPT ANY GOOD ?% %IS THIS SCRIPT ANY GOOD ?% (sam@cheapnet.co.uk)
Re: 'Perl core' or 'perl core'? <wyzelli@yahoo.com>
Re: Afraid to ask about Y2K! (Bart Lateur)
Crosspad interfacing and baud rates (Tramm Hudson)
Re: File Processing (Bart Lateur)
Re: Having trouble making this work... <gellyfish@gellyfish.com>
Re: HELP! update problem using DBD::XBase on win32 <gellyfish@gellyfish.com>
Re: HELP! with script PLEASE! <gellyfish@gellyfish.com>
Re: HOW DO I PAD A STRING IN PERL?? <gellyfish@gellyfish.com>
Re: Losing referrer information when passing through a <jde222RemovethiS@iname.com>
Re: math::Matrix <sb@sdm.de>
Re: Newbie need help <gellyfish@gellyfish.com>
Newbie needs help! (Jonathan Chum)
Re: Parsing bug in Perl? (Lee)
Re: Perl back to bloody Netscape browser <nlymbo@mindspring.com>
Re: Recommend a simple Online database? (Bart Lateur)
Re: simple question about array <gellyfish@gellyfish.com>
SMTP <Ch1ckEn@hotmail.com>
Term::ReadLine question... <portboy@home.com>
Re: Urgent and important : CSV !!! <gellyfish@gellyfish.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 20 Jun 1999 07:01:21 GMT
From: sam@cheapnet.co.uk (sam@cheapnet.co.uk)
Subject: %IS THIS SCRIPT ANY GOOD ?% %IS THIS SCRIPT ANY GOOD ?%
Message-Id: <376c91be.80404466@news.cheapnet.co.uk>
this is my first PERL script - i have been learning for 6 days.
it works fine but is it good or crap ?
# This script sets the home drive letter and the logon script variable
for all users
# in a particluar global group. Before using the module some of the
global variables may need to # be changed.Of particular interest are
# $domain => NT domain name
# logonscript => name of the login script in the User Environment
Profile of UMD
# homedriveletter => sets the value in the Connect X: to button in the
User Environment Profile # # of UMD
# SMccartin 18/06/1999
# Required Modules
use Win32;
use Win32::AdminMisc;
use Win32::NetAdmin;
# File to print the output to
$file = "c:\\users.txt";
open (FILE, ">$file");
# declare some global variables first
$domain=PARIS;
$logonscript='lb_logon';
$pdc=Win32::AdminMisc::GetPDC($domain);
$homedriveletter='M:';
# globalgroup is the name of the global group you wish to extract
information from
$globalgroup='lambeth';
# USER_SCRIPT_PATH
# The path of the user's logon script, .CMD, .EXE, or .BAT file.
$attrib1 = USER_SCRIPT_PATH;
$attrib1value = $logonscript;
# USER_HOME_DIR_DRIVE
# The drive letter to map the USER_HOME_DIR to if it is a UNC.
$attrib2 = USER_HOME_DIR_DRIVE;
$attrib2value = $homedriveletter;
# Get the list of members of the Domain Users global group from the
pdc and place them in an # # # array called @username
# This function like most in PERL returns a value: 0 for failure 1 for
success
# If 0 is returned the die statement is executed
Win32::NetAdmin::GroupGetMembers($pdc,$globalgroup,\@username) or die
print FILE "operation aborted. I could not get group members. Check to
ensure $globalgroup is a valid global group on domain $domain\n";
# Main loop
# dump any username ending with a $
# a bug shows up workstatations in the output along with user names
# eg COMP-DC-1$
foreach $username(@username) {# start main for loop
next if ($username =~ /\$$/);
print FILE "$username"; # prints a list of usernames from the group
domain users
$out=Win32::AdminMisc::UserSetMiscAttributes($domain, $username,
$attrib1, $attrib1value, $attrib2, $attrib2value);
if ($out==0) # ie function failed. 1 is success 0 is failure
{print FILE "could not set attributes for user
$username\n";}
else { print FILE "\n";}
} # end main for loop
close FILE;
------------------------------
Date: Sun, 20 Jun 1999 16:44:40 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: 'Perl core' or 'perl core'?
Message-Id: <tx0b3.114$E4.55726@vic.nntp.telstra.net>
Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.11d62948512f8fc989c02@nntp.hpl.hp.com...
> Uri Guttman and I are completing a paper for the upcoming Perl
> Conference in Monterey, on new efficient sorting techniques. We
> disagree on the capitalization in the following paragraph, and are
> trying to get a consensus from the wise heads in this newsgroup.
>
> "Even the simplest custom sort in Perl will be less efficient than using
> the default comparison. The default sort runs entirely in C code in the
> [Pp]erl core, but any sortsub must execute Perl code. A well-known
> optimization is to minimize the amount of Perl code executing and to try
> to stay inside the [Pp]erl core as much as possible. Later we will show
> various optimization techniques for Perl sorts that will reduce the
> amount of Perl code executed."
>
> So, which should it be, 'Perl core' or 'perl core'?
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
It is Perl everywhere else... why would it be perl?
My vote is in...
Oh sorry you said 'wiser heads'... That excludes me... lol
:^)
Wyzelli
------------------------------
Date: Sun, 20 Jun 1999 08:50:30 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <3772a9f5.2388358@news.skynet.be>
Abigail wrote:
>Since, as you said, it's very difficult to benchmark, don't you think
>the extra time is neglictable?
>
>If such extra time matters to you, you shouldn't be programming in Perl
>anyway.
It *is* difficult to benchmark. So is startup time of a script. However,
sometimes startup time is NOT negligable, but a significant part of
relatively small scripts. For some scripts, especially if called very
fequent, it is indeed reason not to choose Perl, or to look for faster
implementations, such as mod_perl for CGI. BTW. How do you benchmark
that? How do you know it's time for a switch to a faster approach?
Response time on the client side, I assume.
I also think that for such short scripts, use of a (largish) module can
double the total execution time of the scriptlet.
Bart.
------------------------------
Date: 20 Jun 1999 02:19:37 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Crosspad interfacing and baud rates
Message-Id: <7ki86p$9v0@llama.swcp.com>
[posted and cc'd to itojun]
Portable tablet users,
I have written a Perl module for downloading the raw pages from
the Crosspad and am working on integrating with Jun-ichiro itojun Itoh
(itojun@itojun.org)'s code to produce Postscript files directly
as the file is transfered.
So far my module can retrieve the pages and decode the strokes,
draw them onscreen with Tk, but not yet produce the Postscript.
You may find snapshots of this project at:
http://www.swcp.com/~hudson/pilot/crosspad.html
So, my question is how to set the baud rates from within Perl.
perlfaq8 describes "How do I talk with the serial port?" but
neglects to mention how to set the speed. The last example
is the use of cu to open the line and handle those details, but
I find that unacceptable.
My code does something like this:
#!/usr/bin/perl -w
use strict;
use FileHandle;
my $baud = 115200;
my $dev = '/dev/ttyS0';
my $fh = new FileHandle;
sysopen $fh, $dev, 2
or die "$class: Unable to open $dev: $!\n";
$fh->autoflush(1);
system( "stty $baud cs8 cread clocal < $dev" );
__END__
Is there a better, more portable way to do so?
And, as an aside, I hope that I will have purchased my Crosspad
for only $3.42. Office Max had them for $199, Office Depot for $299
with a $150 rebate. So with the 155% low-price thing, the Office
Depot price was $145 followed by a $150 rebate for a total of $-5.
Add in the $8.42 of sales tax and my price should be $3.42.
Tramm
--
o hudson@swcp.com tbhudso@cs.sandia.gov O___|
/|\ http://www.swcp.com/~hudson/ H 505.266.59.96 /\ \_
<< KC5RNF @ N5YYF.NM.AMPR.ORG W 505.284.24.32 \ \/\_\
0 U \_ |
------------------------------
Date: Sun, 20 Jun 1999 08:50:07 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: File Processing
Message-Id: <3773ab2a.2697311@news.skynet.be>
Kai Henningsen wrote:
>> But it's even more amazing that this thread doesn't answer the question
>> originally asked.
>
>Well, the first (one article, Bart) subthread I see does.
Apparently, on-topic threads are boring.
Bart.
------------------------------
Date: 20 Jun 1999 07:20:33 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Having trouble making this work...
Message-Id: <7ki4o1$5sj$1@gellyfish.btinternet.com>
On Sun, 20 Jun 1999 05:30:18 GMT Mitch wrote:
>
> Okay, I changed it to that. But when I'm printing it out the values, I get wierd
> answers. here's how I'm printing it out.
>
> while (($var, $value) = each(%config)) {
> print "the var is $var and value is $value\n";
> }
> And I'm getting answers like this:
>
> the var is coke and value is HASH(0x180998)
> the var is pepsi and value is HASH(0x180a28)
> the var is drpepper and value is HASH(0x1807e8)
>
The $value variable is a reference to a hash - you need to treat it
appropriately :
while (($var, $value) = each(%config)) {
print "$var : \n";
while (($key2,$value2) = each (%{$config}))
{
print "\tthe var is $key2 and value is $value2\n";
}
}
You can read about this sort of stuff in the perldata,perldsc and perlref
manpages ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Jun 1999 07:49:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HELP! update problem using DBD::XBase on win32
Message-Id: <7ki6e2$5vo$1@gellyfish.btinternet.com>
On Sun, 20 Jun 1999 01:30:20 GMT jbell@263.net wrote:
> In article <7kh7mu$4ts$1@gellyfish.btinternet.com>,
> Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>> On Sat, 19 Jun 1999 20:06:53 GMT jbell@263.net wrote:
>> > Hi, anyone can please help.
>> >
>> > I'm trying to doing some update on a .dbf table. my script looks
>> > like this,
>> >
>> > use DBI;
>> > my $sql = "update my_table set city = 'BELLEVILL', set carn
>> > = '2' where useruid = '929817326'";
>> >
>> > my $dbh = DBI->connect("DBI:XBase:\Root\My_dir}") or die
>> > $DBI::errstr;
>>
>> You either need to use single quotes in that connect string or do
> something
>> about the slashes.
>
> There was no problem using the following line.
>
> my $dbh = DBI->connect("DBI:XBase:\Root\My_dir") or die $DBI::errstr;
>
You still want to use single quotes - you have just been lucky - read about
quoting issues in the perlop manpage.
> because if I use the following $sql, then it works fine.
>
> my $sql = "update my_table set carn = '2' where useruid
> = '929817326'";
>
> It seems it just wouldn't take more than one pair of set.
>
Sorry I missed it yesterday (my eye went straight to the potential problem
with the connect string). You have invalid SQL in your update statement
you only need *one* 'set' :
update my_table
set city = 'BELLEVILL',
carn = '2'
where userid = '929....'
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Jun 1999 08:02:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HELP! with script PLEASE!
Message-Id: <7ki763$603$1@gellyfish.btinternet.com>
On Mon, 14 Jun 1999 23:41:20 -0400 Benny Fragomeli wrote:
> Is it possible to have a perl script that generates an HTML "order page" and
> before the perl script ends goto a different server "secure server" Giving
> the appearance that the order form was fetched from the secure server?
>
It might be possible but you probably want to ask in a group with 'www' in
the name ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Jun 1999 07:59:48 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HOW DO I PAD A STRING IN PERL??
Message-Id: <7ki71k$5vu$1@gellyfish.btinternet.com>
On Sun, 20 Jun 1999 06:23:19 GMT Perry Fecteau wrote:
> Tad McClellan wrote:
>>
>> Perry Fecteau (perfecto@ct2.nai.net) wrote:
>> : for example, i want 23 to look like 00023...
>>
>> : how do i do that??
>>
>> $num = '000' . $num if $num == 23;
>>
> wrong. i want fixed length padding. ie, i want a 5 digit number zero
> fill if the number is less than 5 digits.
>
Ah but you didnt say that did you ?
> 23=00023
> 1=00001
> 1023=01023
> 38743=38743
>
> ad infinitum..
>
Then you probably want to read what the documentation says about the
functions sprintf & printf .
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 20 Jun 99 08:38:29 GMT
From: "Euro Jake" <jde222RemovethiS@iname.com>
Subject: Re: Losing referrer information when passing through a perl script...?
Message-Id: <7ki8vq$q4n$1@news3.Belgium.EU.net>
On 19-Jun-1999, rlb@intrinsix.ca (Lee) wrote:
> What do you think the referrer *should* be after redirection? I've seen no
> referrer (as have you), the script that did the redirection, and the page
> that called the script that did the redirection. All make sense, in a way,
> but if you want any one of those consistently after the redirection,
> you're
> going to have to store it and retrieve it yourself.
>
> Lee
Hi Lee, and thank you for ur reply... much appreciated.
To answer on your reflection.. a redirect seems logical to me if it would
overwrite the current location info, as it suggests in docs on this topic,
named as "replace", but if I may think straightforward, the location how it
got there, (ie. the referrer) should be left intact, idem for the users
browser list...
And in fact, I dont really need to redirect per se, I need a dispatch do
different webpages.. according to what the Perl interface decides. As Perl's
output is a form in HTML, and I dont want any user intercation to proceed
(no link clicking) do i have maybe other ways to do this as to use the
(excuse for wording) 'half-cripple' redirect function ...?
Thank you again for ur response and ur time
Jake
--
Euro Jake
>RemovethiS< in next line...
Anti spam email jde222RemovethiS@iname.com
------------------------------
Date: 20 Jun 1999 07:04:26 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: math::Matrix
Message-Id: <7ki3pq$l5r$1@solti3.sdm.de>
In article <376c75da.133879298@news.semaphore.com>, casey@f5.com wrote:
> It wasn't a mistake when I said I used Math::Matrix, that is the
Ooops, my error! Sorry! :-)
> module that I am using. I probably should be using Math::MatrixReal,
> but I don't want to rewrite all of my code into a different format if
> there is a simple way of getting it to work with the module I am
> currently using. And I have read perldoc Math::Matrix and there is
> nothing in there about getting the values out, I wanted to know if
> anyone came up with a workaround, because otherwise it is a virtually
> useless module.
Probably a good reason why you should be using Math::MatrixReal instead,
nevertheless... :-)
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
http://www.oreilly.de/catalog/perlmodger/bnp/
------------------------------
Date: 20 Jun 1999 07:36:06 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie need help
Message-Id: <7ki5l6$5us$1@gellyfish.btinternet.com>
On Sat, 19 Jun 1999 20:36:04 -0700 nightcom wrote:
> Thanks anyway to all who have responded
> ....the FAQ(s) are rather useless in trying to figure out
> how to configure PWS.
I'm sorry I fail to understand how the information in the file
perlwin32faq9.html (on the web at :
<http://www.activestate.com/ActivePerl/docs/Perl-Win32/perlwin32faq6.html>)
doesnt solve the problem - perhaps you might wish to submit a patch to
the authors so that others might benefit.
> But finally I found a site that showed how to tweak the registry
> ..now I can run cgi(s) locally
>
And of course in the best Usenet tradition you posted the URL to the group
so that others might benefit.
> Thanks anyway...please ignore this
> query from now on.
>
We'll see ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 20 Jun 1999 02:33:06 GMT
From: jchum@jps.net (Jonathan Chum)
Subject: Newbie needs help!
Message-Id: <376c51cb.10713376@news.jps.net>
I was looking at a script which uses the altavista search engine
database, but can be modified anyway you wanted it to. From the basis
of this code, I tried my own implementation on another engine. The
problem I got is that it cannot seem to parce the html correctly. In
fact, nothing shows as the results of the search. When you type a
search, and I'm sure it don't suppose to show, it gives the right
error message. I read Teach your self Perl in 21 days, the last
chapters which deal with it, but of no help. Can you help me to see
what is wrong? Thanks.
#!/usr/local/bin/perl
use strict;
use CGI;
use LWP::Simple;
my $in = new CGI;
# Either display the source code, the search form or do the search.
defined $in->param('source') and &source();
defined $in->param('query') or &display_form();
# We are searching, so get the query, escape it, and use LWP to
search.
my $query = $in->param('query');
my $query_q = &urlencode($query);
my $page = ($in->param('nh') * 10) || 0;
my $url = "http://oth.ipmedia.net:8080/cgi-bin/search?q=$query_q";
my $results = get ($url);
# Couldn't connect, timed out, lots of possibilities.
$results or &error ("No results available.");
# If we see this, then we couldn't get a match.
my $none = quotemeta ("Sorry, no matches found,");
my $pre = '';
my $description = '';
my $output = '';
my $total = 0;
if ($results =~ m/$none/) {
$output = "Sorry no Mp3's found! Try another search?";
}
else {
# Altavista sometimes adds the word about for large sites.
if ($results =~ /Click here for more matches/) {
$total = $1;
}
else {
$output = "Ooops, can't parse results:
<pre>$results</pre>";
}
# Loop through the results pulling out each link.
if ($total) {
while ($results =~ /(<pre.?<\/pre>)/gis) {
my $description = $1;
$output .= qq~$description~;
}
}
}
# Print the output.
print CGI->header;
my $next = &next_hits($page, $total, 10);
print qq~
<html>
<head>
<title>MP3 Search Results</title>
</head>
<body>
<p>Search results for: <b>$query_q</b></p>
$next
<p>$output
<p>$next
<p>Thanks for using XanthisHP MP3 Search<BR>
</body>
</html>
~;
sub next_hits {
# ----------------------------------------------
# Creates a next hits toolbar.
#
my ($page, $numhits, $maxhits) = @_;
my ($left, $right, $upper, $lower, $next_hit, $prev_hit, $i);
my $nh = int ($page / $maxhits) || 1;
my $output = '';
$numhits =~ s/,//g;
$numhits = int ($numhits);
my $next_url = $ENV{'QUERY_STRING'};
$next_url =~ s/\&nh=\d+//;
$next_hit = $nh + 1; $prev_hit = $nh - 1;
# First, set how many pages we have on the left and the right.
$left = $nh; $right = int($numhits/$maxhits) - $nh;
# Then work out what page number we can go above and below.
($left > 7) ? ($lower = $left - 7) : ($lower = 1);
($right > 7) ? ($upper = $nh + 7) : ($upper =
int($numhits/$maxhits) + 1);
# Finally, adjust those page numbers if we are near an endpoint.
(7 - $nh >= 0) and ($upper = $upper + (8 - $nh));
($nh > ($numhits/$maxhits - 7)) and ($lower = $lower - ($nh -
int($numhits/$maxhits - 7) - 1));
# Then let's go through the pages and build the HTML.
($nh > 1) and ($output .= qq~<a
href="$ENV{'SCRIPT_NAME'}?$next_url&nh=$prev_hit">[<<]</a> ~);
for ($i = 1; $i <= int($numhits/$maxhits) + 1; $i++) {
last if ($i > 19);
if ($i < $lower) { $output .= " ... "; $i =
($lower-1); next; }
if ($i > $upper) { $output .= " ... "; last; }
($i == $nh) ?
($output .= qq~$i ~) :
($output .= qq~<a
href="$ENV{'SCRIPT_NAME'}?$next_url&nh=$i">$i</a> ~);
(($i * $maxhits) >= $numhits) and print "Exiting3" and
last; # Special case if we hit exact.
}
$output .= qq~<a
href="$ENV{'SCRIPT_NAME'}?$next_url&nh=$next_hit">[>>]</a> ~ unless
(($nh == $i) or ($nh == 19));
return $output;
}
sub display_form {
# ----------------------------------------------
print CGI->header('text/html');
print qq~
<form action="$ENV{'SCRIPT_NAME'}" METHOD=GET>
Search for: <input name=query>
</form>
~;
exit;
}
sub urlencode {
# --------------------------------------------------------
# Escapes a string to make it suitable for printing as a URL.
#
my($toencode) = shift;
$toencode =~ s/([^a-zA-Z0-9_\-.])/uc
sprintf("%%%02x",ord($1))/eg;
return $toencode;
}
sub error {
# ----------------------------------------------
print CGI->header('text/plain');
print "Error: $_[0]";
exit;
}
------------------------------
Date: Sun, 20 Jun 1999 03:49:57 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Parsing bug in Perl?
Message-Id: <B392156596686F3B30@204.112.166.88>
In article <376bcaee.481197@news.skynet.be>,
bart.lateur@skynet.be (Bart Lateur) wrote:
>But anyway, THIS reply was posted at 8:30 AM. So WHEN do you sleep?
Some people sleep when the clock tells them to. I prefer to sleep when I'm
tired.
Lee
------------------------------
Date: Sun, 20 Jun 1999 04:56:00 -0400
From: Steve Farris <nlymbo@mindspring.com>
Subject: Re: Perl back to bloody Netscape browser
Message-Id: <376CACA0.EFC9F225@mindspring.com>
don't forget the cgi pre-requisite:
print header();
before:
print start_html();
print end_html();
IE5 might just overlook this omission.
Michael Dean wrote:
>
> Hi
>
> Can anyone please help ?
>
> My perl scripts work fine with Internet Explorer V4+
> However they do not work with Netscape (I'm using V4.5)
>
> Basically when I exit a perl script & display a web page -
>
> ie a plain page
>
> print start_html();
> print end_html();
>
> With i.e.5 I get a plain page. With Netscape I get a new page showing
>
> <html>
> <head>
> </head>
> <body>
> </BODY></HTML>
>
> I'm using CGI.pm (:all) selected
>
> Thanks - Michael
------------------------------
Date: Sun, 20 Jun 1999 08:50:32 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Recommend a simple Online database?
Message-Id: <376fa825.1924517@news.skynet.be>
David Cassell wrote:
>I like to kick the network connection loose with my back foot
>while executing a perfect tour jete. Very graceful, IIDSSM.
You have a back foot? You have a front foot too? Eewk.
Maybe you just walk like a crab.
Bart.
------------------------------
Date: 20 Jun 1999 07:14:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: simple question about array
Message-Id: <7ki4c7$5sf$1@gellyfish.btinternet.com>
On Sun, 20 Jun 1999 01:13:56 GMT Mark-Jason Dominus wrote:
> In article <7kgp30$481$1@gellyfish.btinternet.com>,
> Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>>On Wed, 16 Jun 1999 21:24:49 -0400 sydney qiu wrote:
>>> Hi, I am a beginner of perl and basiclly teaching myself from the book
>>> Learning Perl. In chapter there is an example @array=(1.3 .. 6.1) is
>>> equal to (1.3, 2.3, 3.3,4.3, 5.3)
>>
>>I dont believe that 'Learning Perl' says that the range operator work
>>on anything but integers - of course I might be wrong in that.
>
> On page 49 of _Learning Perl_, second edition, it says (and I quote):
>
> (1.3 .. 6.1) # same as (1.3,2.3,3.3,4.3,5.3)
>
> What do you know? The situation is exactly as Sydney said.
>
That'll be a big 'oops' all round then ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 20 Jun 1999 10:57:56 +0200
From: GiN <Ch1ckEn@hotmail.com>
Subject: SMTP
Message-Id: <376CAD13.F944F3A@hotmail.com>
Hi, i'm working on a e-mail client
but i have some problems with the protocol (RFC 821 SMTP) i think
this is a part of the program
it works on some mailservers but not all
some servers disconnect after the MAIL FROM
and some servers receives the mail but the DATA is missing
can somebody check this out??
i am a beginner so help will be appreciated ( i know there is a module,
but i don't want to use it)
sub sendmsg {
select(S); # the socket S
$| = 1;
if (<S> =~ /^220/) {
print S "HELO $host\n";
} else {
die $!;
}
if (<S> =~ /^250/) {
print S "MAIL FROM:<$emailaddr>\n";
} else {
die $!;
}
if (<S> =~ /^250/) {
print S "RCPT TO:<$ercpt>\n";
} else {
die $!;
}
if (<S> =~ /^250/) {
print S "DATA\n";
} else {
die $!;
}
if (<S> =~ /^354/) {
print S "Date: 23 Oct 81 11:22:33\n";
print S "From: <$emailaddr>\n";
print S "Subject: $subject\n";
print S "X-Mailer: Mozilla 4.6 [en] (Win98; I)\n";
print S "To: <$ercpt>\n";
print S "@mesg";
print S "\n.\n";
} else {
die $!;
}
if (<S> =~ /^250/) {
print S "QUIT\n";
} else {
die $!;
}
if (<S> =~ /^221/) {
select(STDOUT);
print "Done.\n";
} else {
die $!;
}
}
------------------------------
Date: Sun, 20 Jun 1999 07:49:55 GMT
From: Mitch <portboy@home.com>
Subject: Term::ReadLine question...
Message-Id: <376C9D14.2C21202E@home.com>
Okay, I went and downloaded (and installed) the latest Term::ReadLine
module from CPAN. So, I have a little script that will try to implement
the "addhistory" stuff, and for some reason I'm getting errors. Can
someone tell me what these errors mean? Am I doing something wrong? If
so, what? Any suggestions?
Code below:
#!/usr/bin/perl5
use Term::ReadLine;
$term = new Term::ReadLine 'Simple Perl cal';
$prompt = "enter your arith : ";
$OUT = $term->OUT || STDOUT;
while (defined ($_ = $term->readline($prompt)) ) {
$res = eval($_), "\n";
warn $@ if $@;
print $OUT $res, "\n" unless $@;
$term->addhistory($_) if /\S/;
}
Error returned:
Bare word found where operator expected at
/usr/libdata/perl5/site_perl/Term/ReadLine/readline.pm line 1211, near
"$term_OUT substr_with_props"
(Missing operator before substr_with_props?)
Bare word found where operator expected at
/usr/libdata/perl5/site_perl/Term/ReadLine/readline.pm line 1234, near
"$term_OUT substr_with_props"
(Missing operator before substr_with_props?)
Cannot do `ornaments' in Term::ReadLine::Perl at
/usr/libdata/perl5/site_perl/Term/ReadLine/Perl.pm line 111.
Did I install the module wrong or something? All the makes seemed to
work fine....
Thanks in advance,
.mitch
------------------------------
Date: 20 Jun 1999 07:57:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Urgent and important : CSV !!!
Message-Id: <7ki6t2$5vr$1@gellyfish.btinternet.com>
On Sat, 19 Jun 1999 19:46:22 -0700 Tom Phoenix wrote:
> On 20 Jun 1999, Wappinger Bailey wrote:
>
>> Bruno Baguette explains it all:
>>
>> :I have to present an examination in 4 days...
>>
>> This is very funny. I've seen this group's residents espouse the
>> "We're not here to do your homework for you" paradigm frequently, but
>> I never thought it would apply literally...
>
> It used to be that, by the time someone had gotten into college, they had
> learned to disguise their request so that it didn't look so much like they
> were asking for help on their homework. Aren't the public schools teaching
> the basics anymore? Ptsch.
>
A shocking symptom of the overall decline in educational standards - I mean
if you're going to cheat you should at least be taught to cheat with style.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6064
**************************************