[25424] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7669 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 18 18:05:41 2005

Date: Tue, 18 Jan 2005 15:05:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 18 Jan 2005     Volume: 10 Number: 7669

Today's topics:
    Re: "Found Perl" (John M. Gamble)
    Re: "Found Perl" <bik.mido@tiscalinet.it>
    Re: [perl-python] 20050118 keyed list <tassilo.von.parseval@rwth-aachen.de>
    Re: [perl-python] 20050118 keyed list <reinhold-birkenfeld-nospam@wolke7.net>
    Re: Array generation <jgibson@mail.arc.nasa.gov>
        How do I force a specific compiler in Configure/make <spamntrapf@yahoo.com>
    Re: How do I force a specific compiler in Configure/mak <spamtrap@dot-app.org>
    Re: How do I force a specific compiler in Configure/mak <kalinaubears@iinet.net.au>
    Re: How do I force a specific compiler in Configure/mak <spamntrapf@yahoo.com>
    Re: How do I force a specific compiler in Configure/mak <spamntrapf@yahoo.com>
    Re: Low level data manipulation in Perl <perl@lennychallis.co.uk>
    Re: Low level data manipulation in Perl <perl@lennychallis.co.uk>
    Re: MAP Question <bik.mido@tiscalinet.it>
    Re: Memory leak with PUSHMARK and PUTBACK (Ton Hospel)
    Re: Need help with Perl and MySQL database data load <oscar@nowhere.com>
    Re: Need help with Perl and MySQL database data load <toreau@gmail.com>
    Re: newbie question about documentation xhoster@gmail.com
    Re: newbie question about documentation <tadmc@augustmail.com>
    Re: newbie question about documentation (Anno Siegel)
    Re: newbie question about documentation <flavell@ph.gla.ac.uk>
        Perl6 book ioneabu@yahoo.com
    Re: Perl6 book <mritty@gmail.com>
        pod and formatting? <mikee@mikee.ath.cx>
    Re: pod and formatting? <shawn.corey@sympatico.ca>
    Re: similar articles algorithm based on numeric indexin (Anno Siegel)
    Re: simple encryption/decryption <x3v0-usenet@yahoo.com>
    Re: simple encryption/decryption <peter@pjb.dpiwe.tas.gov.au>
        The world's shortest 'Hello World!' program: a proposal <larry_wallet@yahoo.com>
    Re: The world's shortest 'Hello World!' program: a prop <x3v0-usenet@yahoo.com>
    Re: The world's shortest 'Hello World!' program: a prop <perl@lennychallis.co.uk>
    Re: The world's shortest 'Hello World!' program: a prop <1usa@llenroc.ude.invalid>
    Re: Update statement with Perl DBI for MySQL 5.0 <glex_nospam@qwest.invalid>
        Why doesn't this work? <IneverReadAnythingSentToMe@hotmail.com>
    Re: Why doesn't this work? <news@chaos-net.de>
    Re: Why doesn't this work? <1usa@llenroc.ude.invalid>
    Re: wildcard the port in bind <alex_the_hart@yahoo.com>
        Win32::api doesn't work? <dontmewithme@got.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 18 Jan 2005 20:02:59 +0000 (UTC)
From: jgamble@ripco.com (John M. Gamble)
Subject: Re: "Found Perl"
Message-Id: <csjq1j$eul$1@e250.ripco.com>

In article <170120052110468477%comdog@panix.com>,
brian d foy  <comdog@panix.com> wrote:
>I'm creating "Found Perl"[0], a little, virtual Perl memorabilia museum.
>I've got a lot of stuff to include, and I bet the community has orders
>of magnitude more.
>

Is there a shot of Adam Back's RSA In Four Lines of Perl around?
Particularly of the mailing label version Duncan Frissell designed?
There was a photograph of it in the NYT in April of 1995 when
the NYT covered a convention on cryptographic technology.

-- 
	-john

February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.


------------------------------

Date: Tue, 18 Jan 2005 23:14:07 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: "Found Perl"
Message-Id: <vk0ru0ht7g685g2bm7p83207sg6042sas8@4ax.com>

On Mon, 17 Jan 2005 21:10:46 -0600, brian d foy <comdog@panix.com>
wrote:

>   * The temporary camel tattoo I was giving out at one of the Perl
>       conferences

What about Perlguy's (IIRC the guy's "name") non-temporary one?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 18 Jan 2005 18:14:18 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: [perl-python] 20050118 keyed list
Message-Id: <slrncuqgva.qp.tassilo.von.parseval@localhost.localdomain>

Also sprach Jürgen Exner:

> Xah Lee wrote:

>> © %a = ('john',3, 'mary', 4, 'jane', 5, 'vicky',7);
>> © use Data::Dumper qw(Dumper);
>> © print Dumper \%a;
>
> Wow, my compliments. The very first time that using Data::Dumper actually 
> may do something useful (formats the data more nicely). Still, why you are 
> passing a reference is beyond me.

How else would you use 'Dumper' on a hash?

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


------------------------------

Date: Tue, 18 Jan 2005 18:45:49 +0100
From: Reinhold Birkenfeld <reinhold-birkenfeld-nospam@wolke7.net>
Subject: Re: [perl-python] 20050118 keyed list
Message-Id: <3550aeF4hi6bhU1@individual.net>

