[17814] in Perl-Users-Digest
Perl-Users Digest, Issue: 5234 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 4 17:56:28 2001
Date: Thu, 4 Jan 2001 14:56:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978648967-v9-i5234@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 4 Jan 2001 Volume: 9 Number: 5234
Today's topics:
More problems with DBI <edd@texscene.com>
Re: More problems with DBI (Garry Williams)
Re: More problems with DBI (Chris Fedde)
Re: More problems with DBI (Garry Williams)
more range operator usages <johnlin@chttl.com.tw>
Multi-part forms <ayambema@adelphia.net>
Re: Multi-part forms (Chris Fedde)
Re: Multi-part forms <joe+usenet@sunstarsys.com>
Need help configuring on RedHat and Debian <cliff@*MYLASTNAMEHERE*.nl>
Re: Need help configuring on RedHat and Debian (Rafael Garcia-Suarez)
Re: Need help configuring on RedHat and Debian msalerno@my-deja.com
Nested hash iteration help, please (Stan Brown)
Re: Nested hash iteration help, please (Anno Siegel)
Net::FTP question <nospam@nospam.com>
Re: Net::FTP question <jhelman@wsb.com>
Re: Net::FTP question (Martien Verbruggen)
Re: Net::FTP question <nospam@nospam.com>
Re: Net::FTP question <nospam@nospam.com>
Net::ICQ package <replynews@bigfoot.com>
neural networks smittod@auburn.edu
Re: neural networks <randy@theory.uwinnipeg.ca>
Re: neural networks (Chris Fedde)
Re: New posters to comp.lang.perl.misc (Mariusz Drozdziel)
Re: Newbie - run perl script from c program <W.Hielscher@mssys.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 1 Jan 2001 19:27:58 -0000
From: "Edd" <edd@texscene.com>
Subject: More problems with DBI
Message-Id: <3a50d807@news-uk.onetel.net.uk>
I can't get the code below (from perl.com) work. Thanks for the tips for my
previous message, but now I seem to have a diffrent problem.
The error messages follows the code below.
------------------ CODE -------------------
#!/usr/bin/perl -w
use DBI;
use strict;
use diagnostics;
print "Content-type: text/html\n";
my $database = 'db1';
my $user = 'u1';
my $password = 'p1';
my $dbh = DBI->connect("dbi:mysql:$database",$user,$password);
my $sth = $dbh->do(qq{SELECT * FROM pet});
while(my @row = $sth->fetchrow_array) {
print "qw($row[0]\t$row[1]\t$row[2]\n";
} # this part is not exactly like the perl.com code but that gave me the
same error #message.
$dbh->disconnect;
1;
---------- ERROR MESSAGE -------------------
Can't call method "fetchrow_array" without a package or object reference at
line 15 (#1)
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an expression that returns
a defined value which is neither an object reference nor a package name.
Something like this will reproduce the error:
$BADREF = 42;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
Uncaught exception from user code:
Can't call method "fetchrow_array" without a package or object
reference at line 15.
Database handle destroyed without explicit disconnect.
---------------------------------------------------
Can anyone help? Please.
------------------------------
Date: Mon, 01 Jan 2001 20:27:18 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: More problems with DBI
Message-Id: <GK546.347$Dm5.17187@eagle.america.net>
On Mon, 1 Jan 2001 19:27:58 -0000, Edd <edd@texscene.com> wrote:
>I can't get the code below (from perl.com) work. Thanks for the tips
>for my previous message, but now I seem to have a diffrent problem.
>
>The error messages follows the code below.
>
>------------------ CODE -------------------
>#!/usr/bin/perl -w
>
>use DBI;
>use strict;
>use diagnostics;
>
>print "Content-type: text/html\n";
You should read up on the CGI module in its manual page and use it for
a CGI script.
>my $database = 'db1';
>my $user = 'u1';
>my $password = 'p1';
>my $dbh = DBI->connect("dbi:mysql:$database",$user,$password);
>my $sth = $dbh->do(qq{SELECT * FROM pet});
Use the manual.
This is from the DBI manual page:
Database Handle Methods
The following methods are specified for DBI database
handles:
`do'
$rc = $dbh->do($statement) || die $dbh->errstr;
$rc = $dbh->do($statement, \%attr) || die $dbh->errstr;
$rv = $dbh->do($statement, \%attr, @bind_values) || ...
Prepare and execute a single statement. Returns the
number of rows affected or `undef' on error. A return
value of `-1' means the number of rows is not known or
is not available.
This method is typically most useful for non-`SELECT'
statements that either cannot be prepared in advance
(due to a limitation of the driver) or do not need to be
executed repeatedly. It should not be used for `SELECT'
statements because it does not return a statement handle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I don't know where you're getting this code, but the manual plainly
states that $dbh->do() doesn't return a statement handle. Therefore
your subsequent use of its returned value as an object reference
(statement handle) fails.
Furthermore, the DBI manual page gives examples of retrieving data
from tables using the prepare(), execute() and fetchrow_*() methods.
I think it would help to read the manual.
>while(my @row = $sth->fetchrow_array) {
>print "qw($row[0]\t$row[1]\t$row[2]\n";
>} # this part is not exactly like the perl.com code but that gave me the
>same error #message.
>
>$dbh->disconnect;
>1;
What is the purpose of `1;'?
See the perlmod manual page. Your script is *not* a module being
use'd or require'd. Get rid of this "cargo-cult" stuff.
>---------- ERROR MESSAGE -------------------
>Can't call method "fetchrow_array" without a package or object reference at
>line 15 (#1)
>
>Uncaught exception from user code:
> Can't call method "fetchrow_array" without a package or object
>reference at line 15.
>Database handle destroyed without explicit disconnect.
>
>---------------------------------------------------
>
>Can anyone help? Please.
Yes. You can.
Use the manual.
--
Garry Williams
------------------------------
Date: Tue, 02 Jan 2001 01:42:44 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: More problems with DBI
Message-Id: <oma46.571$B9.190628352@news.frii.net>
In article <3a50d807@news-uk.onetel.net.uk>, Edd <edd@texscene.com> wrote:
>I can't get the code below (from perl.com) work. Thanks for the tips for my
>previous message, but now I seem to have a diffrent problem.
>
>#!/usr/bin/perl -w
>
>use DBI;
>use strict;
>use diagnostics;
>
>print "Content-type: text/html\n";
>
>my $database = 'db1';
>my $user = 'u1';
>my $password = 'p1';
>my $dbh = DBI->connect("dbi:mysql:$database",$user,$password);
>my $sth = $dbh->do(qq{SELECT * FROM pet});
>
>while(my @row = $sth->fetchrow_array) {
>print "qw($row[0]\t$row[1]\t$row[2]\n";
>} # this part is not exactly like the perl.com code but that gave me the
>same error #message.
>
>$dbh->disconnect;
>1;
>
The above code checks no exit codes. Has connect succeeded? Does the do
realy do what you think that it does? did it succeed?
I think that most (competent) examples you find will include at least an
'or die...' after each method call.
--
This space intentionally left blank
------------------------------
Date: Tue, 02 Jan 2001 03:26:41 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: More problems with DBI
Message-Id: <RTb46.489$Dm5.21645@eagle.america.net>
On Tue, 02 Jan 2001 01:42:44 GMT, Chris Fedde
<cfedde@fedde.littleton.co.us> wrote:
>In article <3a50d807@news-uk.onetel.net.uk>, Edd <edd@texscene.com> wrote:
>>I can't get the code below (from perl.com) work. Thanks for the tips for my
>>previous message, but now I seem to have a diffrent problem.
>>
>>#!/usr/bin/perl -w
>>
>>use DBI;
>>use strict;
>>use diagnostics;
>>
>>print "Content-type: text/html\n";
>>
>>my $database = 'db1';
>>my $user = 'u1';
>>my $password = 'p1';
>>my $dbh = DBI->connect("dbi:mysql:$database",$user,$password);
>>my $sth = $dbh->do(qq{SELECT * FROM pet});
>>
>>while(my @row = $sth->fetchrow_array) {
>>print "qw($row[0]\t$row[1]\t$row[2]\n";
>>} # this part is not exactly like the perl.com code but that gave me the
>>same error #message.
>>
>>$dbh->disconnect;
>>1;
>
>The above code checks no exit codes. Has connect succeeded?
Well, you make a good point, but it's not as bad as you think. From
the DBI manual page:
The `AutoCommit' and `PrintError' attributes for each
connection default to "on".
So, if the connection fails, there will be at least an error message
printed that identifies the failure.
I agree, though that the connection attempt should be checked
explicitly, if you don't set RaiseError. Otherwise the script will
die later and that will only serve to obfuscate the real error.
>Does the do
>realy do what you think that it does? did it succeed?
I pointed out in another follow-up to this article that this *is* the
problem. The DBI->do() method is inappropriate for a SELECT
statement. It is defined as *not* returning a statement handle, so
the use of its returned value that way is an error. It certainly can
succeed in the above code, though. That is exactly the error that the
OP included in the original article.
See the DBI manual page.
>I think that most (competent) examples you find will include at least an
>'or die...' after each method call.
... or a specification of { RaiseError => 1 } in the DBI->connect() or
$dbh->{RaiseError} = 1; before any other method calls. Actually this
style is cleaner when it's appropriate to the application.
--
Garry Williams
------------------------------
Date: Thu, 4 Jan 2001 08:24:23 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: more range operator usages
Message-Id: <930fv8$ks7@netnews.hinet.net>
Dear all,
In perlop, most examples of range operators in scalar context are
used in a boolean way.
print if 30..50;
$in_body = /^$/ .. eof; # this is also boolean
I wonder if there is any case showing scalar range operator is useful
but not in a boolean context? For example:
$x = 2..5 ^ 6..10; # Huh?
print rand(3..50); # seems good
Thank you.
John Lin
------------------------------
Date: Wed, 03 Jan 2001 22:09:34 GMT
From: "hokiebear" <ayambema@adelphia.net>
Subject: Multi-part forms
Message-Id: <yqN46.640$4n5.18417@news1.news.adelphia.net>
Hi all:
I have a multi-part form (two pages total). The first page has a textarea
("Message") where a user can input an unlimited amount of text. Now, I want
the user's text input on this page to be "remembered" and be sent to me
along with the input from the fields in the next page of the HTML form. To
that end, I created hidden fields for "Message" in the second page's HTML
code (in my perl script). The problem I am having is that if a user inputs a
large amount of text in "Message" (say, more than two pages worth), the
second page of the HTML form comes up completely messed up. Is there a way
for Perl to remember the contents of a previous field in a multipart form
without my having to use hidden HTML fields? Thanks for any tips.
amba
------------------------------
Date: Wed, 03 Jan 2001 22:48:49 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Multi-part forms
Message-Id: <l%N46.634$B9.188499968@news.frii.net>
In article <yqN46.640$4n5.18417@news1.news.adelphia.net>,
hokiebear <ayambema@adelphia.net> wrote:
>
>Hi all:
>
>I have a multi-part form (two pages total). The first page has a textarea
>("Message") where a user can input an unlimited amount of text. Now, I want
>the user's text input on this page to be "remembered" and be sent to me
>along with the input from the fields in the next page of the HTML form. To
>that end, I created hidden fields for "Message" in the second page's HTML
>code (in my perl script). The problem I am having is that if a user inputs a
>large amount of text in "Message" (say, more than two pages worth), the
>second page of the HTML form comes up completely messed up. Is there a way
>for Perl to remember the contents of a previous field in a multipart form
>without my having to use hidden HTML fields? Thanks for any tips.
>
You might be able to get some mileage from Apache::Session. It's
available from CPAN. Alternately you could try rolling your own
session management by writing the message field to a file and
putting the name of the file in a hidden field or a cookie.
BTW You might get a better answer if you repost your question to
a group that has 'cgi' in its name.
good luck
chris
--
This space intentionally left blank
------------------------------
Date: 03 Jan 2001 18:11:10 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Multi-part forms
Message-Id: <m3vgrw44fl.fsf@mumonkan.sunstarsys.com>
cfedde@fedde.littleton.co.us (Chris Fedde) writes:
> In article <yqN46.640$4n5.18417@news1.news.adelphia.net>,
> hokiebear <ayambema@adelphia.net> wrote:
...
> >The problem I am having is that if a user inputs a large
> >amount of text in "Message" (say, more than two pages worth),
> >the second page of the HTML form comes up completely messed up.
> >Is there a way for Perl to remember the contents of a previous
> >field in a multipart form without my having to use hidden HTML
> >fields? Thanks for any tips.
>
> You might be able to get some mileage from Apache::Session. It's
> available from CPAN. Alternately you could try rolling your own
> session management by writing the message field to a file and
> putting the name of the file in a hidden field or a cookie.
>
> BTW You might get a better answer if you repost your question to
> a group that has 'cgi' in its name.
Indeed. As might using POST instead of GET, and perhaps
encoding quote characters like <"> and <'>.
--
Joe Schaefer
------------------------------
Date: Thu, 04 Jan 2001 01:04:57 +0100
From: Clifford Pennock <cliff@*MYLASTNAMEHERE*.nl>
Subject: Need help configuring on RedHat and Debian
Message-Id: <930ff7$97e$1@news.news-service.com>
Hi,
I have two Linux machines, one with RedHat 6.2 and one with Debian 2.2.
Both distributions installed Perl version 5.005_03 by default.
I want to experiment with threads but apparantly, support for threads
was not compiled in by default. I know this version supports threads
(although experimental) but I have no clue how to enable it since both
machines do not have the source installed (there were installed from
resp. an RPM and a DEB). Without the source, how can I enable thread
support?
I know I can simply download the 5.6.0 RPM and DEB packages (I like
packages since they automatically uninstall and remove older versions),
but before I go and download 30Mb in total, I'd really rather enable it
in the current version.
TIA,
- Cliff
(replace *MYLASTNAMEHERE* with my last name to reply by email)
------------------------------
Date: Thu, 04 Jan 2001 08:54:25 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Need help configuring on RedHat and Debian
Message-Id: <slrn958ei4.bbm.rgarciasuarez@rafael.kazibao.net>
Clifford Pennock wrote in comp.lang.perl.misc:
> Hi,
>
> I have two Linux machines, one with RedHat 6.2 and one with Debian 2.2.
> Both distributions installed Perl version 5.005_03 by default.
>
> I want to experiment with threads but apparantly, support for threads
> was not compiled in by default. I know this version supports threads
> (although experimental) but I have no clue how to enable it since both
> machines do not have the source installed (there were installed from
> resp. an RPM and a DEB). Without the source, how can I enable thread
> support?
You can't. Download the latest source from CPAN and compile it with the
options you want. Install it in /usr/local or /opt, so you don't have to
uninstall your current Perl and modules.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 04 Jan 2001 13:40:06 GMT
From: msalerno@my-deja.com
Subject: Re: Need help configuring on RedHat and Debian
Message-Id: <931ufk$736$1@nnrp1.deja.com>
In article <930ff7$97e$1@news.news-service.com>,
Clifford Pennock <cliff@*MYLASTNAMEHERE*.nl> wrote:
> Hi,
>
> I have two Linux machines, one with RedHat 6.2 and one with Debian
2.2.
> Both distributions installed Perl version 5.005_03 by default.
>
> I want to experiment with threads but apparantly, support for threads
> was not compiled in by default. I know this version supports threads
> (although experimental) but I have no clue how to enable it since both
> machines do not have the source installed (there were installed from
> resp. an RPM and a DEB). Without the source, how can I enable thread
> support?
>
> I know I can simply download the 5.6.0 RPM and DEB packages (I like
> packages since they automatically uninstall and remove older
versions),
> but before I go and download 30Mb in total, I'd really rather enable
it
> in the current version.
>
> TIA,
>
> - Cliff
> (replace *MYLASTNAMEHERE* with my last name to reply by email)
>
Compile your own, with your own options. This is the main reason that I
do not use rpm's for important stuff.
Matt
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 2 Jan 2001 15:45:11 -0500
From: stanb@panix.com (Stan Brown)
Subject: Nested hash iteration help, please
Message-Id: <92tekn$vj$1@panix2.panix.com>
I have wrtien a script whihc worked OK in testing, but when I throw
production sized volumes of data at I, I see that the preformance needs
improving a bit.
I have an idea how to do that, but I'm strugling with the syntax on a
certain part of it.
I have a global hahs of ashes that looks like this, as dumped by
Data::Dumper:
$VAR1 = 'B600';
$VAR2 = {
'STH' => bless( {}, 'DBI::st' ),
'B600_C_C' => {
'COLUMN' => 'C_CURRENT',
'TAG' => 'B600_C_C'
},
'LAST_DATE' => 'UNKOWN',
'LAST_UPDATE_TIME' => 978459775,
'B600_PF' => {
'COLUMN' => 'PF',
'TAG' => 'B600_PF'
},
'LAST_UPDATE_TIME_ALARMED' => 0,
'B600_C_A' => {
'COLUMN' => 'A_CURRENT',
'TAG' => 'B600_C_A'
},
'B600_C_B' => {
'COLUMN' => 'B_CURRENT',
'TAG' => 'B600_C_B'
}
};
$VAR3 = 'B350';
$VAR4 = {
'STH' => bless( {}, 'DBI::st' ),
'B350_C_B' => {
'COLUMN' => 'B_CURRENT',
....
And so on.
I fill it by iterating throgh it like this:
while (my ( $tbl_key, $ref1) = each %record)
{
# print "tbl_key: $tbl_key\n";
$begin = 0;
while( my ($key2, $ref2) = each %{ $ref1 } )
{
# print "\tkey2: $key2\n";
if(($key2 ne 'LAST_DATE') && ( $key2 ne 'LAST_UPDATE_TIME') && ($key2 ne 'LAST_UPDATE_TIME_ALARMED'))
{
while ( my ( $col_key, $value3) = each %{ $ref2 } )
{
# print "\t\tcol_key: $col_key\n";
# print "\t\tvalue3: $value3\n";
if($col_key eq 'COLUMN')
{
if($begin == 0)
{
$string = "SELECT DSTAMP ";
$begin = 1;
}
$string = join ' ' , $string, ', ' , $value3;
# print("Add column $value3 to select for $tbl_key\n");
}
} # KEY3
}
} # KEY2
That all works fine.
Now as for suing that data, I have a fairly large chunck of code inside
a loop that used to iterate like this:
foreach $key (sort keys(%record))
{
Now inside that loop, I need to iterate through just one (at a time) of
the subhahses.
Something like:
foreach $key2 (sort keys($record{$key}))
{
Which obviosly does not work.
Now I could do teh full nested loop thing here, but I'm striving for
eficency, and I would rather just iterate through what I need to.
Can someon show me how to do this?
------------------------------
Date: 3 Jan 2001 15:09:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Nested hash iteration help, please
Message-Id: <92vfc7$eru$4@mamenchi.zrz.TU-Berlin.DE>
Stan Brown <stanb@panix.com> wrote in comp.lang.perl.misc:
[snippage]
> Now as for suing that data, I have a fairly large chunck of code inside
> a loop that used to iterate like this:
>
>
> foreach $key (sort keys(%record))
> {
>
> Now inside that loop, I need to iterate through just one (at a time) of
> the subhahses.
>
> Something like:
>
> foreach $key2 (sort keys($record{$key}))
> {
>
> Which obviosly does not work.
It works with the right syntax:
foreach $key2 ( sort keys %{ $record{ $key}} ) { ...}
Of course, this supposes you know which $key you want before the
(now superfluous) outer loop starts. If you must search for
the key to use, the best you can do is bail out of the outer loop
after you found it.
Anno
------------------------------
Date: 3 Jan 2001 02:32:08 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Net::FTP question
Message-Id: <92u2v8$7g6$0@216.155.32.238>
right now the code snippet reads thusly
## this doesn't seem to work here.. dunno why. *shrug*
# $ftp->type('binary') or die ("could not change type! $!");
# Set type to binary in case we also decide later to download a file.
$ftp->type('I') or die ("could not change type! $!");
would it make sense to re-write this as
$ftp->type('binary')
or $ftp->type('I')
or die ("could not change type! $!");
?
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Wed, 03 Jan 2001 03:13:11 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: Net::FTP question
Message-Id: <ur555tsiue7dqa612ba652kebs2ga1sq6e@4ax.com>
On 3 Jan 2001 02:32:08 GMT, The WebDragon <nospam@nospam.com> wrote:
>right now the code snippet reads thusly
>
>## this doesn't seem to work here.. dunno why. *shrug*
># $ftp->type('binary') or die ("could not change type! $!");
>
># Set type to binary in case we also decide later to download a file.
>$ftp->type('I') or die ("could not change type! $!");
>
>
>would it make sense to re-write this as
>
>$ftp->type('binary')
> or $ftp->type('I')
> or die ("could not change type! $!");
Well, looking at the actual code of Net::FTP, the type method returns
the following:
If you pass nothing (or more to the point, if the first element of @_
is not defined), the current setting is returned (default value is 'A'
or ASCII).
If the type you pass doesn't work, undef is returned
If the type you pass works, the old setting is returned.
So, it would seem to me that as long as you are passing a defined
value, your modification would work (as there is no type zero to my
knowledge).
'Course, you might consider passing the "I" value first since it works
(and should work across all platforms) and thus, you are eliminating a
transmission/reception/parse with the server.
JH
------------------------------
Date: Wed, 3 Jan 2001 14:21:17 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Net::FTP question
Message-Id: <slrn9556ld.edk.mgjv@martien.heliotrope.home>
On 3 Jan 2001 02:32:08 GMT,
The WebDragon <nospam@nospam.com> wrote:
> right now the code snippet reads thusly
>
> ## this doesn't seem to work here.. dunno why. *shrug*
> # $ftp->type('binary') or die ("could not change type! $!");
$! won't contain an error, will it? $@ will have the error when the
constructor fails, but for anything else I think you'd have to use Debug
mode to see what went wrong, or call the $ftp->message method
(documented in Net::Cmd).
> # Set type to binary in case we also decide later to download a file.
> $ftp->type('I') or die ("could not change type! $!");
>
> would it make sense to re-write this as
>
> $ftp->type('binary')
> or $ftp->type('I')
> or die ("could not change type! $!");
$ftp->binary or die "Couldn't set type to binary", $ftp->message;
Martien
--
Martien Verbruggen |
Interactive Media Division | In the fight between you and the
Commercial Dynamics Pty. Ltd. | world, back the world - Franz Kafka
NSW, Australia |
------------------------------
Date: 3 Jan 2001 07:08:10 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Net::FTP question
Message-Id: <92uj4q$lhb$0@216.155.33.98>
In article <ur555tsiue7dqa612ba652kebs2ga1sq6e@4ax.com>, Jeff Helman
<jhelman@wsb.com> wrote:
| So, it would seem to me that as long as you are passing a defined
| value, your modification would work (as there is no type zero to my
| knowledge).
|
| 'Course, you might consider passing the "I" value first since it works
| (and should work across all platforms) and thus, you are eliminating a
| transmission/reception/parse with the server.
*nods* makes sense. Thanks for the suggestion. :)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 3 Jan 2001 07:14:31 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Net::FTP question
Message-Id: <92ujgn$lhb$1@216.155.33.98>
In article <slrn9556ld.edk.mgjv@martien.heliotrope.home>,
mgjv@tradingpost.com.au wrote:
| $! won't contain an error, will it? $@ will have the error when the
| constructor fails, but for anything else I think you'd have to use Debug
| mode to see what went wrong, or call the $ftp->message method
| (documented in Net::Cmd).
hmmm. wasn't aware of that nuance.. the more you learn the more there is
left to learn. Thanks for the tip
| > # Set type to binary in case we also decide later to download a file.
| > $ftp->type('I') or die ("could not change type! $!");
| >
| > would it make sense to re-write this as
| >
| > $ftp->type('binary')
| > or $ftp->type('I')
| > or die ("could not change type! $!");
|
| $ftp->binary or die "Couldn't set type to binary", $ftp->message;
ahhhhh so *that*'s what it meant.. thanks, that clears up a bit of
confusion.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Sat, 30 Dec 2000 13:57:37 +0100
From: "Ralf" <replynews@bigfoot.com>
Subject: Net::ICQ package
Message-Id: <92km3v$785ge$1@ID-23826.news.dfncis.de>
Hello,
I'm trying to install the Net::ICQ package but it fails at test phase saying
that there's no UIN present. I don't know how to pass them to the @ARGV
array via the CPAN commandline so I modified the test.pl script.
But at test phase it fails again with the following message:
Can't locate object method "band" via package "Math::BigInt" at
blib/lib/Net/ICQ.pm line 1422.
That's line 1421 to 1422 of ICQ.pm:
$code = Math::BigInt->new(@$packet * 0x68656C6C + $cc);
$code = $code->band(Math::BigInt->new(0xFFFFFFFF));
cu Ralf
------------------------------
Date: Tue, 02 Jan 2001 02:30:15 GMT
From: smittod@auburn.edu
Subject: neural networks
Message-Id: <92refn$v1h$1@nnrp1.deja.com>
Is there a perl module that deals with neural networks (there's not one
at CPAN), or a perl-oriented tutorial for building neural networks
anywhere?
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 1 Jan 2001 21:19:41 -0600
From: "Randy Kobes" <randy@theory.uwinnipeg.ca>
Subject: Re: neural networks
Message-Id: <92rhmv$308$1@canopus.cc.umanitoba.ca>
<smittod@auburn.edu> wrote in
message news:92refn$v1h$1@nnrp1.deja.com...
> Is there a perl module that deals with neural networks (there's not one
> at CPAN), or a perl-oriented tutorial for building neural networks
> anywhere?
Hi,
Try searching CPAN via one of the ways suggested at
http://www.cpan.org/ - there's several modules dealing with
neural networks there ....
best regards,
randy kobes
------------------------------
Date: Tue, 02 Jan 2001 03:25:28 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: neural networks
Message-Id: <ISb46.575$B9.189435904@news.frii.net>
In article <92refn$v1h$1@nnrp1.deja.com>, <smittod@auburn.edu> wrote:
>Is there a perl module that deals with neural networks (there's not one
>at CPAN), or a perl-oriented tutorial for building neural networks
>anywhere?
>
Among other things CPAN was able to show me
AI::NeuralNet::BackProp
And the readme file for that contained
** What is this?
AI::NeuralNet::BackProp is a simply back-propagation,
feed-foward neural network designed to learn using
a generalization of the Delta rule and a bit of Hopefield
theory.
I think that your searching technique was not as complete as you
are trying to lead us to believe. Or then again maybe it was :-X
--
This space intentionally left blank
------------------------------
Date: 31 Dec 2000 03:21:56 GMT
From: nova@moo.pl (Mariusz Drozdziel)
Subject: Re: New posters to comp.lang.perl.misc
Message-Id: <slrn94t9ik.cj2.nova@salceson.netwerke.org>
Czesc,
Dnia Mon, 18 Dec 2000 17:30:27 -0000, Greg Bacon napisał:
> Posts per poster: 1.6
> median: 1 post
> mode: 1 post - 123 posters
> s: 1.4 posts
> Message size: 1841.4 bytes
[..]
Can i get script, which is generating this?
--
Mariusz.
== Mariusz Drozdziel <M.Drozdziel@elka.pw.edu.pl> * 2:482/52@fidonet ==
------------------------------
Date: Wed, 03 Jan 2001 19:15:27 +0100
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: Newbie - run perl script from c program
Message-Id: <3A536C3F.D8F09BED@mssys.com>
Joona I Palaste wrote:
> Chris <spudmuf@my-deja.com> scribbled the following:
> > I'm really new to this so any help would be appreciated. I need to
> > call a perl script from my c program and return an integer from the
> > perl and read it in my c code. I assumeed that I should use
> > the "system" function in c but dont know first how to return the code
> > in the perl and second how to read it in c.
>
> First question: comp.lang.perl, anyone?
comp.lang.perl has been deleted in May 1995. ;)
The right adress to guide Chris to would be comp.lang.perl.misc.
F'up set
> Second question: on most platforms, the code is returned from the
> function system(). Example:
> int code;
> code=system("perl the_wonderful_program_that_Chris_made.pl");
> printf("OK user, Perl said this code: %d\n", code);
To the OP:
To get the above to work, you might need some reading:
perldoc -f exit
Furthermore it is possible to embed the Perl interpreter in your
C-Program:
perldoc perlembed
But this might be (far) beyond your scope...
Cheers
Wolfgang
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 5234
**************************************