[30282] in Perl-Users-Digest
Perl-Users Digest, Issue: 1525 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 9 14:14:28 2008
Date: Fri, 9 May 2008 11:14:20 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 9 May 2008 Volume: 11 Number: 1525
Today's topics:
Perl & Win32 & RHEL neelsmail@rediffmail.com
Re: Perl & Win32 & RHEL <sisyphus359@gmail.com>
Re: Perl DBI Module: SQL query where there is space in ambarish.mitra@gmail.com
Re: Perl DBI Module: SQL query where there is space in <achimpeters@gmx.de>
Re: Perl DBI Module: SQL query where there is space in <tzz@lifelogs.com>
Re: Perl DBI Module: SQL query where there is space in <szrRE@szromanMO.comVE>
Re: Perl DBI Module: SQL query where there is space in <jurgenex@hotmail.com>
Re: Selected cipher type not supported by server <smallpond@juno.com>
Re: Some sort of scoping problem <zen13097@zen.co.uk>
Re: Some sort of scoping problem <zen13097@zen.co.uk>
Re: Some sort of scoping problem <benkasminbullock@gmail.com>
Re: Some sort of scoping problem <zen13097@zen.co.uk>
Re: state of Erlang? <bugbear@trim_papermule.co.uk_trim>
Re: state of Erlang? <cartercc@gmail.com>
Re: Why Larry Wall uses this background color #e0ff00 f <brian.d.foy@gmail.com>
Re: Why Larry Wall uses this background color #e0ff00 f <nospam-abuse@ilyaz.org>
Re: Why Larry Wall uses this background color #e0ff00 f <benkasminbullock@gmail.com>
Re: Why Larry Wall uses this background color #e0ff00 f <pue@gmx.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 9 May 2008 04:38:45 -0700 (PDT)
From: neelsmail@rediffmail.com
Subject: Perl & Win32 & RHEL
Message-Id: <5117e247-4127-4aa1-a57c-d57073c5ce49@u6g2000prc.googlegroups.com>
Hi,
I am _very_ new to Perl (third day to be precise) so apologies in
advance for the incorrectness in post below.
I am trying to run a perl script on _RHEL 5.1_. That script, when ran,
throws error "Cannot load Win32::OLE: Can't locate Win32/OLE.pm in
@INC..". I have managed to download few other dependencies when I got
the messages about missing dependencies from net (from different
sites). But, as far as Win32 is concerned, I don't seem to find a site
where I can download Win32 rpm.
Could you let me know where I can get it from (if it's a paid service/
module I will have to ask the company I work for)? If you are not
aware, could you point me to the correct source?
Thanks,
Vishvesh
------------------------------
Date: Fri, 9 May 2008 05:00:04 -0700 (PDT)
From: sisyphus <sisyphus359@gmail.com>
Subject: Re: Perl & Win32 & RHEL
Message-Id: <ddc4cca3-f5e7-45b7-a192-040b8008b8d3@h1g2000prh.googlegroups.com>
On May 9, 9:38=A0pm, neelsm...@rediffmail.com wrote:
=2E
=2E
> I am trying to run a perl script on _RHEL 5.1_. That script, when ran,
> throws error "Cannot load Win32::OLE: Can't locate Win32/OLE.pm in
> @INC..".
Win32::OLE works only on MS Windows.
For use on linux, you'll need to rewrite the script so that it no
longer makes use of Win32::OLE.
Cheers,
Rob
------------------------------
Date: Fri, 9 May 2008 00:26:20 -0700 (PDT)
From: ambarish.mitra@gmail.com
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <3480de43-d7a9-4c0f-b25a-f985ec0e8625@j33g2000pri.googlegroups.com>
On May 8, 9:59 pm, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
wrote:
> ambarish.mi...@gmail.com wrote:
> > [Apparently using DBD::CSV]
>
> > my $sth = $dbh->prepare("select * from report where [Display Type]
> > =MultiLineText");
> > ...
> > SQL ERROR: Bad table or column name '[Display Type]' has chars not
> > alphanumeric or underscore!
> > ...
> > Question: What is the way to fire this command in PERL where the field
> > name (and value as well) can have spaces?
>
> See col_names and skip_first_row inhttp://search.cpan.org/~jzucker/DBD-CSV-0.22/lib/DBD/CSV.pm
>
> I think you can use these to assign legal column names without requiring
> changes to the CSV.
>
> --
> RGB
Absolutely. Bang on target. This works. We have to set up our col
names without spaces using col_names like:
$dbh->{'csv_tables'}->{'report'} = {'file' => 'report.csv',
'col_names' =>
["Attr","Name","S","Type"]
};
After this, trying to do "prepare" (with where Type=) works perfectly.
Thanks to Ben and others who spent some time on this question.
There are some people quarreling over non-issues in this thread.
Requesting them to take that fight offline so that the thread contents
remain focussed and helpful for generations to come.
------------------------------
Date: Fri, 09 May 2008 16:15:37 +0200
From: Achim Peters <achimpeters@gmx.de>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <48245c89$0$6545$9b4e6d93@newsspool3.arcor-online.net>
Andrew DeFaria schrieb:
> Jürgen Exner wrote:
>> And you honestly believe your 120+ lines long signature (quoted in
>> full below)
> Looks like somebody needs to learn what a signature is...
> --------------030103090100010400060503
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
Please stop posting HTML and/or MIME. TIA!
Bye
Achim
------------------------------
Date: Fri, 09 May 2008 09:34:40 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <86zlqzo8an.fsf@lifelogs.com>
On Thu, 08 May 2008 21:59:05 -0700 Andrew DeFaria <Andrew@DeFaria.com> wrote:
AD> Jürgen Exner wrote:
>> And you honestly believe your 120+ lines long signature (quoted in
>> full below)
AD> Looks like somebody needs to learn what a signature is...
Yes, please do.
Ted
------------------------------
Date: Fri, 9 May 2008 09:48:56 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <g01v9o0g8s@news4.newsguy.com>
Achim Peters wrote:
> Andrew DeFaria schrieb:
>> Jürgen Exner wrote:
>>> And you honestly believe your 120+ lines long signature (quoted in
>>> full below)
>> Looks like somebody needs to learn what a signature is...
>
>> --------------030103090100010400060503
>> Content-Type: text/html; charset=ISO-8859-1
>> Content-Transfer-Encoding: 7bit
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html>
>
> Please stop posting HTML and/or MIME. TIA!
It's a multiple format posting; one section for html and one for plain
text. If I set my reader to use plain-text only, I don't see html, just
the plain text version. Can your reader not be configured similarly? If
you only wish to see plain text then set your reader to display only
plain text and then you wont have a problem.
--
szr
------------------------------
Date: Fri, 09 May 2008 16:57:57 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <3c0924d24c6597j2qgn7l88mqnhiohu5v6@4ax.com>
Andrew DeFaria <Andrew@DeFaria.com> wrote:
>Jürgen Exner wrote:
>> And you honestly believe your 120+ lines long signature (quoted in
>> full below)
>Looks like somebody needs to learn what a signature is...
Isn't it the part of a posting that is following the dash-dash-blank
line? And that is supposed to be 4 lines max?
Well, your's over 120+ lines and contained pretty much no information at
all.
jue
------------------------------
Date: Fri, 09 May 2008 11:59:35 -0400
From: smallpond <smallpond@juno.com>
Subject: Re: Selected cipher type not supported by server
Message-Id: <20632$482474f4$23879@news.teranews.com>
lovecreatesbea...@gmail.com wrote:
> On May 8, 11:09 pm, smallpond <smallp...@juno.com> wrote:
>
>>lovecreatesbea...@gmail.com wrote:
>>
>>>Hi,
>>
>>>I'm getting "Selected cipher type not supported by server" error on
>>>this line
>>
>>> $cnn = Net::SSH::Perl->new($host);
>>
>>Are you tring to connect to an SSH-1 or SSH-2 host?
>>If not sure, report the error(s) you get from trying each.
>
>
> Hi, Thank you.
>
> I tried the following ciphers one by one and got the same error
> message: "Selected cipher type not supported by server Options ".
>
>
>>>The error occurs even when I specify all IDEA, DES, DES3, Blowfish,
>>>arcfour, blowfish-cbc, and 3des-cbc like this:
>
>
>>> $cnn = Net::SSH::Perl->new($host, cipher => "IDEA");
>
>
>
> I manually ssh login the host and check the version. Is OpenSSH_4.6p1
> an SSH1 or SSH2 implementation, or both?
>
> root@bx1200:/etc/ssh# ssh -V
> OpenSSH_4.6p1, OpenSSL 0.9.8d 28 Sep 2006
> root@bx1200:/etc/ssh#
>
> root user ssh login is enabled defaultly, right? So I don't su root,
> do I?
>
I normally disable root login, but its optional.
> The Cipher lines in ssh_config file are commented out as following.
> How can know its cipher settings?
>
> root@bx1200:/etc/ssh# grep Cipher ssh_config
> # Cipher 3des
> # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-
> cbc,arcfour,aes192-cbc,aes256-cbc
> root@bx1200:/etc/ssh#
>
> [ Do I need to in my perl script issue "ssh -c <cipher_spec>" command
> before ...? Absolutely not! I am not ssh-connected with the host. What
> can I do? ]
The rule when you don't know what's wrong is to step back to the
earliest place that you get an error.
Most ssh supports protocol type 1 and 2 these days, but to narrow
down your problem, try each each individually. Let the cipher type
be the default for that protocol. So try each of these separately:
$cnn = Net::SSH::Perl->new($host, -protocol => '1');
$cnn = Net::SSH::Perl->new($host, -protocol => '2');
You may get a different error from each one which would be a clue
for what's wrong.
--S
** Posted from http://www.teranews.com **
------------------------------
Date: 09 May 2008 09:06:22 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: Some sort of scoping problem
Message-Id: <4824140e$0$2483$da0feed9@news.zen.co.uk>
On Mon, 5 May 2008 18:04:09 -0700 (PDT), Mintcake <tony@skelding.co.uk> wrote:
> This is *not* a trivial problem. If you know Perl well, please take a
> bit of time to look at this.
>
> I have the following code in a file Foo.pm
>
> package Foo;
>
> my @xyzzy = (1,2,3);
>
> sub new {
> my $self = bless {}, shift;
> $self->ini('xyzzy');
> print \@xyzzy, ' ', scalar @xyzzy;
> print $self->{xyzzy}, ' ', scalar @{$self->{xyzzy}};
> }
>
> sub ini {
> my ($self, $field) = @_;
> eval "\$self->{$field} = \\\@$field";
> }
Others have explained the problem and pointed out why you
should "use warnings;".
Here are a couple of suggestions to solve your problem:
1. Use a package variable instead of a lexical:
our @xyzzy = ( 1, 2, 3 );
2. Use a lookup table:
my %fields = (
xyzzy => [ 1, 2, 3 ],
);
sub ini {
my ( $self, $field ) = @_;
$self->{$field} = $fields->{field};
}
------------------------------
Date: 09 May 2008 09:08:23 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: Some sort of scoping problem
Message-Id: <48241487$0$2483$da0feed9@news.zen.co.uk>
On 09 May 2008 09:06:22 GMT, Dave Weaver <zen13097@zen.co.uk> wrote:
> sub ini {
> my ( $self, $field ) = @_;
> $self->{$field} = $fields->{field};
Oops! That should, of course, be:
$self->{$field} = $fields{$field};
------------------------------
Date: Fri, 9 May 2008 10:21:03 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Some sort of scoping problem
Message-Id: <g018if$au$1@ml.accsnet.ne.jp>
On Fri, 09 May 2008 09:06:22 +0000, Dave Weaver wrote:
> Others have explained the problem and pointed out why you should "use
> warnings;".
It has nothing to do with "use warnings;".
> Here are a couple of suggestions to solve your problem:
I'm sorry but you have missed the point of the question and the answers
given.
------------------------------
Date: 09 May 2008 11:03:07 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: Some sort of scoping problem
Message-Id: <48242f6b$0$2481$da0feed9@news.zen.co.uk>
Ben Bullock <benkasminbullock@gmail.com> wrote:
>
> > Here are a couple of suggestions to solve your problem:
>
> I'm sorry but you have missed the point of the question and the answers
> given.
>
I admit that may be the case, but I am none the wiser for your reply.
------------------------------
Date: Fri, 09 May 2008 09:25:29 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: state of Erlang?
Message-Id: <zdSdnekWX_bkl7nVnZ2dneKdnZydnZ2d@posted.plusnet>
cartercc wrote:
> Does a language need some sort of critical mass
> before it collects a big following?
Yes.
BugBear
------------------------------
Date: Fri, 9 May 2008 06:01:06 -0700 (PDT)
From: cartercc <cartercc@gmail.com>
Subject: Re: state of Erlang?
Message-Id: <935cd8a8-35fc-4b9b-9f6e-775eafafef41@k37g2000hsf.googlegroups.com>
On May 9, 4:25 am, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
> > Does a language need some sort of critical mass
> > before it collects a big following?
>
> Yes.
In this case, how do you measure the critical mass? Compare Pascal,
which had a good run in the academic community but never escaped the
ivyed walls, with Ada which should have had a critical mass in the
military-industrial complex but somehow never made it into the
mainstream.
On the other hand, you have languages like C, Perl, Python, and Ruby
that had their starts in backrooms but have generated (at least!) a
lot more buzz than Pascal or Ada. What's the difference between a
language that starts off with a large in-built mass that falls by the
wayside, and a language that starts off with nothing but generates a
respectfull presence in the market?
According to TIOBE, the top four or so languages have 70-80 percent of
the market, depending on how you count it: Java, C/C++, Basic inc. VB,
and Perl, with PHP and C# coming into the mix.
------------------------------
Date: Fri, 09 May 2008 10:31:35 +0200
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: Why Larry Wall uses this background color #e0ff00 for his web page
Message-Id: <090520081031352803%brian.d.foy@gmail.com>
In article
<d1e4e811-b6e5-462a-b3f4-242dc644d0cf@q27g2000prf.googlegroups.com>,
<"lovecreatesbea...@gmail.com"> wrote:
> http://www.wall.org/~larry/perl.html,
>
> just curious, but this is odd, and does harm the eyes : 0, what do u
> think?
Maybe because it is several years out of date and you should look at it
anymore. :)
------------------------------
Date: Fri, 9 May 2008 17:37:08 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Why Larry Wall uses this background color #e0ff00 for his web page
Message-Id: <g02244$5nk$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
lovecreatesbea...@gmail.com
<lovecreatesbeauty@gmail.com>], who wrote in article <d1e4e811-b6e5-462a-b3f4-242dc644d0cf@q27g2000prf.googlegroups.com>:
> http://www.wall.org/~larry/perl.html,
>
> just curious, but this is odd, and does harm the eyes : 0, what do u
> think?
The other colors are all trademarked. (See wrappings of PostIt (TM).)
Hope this helps,
Ilya
------------------------------
Date: Fri, 9 May 2008 11:22:40 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Why Larry Wall uses this background color #e0ff00 for his web page
Message-Id: <g01c60$j8$1@ml.accsnet.ne.jp>
On Thu, 08 May 2008 23:20:13 -0700, lovecreatesbea...@gmail.com wrote:
> http://www.wall.org/~larry/perl.html,
>
> just curious, but this is odd, and does harm the eyes : 0, what do u
> think?
That colour scheme is not as bad as the one on cpanforum.com: blue on
grey, with red and yellow highlights??? Aaargh! Another dreadful design
is the one on perlmonks.org, whose colours come out fairly normal but
which guarantees to make every single font the wrong size.
A useful trick for browsing the WWW, if you have Firefox, is
View -> Page Style -> No Style
It works on removing Larry Wall's hideous colour scheme, and on
cpanforum.com, but it doesn't help much with perlmonks.org.
------------------------------
Date: Fri, 09 May 2008 17:56:45 +0200
From: =?ISO-8859-1?Q?Andreas_P=FCrzer?= <pue@gmx.net>
Subject: Re: Why Larry Wall uses this background color #e0ff00 for his web page
Message-Id: <68ja8qF2tigb9U1@mid.individual.net>
lovecreatesbea...@gmail.com schrieb:
> http://www.wall.org/~larry/perl.html,
>
> just curious, but this is odd, and does harm the eyes : 0, what do u
> think?
>
On http://www.wall.org/~larry/ he explains it, right beside his pictures
(and in the 'Web and CGI' part). What else is there to say? ;)
Greetings,
Andreas Pürzer
--
Have Fun,
and if you can't have fun,
have someone else's fun.
The Beautiful South
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 1525
***************************************