Jürgen Exner wrote:

>> © # see "perldoc perldata" for an unix-styled course.
> 
> Excuse me? Do you mind explaining where exactly perldata is "Unix-styled"?

Remember: Perl == Unix == Satan.

Reinhold


------------------------------

Date: Tue, 18 Jan 2005 11:35:50 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Array generation
Message-Id: <180120051135507142%jgibson@mail.arc.nasa.gov>

In article <slrncugpct.5am.abigail@alexandra.abigail.nl>, Abigail
<abigail@abigail.nl> wrote:

> poopdeville@gmail.com (poopdeville@gmail.com) wrote on MMMMCLV September
> MCMXCIII in <URL:news:1105748638.983929.45900@c13g2000cwb.googlegroups.com>:
> -:  Hi everybody.  I'm a bit new to Perl, and I'm having some trouble
> -:  getting it to do exactly what I'd like it to.  Given an array of
> -:  numerals @data, I'm trying to generate a new array whose elements are
> -:  the fractions of minima over maxima of adjacent pairs in @data.  Here's
> -:  my attempt (I've defined min and max elsewhere -- they compute the
> -:  minimum and maximum of arrays of arbitrary length, for generality)
> -:  
> -:  @data = (1,2,4,8,16)
> -:  sub RR {
> -:  my $upper = $#_;
> -:  @LOF = min(($_[0], $_[1])) / max(($_[0], $_[1]));
> -:  for $i (1 .. $upper - 1) {
> -:  push @LOF,  min($_[$i], $_[$i+1]) / max($_[$i], $_[$i+1]);
> -:  }
> -:  print @LOF, "\n";
> -:  }
> -:  
> -:  RR(@data);
> 
> 
> Aarg. Another code snippet without identation. That's it.
> 
> Killfile, meet google groups. Google groups, meet my killfile.

I received this yesterday in response to my bug submission. Now,
doesn't this make you feel better:


Date: Mon, 17 Jan 2005 16:13:38 -0800
From: groups-support@google.com
To: jgibson@mail.arc.nasa.gov
Subject: Re: [#19341730] GG2 does not preserve indenting
X-Junkmail-Status: score=10/60, host=arc-relay2.arc.nasa.gov

Hi Jim,

Thank you for your note. We apologize for our delay in responding to
your
email.

We appreciate your suggestion regarding the removal of blank lines and
extra spaces on Google Groups Beta. We will keep your feedback in mind
as
we work to improve Google Groups Beta.

Regards,
The Google Team


Original Message Follows:
------------------------
From: jgibson@mail.arc.nasa.gov
Subject: GG2 does not preserve indenting
Date: Mon, 10 Jan 2005 18:42:27 -0000

The indenting of program source code posted using GG2 is not preserved.
Leading whitespace (tabs and spaces) is deleted. The indenting of source
code is used to indicate program structure and makes programs much more
readable. The absence of indenting reduces the probability of a GG2 user
getting assistance with a programming problem.


Language: en
Name: Jim Gibson
topic: bug


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---


------------------------------

Date: 18 Jan 2005 11:05:52 -0800
From: "Jake" <spamntrapf@yahoo.com>
Subject: How do I force a specific compiler in Configure/make
Message-Id: <1106075152.371981.81700@f14g2000cwb.googlegroups.com>

IBM RISC/6000
AIX 5.1 - 64-bit
Oracle 9i - 9.2.0.4 - 64-bit
Perl 5.8.6
DBI 1.46
DBD:Oracle 1.16

Hi Folks.

Last week I posted on comp.lang.perl.modules with questions
on compiling DBD:oracle. I have found it most stubborn in
whatever options I have chosen for perl and DBI - the make
test for DBD:oracle fails no matter what I have done in perl
and DBI (which passed all tests and successfully installed.)

One common factor to the failures: The command "perl
Makefile.PL" always starts with a warning:

Warning: You will may need to rebuild perl using the xlc_r compiler.^G
You may also need do: ORACCENV='cc=xlc_r'; export ORACCENV
Also see the README about the -p option

I have tried several options in an attempt to force perl to
get compiled with this xlc_r compiler:

- Configure -Dcc=xlc_r (plus other options)
- export ORACCENV=xlc_r; Configure ...
- export ORACCENV='cc=xlc_r; Configure ...

There are each from different sources, like README.aix for DBD:oracle
and the above warning.

After each of these attempts, I looked into the Makefile and
still found:
CC=cc_r

At one point I even edited the Makefile manually and forced
CC=xlc_r .
When the make started, I see it running cc_r again.

What can I do to force Configure to specify the compiler of
my choice inthe Makefile and have it obeyed throutout the
process.  And when I'm over that hurdle, will that choice of
compiler automatically propagate to compilation of DBI and
DBD?

If it's in the README or INSTALL file, I messed it. A search
of these file for the word "compile" did not turn up any
useful option.

BTW, the README (for DBD) has scant information about the -p
option and I'm not experiencing core dumps anyway.
Thanks for any help here.

    -- Jacob (JSalomon at bn.com)



------------------------------

Date: Tue, 18 Jan 2005 15:39:22 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: How do I force a specific compiler in Configure/make
Message-Id: <GP-dnckYWaeb6XDcRVn-jQ@adelphia.com>

Jake wrote:

> I have tried several options in an attempt to force perl to
> get compiled with this xlc_r compiler:
> 
> - Configure -Dcc=xlc_r (plus other options)
> - export ORACCENV=xlc_r; Configure ...
> - export ORACCENV='cc=xlc_r; Configure ...

 ...

> At one point I even edited the Makefile manually and forced
> CC=xlc_r .

 ...

> What can I do to force Configure to specify the compiler of
> my choice inthe Makefile and have it obeyed throutout the
> process.

Normally, you'd do that with the CC environment variable. That's not a
unique "Perl thing" at all, it's used pretty much everywhere.

    export CC=/where/ever/xlc_r

> And when I'm over that hurdle, will that choice of
> compiler automatically propagate to compilation of DBI and
> DBD?

It should, unless you have a CC environment variable. That might override it
- I haven't checked.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


------------------------------

Date: Tue, 18 Jan 2005 21:08:20 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: How do I force a specific compiler in Configure/make
Message-Id: <41ed8a47$0$16202$5a62ac22@per-qv1-newsreader-01.iinet.net.au>

Jake wrote:

> 
> I have tried several options in an attempt to force perl to
> get compiled with this xlc_r compiler:
> 
> - Configure -Dcc=xlc_r (plus other options)

Afaik, that should work - unless perhaps there's a config.sh or a
Policy.sh from a previous run of 'Configure' sitting there. But if
you're starting afresh, then that should do it. At least that's what the
INSTALL file says - and I can't find anything in README.aix to
contradict INSTALL.

If you're sure that there is no interference from a previous run of
'Configure', then maybe the porters list can help - if you don't find
the answer here.

Cheers,
Rob



-- 
To reply by email u have to take out the u in kalinaubears.



------------------------------

Date: 18 Jan 2005 14:36:13 -0800
From: "Jacob" <spamntrapf@yahoo.com>
Subject: Re: How do I force a specific compiler in Configure/make
Message-Id: <1106087773.894100.143000@c13g2000cwb.googlegroups.com>

Sherm et al,

I'm sorry to report that neither of the following has gotten
the make to work with the xlc_r compiler:

- export CC=xlc_r
- Configure -DCC=xlc_r

The make is now proceeding with its chosen compiler, cc_r
and there seems to be nothing I can do to stop it.  So if
the DBD:oracle really depends on the xlc_r compiler, I would
be wiser to pack it in.

I was recently informed by the one person in my company who
has gotten perl working: He realized he's using a 32-bit
compiled perl alfter all.  I have been using  Configure
options  -Dusethreads and -Duse64bitall.  The xlc_r compiler
compiles 32-bit by default. I wonder if this problem would
all go away if I gave up on the 64-bit perl.

And if I do go the 32-bit route, what consequence will it
have when I try to compile the DBD:oracle against a 64-bit
database?

Thanks.

    -- Jacob JSalomon at bn.com



------------------------------

Date: 18 Jan 2005 14:54:20 -0800
From: "Jacob" <spamntrapf@yahoo.com>
Subject: Re: How do I force a specific compiler in Configure/make
Message-Id: <1106088860.157522.9610@z14g2000cwz.googlegroups.com>

I wrote:
>>I have tried several options in an attempt to force
>>perl to get compiled with this xlc_r compiler:
>>
>> - Configure -Dcc=xlc_r (plus other options)

Rob (AKA Sisyphus) wrote:

>Afaik, that should work - unless perhaps there's a
>config.sh or a Policy.sh from a previous run of 'Configure'
>sitting there. But if you're starting afresh, then that
>should do it. At least that's what the INSTALL file says
>and I can't find anything in README.aix to contradict
>INSTALL.

Rob,

before each new Configure, I run "make realclean" and rm -rf
the whole blessed directory in which I had untarred the perl
tar file , I then untar it afresh.  The "make realclean"  is
pure unnecessary paranoia.  But there's no config.sh or
policy.sh to force my compiler any which way before I
start...  I looked into policy.sh before the make.  I did
not find anything that looks like compiler control, though I
may have missed it.

There's nothing in /tmp that looks like today's activity.
(/tmp/fcgi_49346 says nothing I can decipher.)

How much cleaner can a guy get? :-)
Thanks.

    -- Jacob JSalomon at bn . com



------------------------------

Date: Tue, 18 Jan 2005 17:30:14 -0000
From: "Leonard Challis" <perl@lennychallis.co.uk>
Subject: Re: Low level data manipulation in Perl
Message-Id: <csjh2s$fc6$1@newsg2.svr.pol.co.uk>

I am referring to most people in this group who aren't newbies. If you do 
plenty of searching first and then ask a question you will still get flamed. 
People seem to enjoy flaming each other in this group. It's quite sad 
really. I fully agree with people just posting "I cant do it how do i do 
it!" questions, but when people show what they have searched already and why 
they are still struggling do they deserve being flamed still?

Lenny Challis

"Tad McClellan" <tadmc@augustmail.com> wrote in message 
news:slrncuq2dt.2qk.tadmc@magna.augustmail.com...
> Leonard Challis <perl@lennychallis.co.uk> wrote:
>> You don'tseem to get me straight...
>
>
> Who is the "you" that you refer to?
>
> The only attribution you've provided is yourself.
>
> Are you talking to yourself?
>
> Please provide an attribution when you quote someone, so that folks
> can tell who said what.
>
>
>> don't moan.
>
>
> Consider following your own advice.
>
>
> -- 
>    Tad McClellan                          SGML consulting
>    tadmc@augustmail.com                   Perl programming
>    Fort Worth, Texas 




------------------------------

Date: Tue, 18 Jan 2005 18:17:02 -0000
From: "Leonard Challis" <perl@lennychallis.co.uk>
Subject: Re: Low level data manipulation in Perl
Message-Id: <csjjql$1q8$1@news6.svr.pol.co.uk>

"Leonard Challis" <perl@lennychallis.co.uk> wrote in message 
news:csjh2s$fc6$1@newsg2.svr.pol.co.uk...
>I am referring to most people in this group who aren't newbies. If you do 
>plenty of searching first and then ask a question you will still get 
>flamed. People seem to enjoy flaming each other in this group. It's quite 
>sad

> really. I fully agree with people just posting "I cant do it how do i do
                      ^disagree (typo)
> it!" questions, but when people show what they have searched already and 
> why they are still struggling do they deserve being flamed still?
>
> Lenny Challis
>
> "Tad McClellan" <tadmc@augustmail.com> wrote in message 
> news:slrncuq2dt.2qk.tadmc@magna.augustmail.com...
>> Leonard Challis <perl@lennychallis.co.uk> wrote:
>>> You don'tseem to get me straight...
>>
>>
>> Who is the "you" that you refer to?
>>
>> The only attribution you've provided is yourself.
>>
>> Are you talking to yourself?
>>
>> Please provide an attribution when you quote someone, so that folks
>> can tell who said what.
>>
>>
>>> don't moan.
>>
>>
>> Consider following your own advice.
>>
>>
>> -- 
>>    Tad McClellan                          SGML consulting
>>    tadmc@augustmail.com                   Perl programming
>>    Fort Worth, Texas
>
> 




------------------------------

Date: Tue, 18 Jan 2005 23:14:02 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: MAP Question
Message-Id: <3d0ru01mc087cmfo1pad6lslv05jrsqtvi@4ax.com>

On 17 Jan 2005 17:31:19 -0800, "Peroli" <peroli@gmail.com> wrote:

>hi george,
>If Map bugs you, why dont you try grep. It works.

map() and grep() do different things, even if they're indeed cousins
each other. There's nothing in the OP's post that suggests he may be
interested in the latter, but of course it would be important to
understand what he does really want or what he expected out of map().

As a side note I tried to draw the attention of the OP to the
inutility spelling "map" incorrectly only to, presumably, emphasize
it. I don't see no need to capitalize it either, nay, to be fair it
seems even worse than uppercasing it altogether.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 18 Jan 2005 18:14:25 +0000 (UTC)
From: me-02@ton.iguana.be (Ton Hospel)
Subject: Re: Memory leak with PUSHMARK and PUTBACK
Message-Id: <csjjm1$gc9$1@post.home.lunix>

In article <cs66lt$uot$1@fourier.suse.de>,
	Uwe Gansert <info@gansert.info> writes:
> Hi,
> 
> I'm fighting with using Perl Modules from within C programms.
> While digging into that topic, I'm wondering why the following simple C
> function is a memory leak:
> 
> 
> void leak() {
>     dSP;
>     PUSHMARK(SP);
>     PUTBACK;
> }
> 
> calling this function in an endless loop, eats up all free memory.
> perl -v => "This is perl, v5.8.5 built for i586-linux-thread-multi"

Nothing ever consumes the marks, so you keep the markstack growing.


------------------------------

Date: Tue, 18 Jan 2005 16:34:06 GMT
From: Oscar <oscar@nowhere.com>
Subject: Re: Need help with Perl and MySQL database data load
Message-Id: <2UaHd.27764$_56.6699@fe2.texas.rr.com>

Tore Aursand wrote:
> Oscar wrote:
> 
>> When I remove the line
>> use DBI; I get the error message "Can't locate object method "connect" 
>> via packge "DBI" (perhaps you forgot to load "DBI"?) at sqltst2.pl 
>> line 12."
> 
> 
> Of course; my fault. You need 'use DBI' of course. :)
> 
>> When I put that line, use DBI;, back in I then get an authentication 
>> procotol error message:
>> "DBI connect 
>> ('database=sds_tst;host=localhost;port=3306,'root',....)failed: Client 
>> does not support authentication protocol requested by server;consider 
>> upgrading MYSQL client at sqltst2.pl line 13."
>> I have the latest MySQL client installed.
> 
> 
> Hmm. Have you upgraded from an older MySQL version that uses another 
> authentication protocol? Log in to the MySQL shell and try the following;
> 
>   SET PASSWORD FOR 'username'@'host' = OLD_PASSWORD('password');
> 
> 

I did not upgrade.  The version I have is one I first installed and my 
password has never changed.

Thanks,
Oscar


------------------------------

Date: Tue, 18 Jan 2005 17:39:02 +0100
From: Tore Aursand <toreau@gmail.com>
Subject: Re: Need help with Perl and MySQL database data load
Message-Id: <HYaHd.4979$Sl3.118454@news4.e.nsc.no>

Oscar wrote:
>> Hmm. Have you upgraded from an older MySQL version that uses another 
>> authentication protocol? Log in to the MySQL shell and try the following;
>>
>>   SET PASSWORD FOR 'username'@'host' = OLD_PASSWORD('password');

> I did not upgrade.  The version I have is one I first installed and my 
> password has never changed.

What happened when you tried the above? Have you tried searching Google 
for the same error message?


-- 
Tore Aursand <tore@aursand.no>
"When you see a good idea look for a better one. You should never play
  the first good move that comes into your head." (Bruce Pandolfine)


------------------------------

Date: 18 Jan 2005 17:28:23 GMT
From: xhoster@gmail.com
Subject: Re: newbie question about documentation
Message-Id: <20050118122823.958$BD@newsreader.com>

mikael.petterson@nospam.se wrote:
> Hi,
>
> I can do:
>
> perldoc -f <functioname>
>
> to get man pages.
>
> But how can I get man pages for Net::FTP functions?
> I have the above module installed.

Unfortunately, I know of no way to pull out the doc for just
one method/subroutine of a module.  You have get docs for the whole
module
perldoc Net::FTP
and then search through the output (by hand or using some tool) for
the method you want.

It would be nice if

perldoc -f Net::FTP::new

worked for doing this, but it doesn't.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: Tue, 18 Jan 2005 14:47:39 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: newbie question about documentation
Message-Id: <slrncuqtfb.3qp.tadmc@magna.augustmail.com>

Petterson Mikael <mikael.petterson@ericsson.se> wrote:


> But how can I get man pages for Net::FTP functions?


   perldoc Net::FTP


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 18 Jan 2005 21:09:45 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: newbie question about documentation
Message-Id: <csjtup$qpq$1@mamenchi.zrz.TU-Berlin.DE>

<xhoster@gmail.com> wrote in comp.lang.perl.misc:

> It would be nice if
> 
> perldoc -f Net::FTP::new
> 
> worked for doing this, but it doesn't.

That's unlikely.  The "perldoc -f" functionality is only possible because
the perlfunc document is very regularly built, with each function an
"=item" by itself.  Your average CPAN module varies much more in how it
documents its individual functions.

Anno


------------------------------

Date: Tue, 18 Jan 2005 21:01:36 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: newbie question about documentation
Message-Id: <Pine.LNX.4.61.0501182055210.2549@ppepc56.ph.gla.ac.uk>

On Tue, 18 Jan 2005, Tad McClellan wrote:

> Petterson Mikael <mikael.petterson@ericsson.se> wrote:
> 
> > But how can I get man pages for Net::FTP functions?
>
>    perldoc Net::FTP

Well, that's documentation, alright, but don't I recall the Perl 
installer offering a hint how to convert the pod documentation into 
other formats, such as ...  man pages?

I'm sure perldoc pod2man would help with that.  For someone who had 
already used pod2man, man pod2man would help - but by then it would be 
too late to be useful.  SCNR.


------------------------------

Date: 18 Jan 2005 11:04:23 -0800
From: ioneabu@yahoo.com
Subject: Perl6 book
Message-Id: <1106075063.384965.75120@f14g2000cwb.googlegroups.com>

On Amazon there are two O'Reilly Perl 6 books.

Perl 6 and Parrot Essentials, Second Edition by Allison Randal, et al
(Paperback - June 2004)
Books: See all 63 items (Rate this item)
Buy new: $29.95    Used & new from $23.89    Usually ships in 24 hours



Perl 6 Essentials by Allison Randal, et al (Paperback)
Books: See all 63 items (Rate this item)
Buy new: $9.98    Used & new from $2.82    Usually ships in 24 hours


I am thinking of getting the 2nd one for $2.82 just to have a look.  Is
the Perl 6 info already wrong and outdated from one book to the other?
Do I really need to know all about Parrot right away?

Thanks!

wana



------------------------------

Date: Tue, 18 Jan 2005 19:23:25 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Perl6 book
Message-Id: <NmdHd.4207$av2.786@trndny02>


<ioneabu@yahoo.com> wrote in message
news:1106075063.384965.75120@f14g2000cwb.googlegroups.com...
> On Amazon there are two O'Reilly Perl 6 books.
>
> Perl 6 and Parrot Essentials, Second Edition by Allison Randal, et al
> (Paperback - June 2004)
> Books: See all 63 items (Rate this item)
> Buy new: $29.95    Used & new from $23.89    Usually ships in 24 hours

(I know nothing about this one)

> Perl 6 Essentials by Allison Randal, et al (Paperback)
> Books: See all 63 items (Rate this item)
> Buy new: $9.98    Used & new from $2.82    Usually ships in 24 hours
>

I browsed this one a while back.  The introduction itself says "Most of
this book is probably out of date and inaccurate by the time you're
reading it."


Paul Lalli



------------------------------

Date: Tue, 18 Jan 2005 19:49:59 GMT
From: Mike <mikee@mikee.ath.cx>
Subject: pod and formatting?
Message-Id: <HLdHd.8492$zY4.4714@fe07.lga>

I have now found a need to extend POD beyond what it does best.
I'm generating some text from a system where the text needs to
be centered, headers, footers, in tables, etc.

Is there a way to do this with POD or should I emit man .ms codes?

Mike


------------------------------

Date: Tue, 18 Jan 2005 15:24:34 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: pod and formatting?
Message-Id: <aeeHd.15194$K03.546377@news20.bellglobal.com>

Mike wrote:
> I have now found a need to extend POD beyond what it does best.
> I'm generating some text from a system where the text needs to
> be centered, headers, footers, in tables, etc.
> 
> Is there a way to do this with POD or should I emit man .ms codes?
> 
> Mike

See perldoc Pod::Parser

    --- Shawn


------------------------------

Date: 18 Jan 2005 21:41:45 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: similar articles algorithm based on numeric indexing of all rows via columns in a table
Message-Id: <csjvqp$rt2$1@mamenchi.zrz.TU-Berlin.DE>

 <julie_smith@operamail.com> wrote in comp.lang.perl.misc:
> Hi,
> I have an articles table containing columns like
> id,name,author,section,creationdate,description,longmatter, etc.
> I am using mysql.
> 
> some of them are fixed value fields(enumerations)
> 
> like->section will have news,sports,politics etc...
> 
> while description will be a text field with any amount of arbitrary
> text.
> 
> now I have 50000 articles under different sections.
> 
> I want to implement a "similar articles" feature.

Okay.  Given two articles, how do you decide if they are similar?

> By this I mean when an article is shown,
> I want to display all the similar articles based on that article.(10
> per page).

What you are going to do with the list of similar articles is of
no consequence on how you select them.

> Now how do I calculate the similarity of 1 article with all the 50000
> articles ?

First you have to tell us how to compare two individual articles, *then*
we can talk about ways to apply this to many pairs efficiently.

> I dont want articles from the same section only.
> Since the search result has to be very fast,
> Can I create some algorithm that will look through all the fields in
> each row of the
> articles table and assign a weight/checksum to it.
>
> And then in the similar articles part I display all the articles wth a
> +-5 difference in checksum with the
> current displayed articles checksum ?

Since you mention all the different fields, I suppose they all play
a part in deciding whether two articles are similar or not.  You can't
map that many dimensions onto a single number and have it work like
you want to.  The best you can hope for is a numeric representation
of *each field*, which can be compared to decide if articles are similar
with respect to one particular field.  With some of the fields being
text strings, that won't be possible for all fields either.

Anno


------------------------------

Date: Tue, 18 Jan 2005 11:31:32 -0500
From: Ken <x3v0-usenet@yahoo.com>
Subject: Re: simple encryption/decryption
Message-Id: <ERaHd.40$dm5.37@fe37.usenetserver.com>

stig wrote:
> hi.
> which perl-module(s) can be used to implement very simple 
> encryption/decryption of arbitrary length strings?
> it does not need to very secure but must be able to encrypt and decrypt 
> (not only one way).
> 
> for various reasons Crypt::Simple will not be a possible choice, are 
> there any other modules that you can recommend?
> 
> many thanks
> stig

What about Crypt::Simple doesn't work for you?

Crypt::Blowfish is a good encryption algorythm to use.

If your strings are longer than 8 bytes you will need to use Crypt::CBC 
along with the encryption module. You can also use Crypt::CBCeasy to 
make things a little easier.


Ken



------------------------------

Date: 19 Jan 2005 09:34:11 +1100
From: Peter Billam <peter@pjb.dpiwe.tas.gov.au>
Subject: Re: simple encryption/decryption
Message-Id: <slrncur3n3.167.peter@pjb.dpiwe.tas.gov.au>

stig wrote:
> which perl-module(s) can be used to implement very simple 
> encryption/decryption of arbitrary length strings?
> it does not need to very secure but must be able to encrypt and decrypt 
> (not only one way).

Very true: software which can only go one way is not much use...
(except for digital signatures)

> for various reasons Crypt::Simple will not be a possible choice, are 
> there any other modules that you can recommend?
> 
 
In article <ERaHd.40$dm5.37@fe37.usenetserver.com>, Ken wrote:
> What about Crypt::Simple doesn't work for you?
> Crypt::Blowfish is a good encryption algorythm to use.
> If your strings are longer than 8 bytes you will need to use Crypt::CBC 
> along with the encryption module. You can also use Crypt::CBCeasy to 
> make things a little easier.

I would of course :-) recommend
   Crypt::Tea_JS
which does the New Improved version of the Tiny Encryption Algorithm, and
   Crypt::Tea
which does the Authentic Original version thereof. These both have
a CBC implementation built in and do arbitrary length strings.

-- 

Regards, Peter

Peter Billam,  DPIWE/ILS/CIT/Servers,  hbt/lnd/l8,  6233 3061


------------------------------

Date: 18 Jan 2005 10:22:22 -0800
From: "Larry" <larry_wallet@yahoo.com>
Subject: The world's shortest 'Hello World!' program: a proposal
Message-Id: <1106072542.337358.219890@f14g2000cwb.googlegroups.com>

Having a superlative description of a language is a great promotional
aid.  For example: "best at text processing", "best for distributed web
apps", "fastest for 3d games" etc...

One claim that Perl can make is one of the most simple and shortest
'Hello World' programs.

There is rumor on the web that there is another language which will
execute the code:

Hello World

and print:

Hello World

My proposal for Perl6 is to make Perl execute a sequence of code which
is 0 bytes in length with the action of printing to STDOUT:

Hello World

Currently, attempting to execute a file or string of code with no
content will do absolutely nothing.

Of course, with the -W flag, Perl would continue to do nothing, and if
one were to use strict, it would no longer be an empty file and
therefore would properly execute by strictly doing absolutely nothing.

The controversy in this proposal may be the way in which to state:

Hello World

Here are a few alternatives that have been used traditionally:

Hello, World
Hello, World!
Hello world.
hello world...

And with the current aggressiveness of Nasa in exploring new worlds,
one might consider changing it to:

Hello Worlds!



------------------------------

Date: Tue, 18 Jan 2005 16:10:35 -0500
From: Ken <x3v0-usenet@yahoo.com>
Subject: Re: The world's shortest 'Hello World!' program: a proposal
Message-Id: <gXeHd.59$dm5.17@fe37.usenetserver.com>

Larry wrote:
> Having a superlative description of a language is a great promotional
> aid.  For example: "best at text processing", "best for distributed web
> apps", "fastest for 3d games" etc...
> 
> One claim that Perl can make is one of the most simple and shortest
> 'Hello World' programs.
> 
> There is rumor on the web that there is another language which will
> execute the code:
> 
> Hello World
> 
> and print:
> 
> Hello World
> 
> My proposal for Perl6 is to make Perl execute a sequence of code which
> is 0 bytes in length with the action of printing to STDOUT:
> 
> Hello World
> 
> Currently, attempting to execute a file or string of code with no
> content will do absolutely nothing.
> 
> Of course, with the -W flag, Perl would continue to do nothing, and if
> one were to use strict, it would no longer be an empty file and
> therefore would properly execute by strictly doing absolutely nothing.
> 
> The controversy in this proposal may be the way in which to state:
> 
> Hello World
> 
> Here are a few alternatives that have been used traditionally:
> 
> Hello, World
> Hello, World!
> Hello world.
> hello world...
> 
> And with the current aggressiveness of Nasa in exploring new worlds,
> one might consider changing it to:
> 
> Hello Worlds!
> 

lol (this IS a joke, right?)

Ken



------------------------------

Date: Tue, 18 Jan 2005 22:28:23 -0000
From: "Leonard Challis" <perl@lennychallis.co.uk>
Subject: Re: The world's shortest 'Hello World!' program: a proposal
Message-Id: <csk2ht$udm$1@newsg2.svr.pol.co.uk>

"Ken" <x3v0-usenet@yahoo.com> wrote in message 
news:gXeHd.59$dm5.17@fe37.usenetserver.com...
> Larry wrote:
>> Having a superlative description of a language is a great promotional
>> aid.  For example: "best at text processing", "best for distributed web
>> apps", "fastest for 3d games" etc...
>>
>> One claim that Perl can make is one of the most simple and shortest
>> 'Hello World' programs.
>>
>> There is rumor on the web that there is another language which will
>> execute the code:
>>
>> Hello World
>>
>> and print:
>>
>> Hello World
>>
>> My proposal for Perl6 is to make Perl execute a sequence of code which
>> is 0 bytes in length with the action of printing to STDOUT:
>>
>> Hello World
>>
>> Currently, attempting to execute a file or string of code with no
>> content will do absolutely nothing.
>>
>> Of course, with the -W flag, Perl would continue to do nothing, and if
>> one were to use strict, it would no longer be an empty file and
>> therefore would properly execute by strictly doing absolutely nothing.
>>
>> The controversy in this proposal may be the way in which to state:
>>
>> Hello World
>>
>> Here are a few alternatives that have been used traditionally:
>>
>> Hello, World
>> Hello, World!
>> Hello world.
>> hello world...
>>
>> And with the current aggressiveness of Nasa in exploring new worlds,
>> one might consider changing it to:
>>
>> Hello Worlds!
>>
>
> lol (this IS a joke, right?)
>
> Ken
>

Lol, I can't tell if it is or not, but it would be quit funny :D
Lenny 




------------------------------

Date: 18 Jan 2005 22:35:19 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: The world's shortest 'Hello World!' program: a proposal
Message-Id: <Xns95E2B2F0BEBADasu1cornelledu@132.236.56.8>

"Leonard Challis" <perl@lennychallis.co.uk> wrote in news:csk2ht$udm$1
@newsg2.svr.pol.co.uk:

> "Ken" <x3v0-usenet@yahoo.com> wrote in message 
> news:gXeHd.59$dm5.17@fe37.usenetserver.com...
>> Larry wrote:

 ...

>>> One claim that Perl can make is one of the most simple and shortest
>>> 'Hello World' programs.
 ...

>>>
>>
>> lol (this IS a joke, right?)

> Lol, I can't tell if it is or not, but it would be quit funny :D

Please stop feeding the troll.

Sinan.


------------------------------

Date: Tue, 18 Jan 2005 12:27:48 -0600
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: Update statement with Perl DBI for MySQL 5.0
Message-Id: <FycHd.20$%j.1981@news.uswest.net>

sam wrote:
> Hi,
> Here is my sample code:
[...]
> $udpate_sql = qq {$sql;};
> $sth = $dbh->prepare($update_sql) || die "prepare: $update_sql: 
> $DBI::errstr";

If this truly is your code.. update_sql is undefined.

use strict;

Would likely make the typo more obvious. Also, you could also use single 
quotes, making your SQL statement much simpler, placeholders would be 
the best solution.


------------------------------

Date: 18 Jan 2005 14:33:24 -0800
From: "David Filmer" <IneverReadAnythingSentToMe@hotmail.com>
Subject: Why doesn't this work?
Message-Id: <1106087604.564825.130160@c13g2000cwb.googlegroups.com>

Why can't I say:

print (gmtime(time))[2];

I expect that to print the hour (localized for GMT). But it tells me
this is a syntax error.  But I can do this:

@foo = gmtime(time);
print @foo[2];

What's wrong with the first syntax?



------------------------------

Date: 18 Jan 2005 22:42:01 GMT
From: Martin Kissner <news@chaos-net.de>
Subject: Re: Why doesn't this work?
Message-Id: <slrncur45p.qi2.news@maki.homeunix.net>

David Filmer wrote :
> Why can't I say:
>
> print (gmtime(time))[2];
>
> I expect that to print the hour (localized for GMT). But it tells me
> this is a syntax error.  But I can do this:
>
> @foo = gmtime(time);
> print @foo[2];

or this:
print my $temp=(gmtime(time))[2];
or this:
perl -e 'print do {(gmtime(time))[2]}'

HTH
Martin

-- 
Epur Si Muove (Gallileo Gallilei)


------------------------------

Date: 18 Jan 2005 22:47:15 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Why doesn't this work?
Message-Id: <Xns95E2B4F76A01Easu1cornelledu@132.236.56.8>

"David Filmer" <IneverReadAnythingSentToMe@hotmail.com> wrote in 
news:1106087604.564825.130160@c13g2000cwb.googlegroups.com:

> Why can't I say:
> 
> print (gmtime(time))[2];

Well, if you had enabled warnings, you would have seen useful 
information:

D:\> perl -we "print (gmtime(time))[2]"
print (...) interpreted as function at -e line 1.
syntax error at -e line 1, near ")["
Execution of -e aborted due to compilation errors.

OTOH:

D:\> perl -we "print +(gmtime(time))[2]"
22

Also, if you had checked the documentation for for print, you would have 
read:

D:\> perldoc -f print 

  ... Because print takes a
      LIST, anything in the LIST is evaluated in list context, and any
      subroutine that you call will have one or more of its
      expressions evaluated in list context. Also be careful not to
      follow the print keyword with a left parenthesis unless you want
      the corresponding right parenthesis to terminate the arguments
      to the print--interpose a "+" or put parentheses around all the
      arguments.

 ...

> @foo = gmtime(time);
> print @foo[2];
> 
> What's wrong with the first syntax?

Actually, the @foo[2] syntax is wrong as well. You are selecting a slice 
consisting of the third element of foo. You should use $foo[2] access 
the third element of an array foo.

You should also read the posting guidelines for this group.

Sinan.


------------------------------

Date: 18 Jan 2005 09:45:30 -0800
From: "Alex Hart" <alex_the_hart@yahoo.com>
Subject: Re: wildcard the port in bind
Message-Id: <1106070330.444485.266080@z14g2000cwz.googlegroups.com>

Thanks, that seems to work.



------------------------------

Date: Tue, 18 Jan 2005 22:46:14 GMT
From: Larry <dontmewithme@got.it>
Subject: Win32::api doesn't work?
Message-Id: <dontmewithme-AAD3C5.23455818012005@twister2.tin.it>

How come the chunk of code below doesn't work?

#!/perl

use strict;
use warnings;
use Win32::API;

my ($caps, $devices, $result);

Win32::API::Struct->typedef( 'WAVEINCAPS', qw(
   INT ManufacturerID; 
   INT ProductID; 
   LONG DriverVersion; 
   TCHAR ProductName[32]; 
   LONG Formats; 
   INT Channels; 
   INT Reserved;
)) or die "Typedef error $!\n";

my $caps = Win32::API::Struct->new('WAVEINCAPS'); # Dim Caps As 
WaveInCaps

Win32::API->Import( winmm => "int waveInGetNumDevs()");
Win32::API->Import( winmm => q{LRESULT waveInGetDevCaps(UINT_PTR 
DeviceID, LPWAVEINCAPS pwic, UINT cbwic)} );

$devices = waveInGetNumDevs();

print "Devices: $devices\n\n";

for (0 .. ($devices - 1) ) {
   $result = waveInGetDevCaps($_, $caps, 
Win32::API::Struct->sizeof('WAVEINCAPS'));
   print "Device ID: $_ ,ProductName: $caps->{ProductName}\n";
}

__END__;

It should return the product name of the devices (like soundblaster)
I can only get the number of the devices

Can anyone tell me what I am getting wrong?

Thanks ever so much!


------------------------------

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 V10 Issue 7669
***************************************


home help back first fref pref prev next nref lref last post