[23880] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6083 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 5 11:05:44 2004

Date: Thu, 5 Feb 2004 08:05:07 -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           Thu, 5 Feb 2004     Volume: 10 Number: 6083

Today's topics:
        Arrays Of Arrays: Is it an Array or Scalar? <hal@thresholddigital.com>
    Re: Can't locate IO/Tty/Constant.pm in @INC <kalinaubears@iinet.net.au>
    Re: Can't locate IO/Tty/Constant.pm in @INC <usenet@morrow.me.uk>
    Re: Clarifications <spamtrap@dot-app.org>
    Re: Clarifications <matthew.garrish@sympatico.ca>
    Re: Counting words <jill_krugman@yahoo.com>
    Re: Counting words <HelgiBriem_1@hotmail.com>
    Re: Counting words <dwall@fastmail.fm>
    Re: Docs comprehensibility [was: Perl For... ] <tassilo.parseval@rwth-aachen.de>
        Getting STDERR from forked child processes? <fiedorow@hotmail.com>
    Re: group but do not capture (naren)
    Re: Looking for a FAQ article on autoposting in PERL <dwall@fastmail.fm>
    Re: Microsoft AD stan.holmes@eskom.co.za
        Optimization request <Guru03@despammed.com>
    Re: Optimization request <dwall@fastmail.fm>
    Re: Optimization request <tore@aursand.no>
    Re: Optimization request <lmai@mytum.de>
        OT: biography of Larry Wall (Mario Fischer)
    Re: OT: biography of Larry Wall <jwillmore@remove.adelphia.net>
    Re: OT: biography of Larry Wall <ittyspam@yahoo.com>
    Re: Perl For Amateur Computer Programmers <bik.mido@tiscalinet.it>
    Re: Perl For Amateur Computer Programmers <uri@stemsystems.com>
        Perlcc Problem... <gis86508@cissol1.cis.nctu.edu.tw>
    Re: Perlcc Problem... <kalinaubears@iinet.net.au>
    Re: Perlcc Problem... <usenet@morrow.me.uk>
    Re: Perlcc Problem... <tadmc@augustmail.com>
    Re: Perlcc Problem... <jwillmore@remove.adelphia.net>
        problem with "our" <j_kkachi@yahoo.com>
        RDBMS to hold Perl objects? <jill_krugman@yahoo.com>
    Re: RDBMS to hold Perl objects? <jwillmore@remove.adelphia.net>
        Running perl script from command line (Abhishek Srivastava)
    Re: Running perl script from command line <kuujinbo@hotmail.com>
    Re: Running perl script from command line <jwillmore@remove.adelphia.net>
    Re: Site Visitor's eMail Address (Steve)
    Re: Splitting a String into a List Using Seperator "*" <raisin@delete-this-trash.mts.net>
    Re: Splitting a String into a List Using Seperator "*" <jwillmore@remove.adelphia.net>
    Re: Splitting a String into a List Using Seperator "*" <jill_krugman@yahoo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 05 Feb 2004 15:58:24 GMT
From: Hal Vaughan <hal@thresholddigital.com>
Subject: Arrays Of Arrays: Is it an Array or Scalar?
Message-Id: <AKtUb.185396$nt4.786330@attbi_s51>

I have a function that I'm using to perform operations on strings in an
array.  There are times where I'd like to have this function work on arrays
of arrays.  Is there a simple way to tell if the value of an element in an
array is a scalar, or is, instead, a reference to another array?

I know I can use a regex to see if the string matches the pattern for an
array reference, but is there a more "elegant" and easier way to do it?

(And, while I'm at it, is there a way to check for a hash as well?  I'd
think they'd both be done the same way.)

Thanks!

Hal


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

Date: Thu, 05 Feb 2004 20:00:48 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
To: Newbie <diwaneel@yahoo.com>
Subject: Re: Can't locate IO/Tty/Constant.pm in @INC
Message-Id: <40220640.2090008@iinet.net.au>

Newbie wrote:
> Hi
> 
> My script is using Expect.pm. The pre-requisites of using this is
> IO::tty and IO::pty. I downloaded Bundle-Expect-1.09, which says that
> it has both these packages. Later executing this script gave this eror
> message:
> 
> Can't locate IO/Tty/Constant.pm in @INC (@INC contains:
> /avo/tools/PerlLib /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
> /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .)
> at /usr/perl5/5.00503/sun4-solaris/IO/Tty.pm line 8.
> BEGIN failed--compilation aborted at
> /usr/perl5/5.00503/sun4-solaris/IO/Tty.pm line 8.
> BEGIN failed--compilation aborted at
> /usr/perl5/5.00503/sun4-solaris/IO/Pty.pm line 8.
> BEGIN failed--compilation aborted at /avo/tools/PerlLib/Expect.pm line
> 22.
> BEGIN failed--compilation aborted at /avo/tools/File.pl line 356.
> 
> The existing package on my machine: 5.005_03
> Is this s dependancy issue or difference in versions is causing the
> problem? How to resolve it?
> 
> Thanks

I can't find any reference to an IO::Tty::Constant module on cpan. Maybe 
an error in the coding of your script ?
If, in fact, you do have an 'IO/Tty/Constant.pm' then what is the _full_ 
path to its location ?

Cheers,
Rob

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



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

Date: Thu, 5 Feb 2004 09:37:54 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Can't locate IO/Tty/Constant.pm in @INC
Message-Id: <bvt2ti$3g9$2@wisteria.csv.warwick.ac.uk>


Sisyphus <kalinaubears@iinet.net.au> wrote:
> I can't find any reference to an IO::Tty::Constant module on cpan. Maybe 
> an error in the coding of your script ?

Well, I've got one on my machine. It came with IO::Tty.

Ben

-- 
Heracles: Vulture! Here's a titbit for you / A few dried molecules of the gall
   From the liver of a friend of yours. / Excuse the arrow but I have no spoon.
(Ted Hughes,        [ Heracles shoots Vulture with arrow. Vulture bursts into ]
 /Alcestis/)        [ flame, and falls out of sight. ]         ben@morrow.me.uk


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

Date: Thu, 05 Feb 2004 06:53:38 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Clarifications
Message-Id: <9qadnaUGO-pes7_dRVn-jw@adelphia.com>

edgrsprj wrote:

> discussions with someone else regarding how to do all of this in a more
> accurate and acceptable way.

My own $.02:

Think about this. Your knowledge of Perl (such as it is) did not come from a
vacuum. You had to have gotten it from a web site, man page, or some other
resource that was comprehensible to a beginner at your current level.

What reason do you have for thinking others couldn't benefit from the same
source? I think you're not giving your fellow researchers enough credit.
Don't you think you could better serve your community with a list of links
to resources you found useful, rather than with a badly-written summary of
them?

sherm--


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

Date: Thu, 5 Feb 2004 06:48:10 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Clarifications
Message-Id: <X3qUb.18401$9U5.1038065@news20.bellglobal.com>


"Uri Guttman" <uri@stemsystems.com> wrote in message
news:x7u12615n5.fsf@mail.sysarch.com...
> >>>>> "MG" == Matt Garrish <matthew.garrish@sympatico.ca> writes:
>
>   MG> "Uri Guttman" <uri@stemsystems.com> wrote in message
>   MG> news:x7ptcu2qe0.fsf@mail.sysarch.com...
>   >>
>   >> simple. don't use a word processor to edit code. use a text
>   >> editor. people who use word to edit code are stupid twice over.
>   >>
>
>   MG> If you've got an easier way to get a binary from your code than by
>   MG> using Word I'd like to hear it.
>
> what in the world does that mean? we are talking about editing code
> which is text.
>

Stupid people => Word => doc => binary == compiled code. I thought everyone
knew that's how it works...

Matt




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

Date: Thu, 5 Feb 2004 10:51:22 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: Re: Counting words
Message-Id: <bvt77a$8kd$1@reader2.panix.com>

In <2ec7a60.0402041404.43df29f3@posting.google.com> fmeizoso@yahoo.es (Fran) writes:

>Can anybody please tell me how to count words? If a need to know if an
>input has n words, how do I do it? Thank you

I think the simplest thing to do is to use split (perldoc -f split)
and count the number of elements in the result.  The main difficulty
is to find the right pattern to split on...  Maybe this would work
for you:

  @w = split /\s|\W{2,}/, $string;      # check the split?
  $n = scalar @w; 


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

Date: Thu, 05 Feb 2004 11:02:27 +0000
From: Helgi Briem <HelgiBriem_1@hotmail.com>
Subject: Re: Counting words
Message-Id: <r98420ptpjv1pmg9m0bil7cqvvnp0rn593@4ax.com>

On 4 Feb 2004 14:04:29 -0800, fmeizoso@yahoo.es (Fran) wrote:


>Can anybody please tell me how to count words? If a need to know if an
>input has n words, how do I do it? Thank you

Well, as others have so readily told you, it's fairly
hard to define a word.  As long as you don't mind
a haphazard definition (words are separated by whitespace),
something like this will do the trick:

#!perl
use warnings;
use strict;
my $totalwords = 0;
while (<>)
{
  my @words = split;
  $totalwords += @words;
}
print $totalwords;
__END__


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

Date: Thu, 05 Feb 2004 15:15:04 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: Counting words
Message-Id: <Xns94866847DE704dkwwashere@216.168.3.30>

Uri Guttman <uri@stemsystems.com> wrote:

>>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
> 
>   JE> Fran wrote:
>  >> Can anybody please tell me how to count words? If a need to know if
>  >> an input has n words, how do I do it?
> 
>   JE> Please define "word".
> 
> please define 'please'
> please define 'define'

Ok, Mr. Turtle...  ITYM:


define('please', 'define');

sub define {
    my @more;
    for my $wp (@_) {
        my $t = "Please define '$wp'";
        print $t . "\n";
        push @more, $t;
    }
    define(@more);
}


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

Date: 5 Feb 2004 08:24:20 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Docs comprehensibility [was: Perl For... ]
Message-Id: <bvsujk$9sc$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Gunnar Hjalmarsson:

> Tassilo v. Parseval wrote:

>> It's a question of priority. There aren't so many people that can
>> work on the core of perl. It would be a waste of ressources if
>> those people additionally had to spend excessive time on the
>> perldocs.
> 
> Would it, really? Shouldn't the docs be given high priority? After
> all, the value of new and/or sophisticated features is limited if they
> are understood by just a few...

Higher priority than bugfixes and fixing security holes such as the
hashing exploit that was fixed in 5.8.1? I don't think so. It's not that
there are only a handful people around the world who can program Perl.
There are many places where a beginner can get the help he needs such as
this group or beginners@perl.org. 

>> Doc-patches can also be provided by all those people who are solid
>> Perl programmers but don't understand the perlguts. Those who do
>> are rare enough.
> 
> Would it be that impossible to involve not so solid programmers? I'm
> not suggesting that beginners should write docs *independently*, but
> giving a few of the more dedicated beginners an opportunity to give
> their *input* might add value.

That is already how it is. perlpatch.pod explains in lengthy details how
to create and submit patches. You don't have to be registered or
anything to contribute to Perl. Just create a patch and send it to
perl5-porters@perl.org. The patch will then be discussed or, this is my
experience, very often just applied without further discussion. Let me
quote Nicholas Clark, the current pumpking for 5.8.2 - 5.8.x:

    Calling all happy passive readers of perl5-porters - submit a patch,
    get your name into the AUTHORS file: fame, immortality and more
    spam.

The development of Perl5 happens in a most informal way really and is
open to anyone. It's not a closed circle.

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: Thu, 05 Feb 2004 10:39:38 -0500
From: Zbigniew Fiedorowicz <fiedorow@hotmail.com>
Subject: Getting STDERR from forked child processes?
Message-Id: <bvto7c$9k$1@charm.magnus.acs.ohio-state.edu>

How can I catch error messages from external programs forked
from a Perl cgi process?  I can of course read from the web
server error log, but I am worried that I might be getting
the wrong error messages from some other web server process
which is running concurrently.

TIA,
Zig Fiedorowicz



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

Date: 5 Feb 2004 07:07:50 -0800
From: naren_tech@yahoo.com (naren)
Subject: Re: group but do not capture
Message-Id: <c3260cc0.0402050707.52b6558a@posting.google.com>

Thanks!! Ben

Ben Morrow <usenet@morrow.me.uk> wrote in message news:<bvs1n8$cm0$4@wisteria.csv.warwick.ac.uk>...
> [don't top-post]
> 
> naren_tech@yahoo.com (naren) wrote:
> > I understand that we can get this in $1 and $2, but the challenge I
> > faced is to get this in one step, basically I feed this regex to a
> > configuration file, which will use this regex to parse the line, it
> > can only take $1, it can't append $1 and $2.
> 
> Can't be done. Each $N captures a contiguous sequence of characters
> from the target string, so you can't get two sections from different
> places into $1.
> 
> >  That is why I considered to use (?:\|), group but do not capture,I
> > haven't undestood how this works??
> 
> No... () captures *everything* inside it. Even if some of the inside
> is captured again. If you execute
> 
> "abc" =~ /(.(.).)/
> 
> then $1="abc" and $2="b": the "b" has been captured twice. If that had
> been
> 
> "abc" =~ /(.(?:.).)/
> 
> then you would have $1="abc" still but no $2 as there's only one set
> of capturing parens.
> 
> Ben


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

Date: Thu, 05 Feb 2004 15:02:14 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: Looking for a FAQ article on autoposting in PERL
Message-Id: <Xns9486661B2C9F8dkwwashere@216.168.3.30>

Tad McClellan <tadmc@augustmail.com> wrote:

> cob <cob@hotmail.com> wrote:
>> I maintain a FAQ for the misc.immigration.misc newsgroup.  I have been
>> looking for a short perl snippet to automate FAQ announcements that
>> would be posted to the misc.immigration.misc newsgroup.
>> 
>> Also a perl snippet that could be run once a week to post an article
>> showing where the FAQ is.
> 
>> Is it possible?  
> 
> 
> Yes. I have one that sends the Posting Guidelines to this newsgroup 
> twice each week.

I wondered about that one; whether you thought it was trivial enough to 
have a custom program just for the guidelines or if you had generalized it.  

Is there any particular reason you used News::NNTPClient instead of 
Net::NNTP ?  I alread had Net::NNTP (core module, I think?), so I used it 
in my test program instead of making a trip to CPAN.

>> I appreciate any pointers in the right direction!
> 
> long URL wrapped:
> 
>    http://groups.google.com/groups?
>       as_umsgid=slrn9q4sgv.kth.tadmc%40tadmc26.august.net


I'm often uncertain in cases like this one if I should just give someone a 
complete program or point them to relevant module(s) or documentation. I 
decided on the latter this time even though I wrote and tested a small 
program for the purpose. I've never had a reason to automate usenet 
posting, but it seemed easy enough (a few minutes, mostly spent reading the 
docs for Net::NNTP) that I thought I would encourage the OP to try his hand 
at it. <shrug>

-- 
David Wall


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

Date: Thu, 5 Feb 2004 10:48:36 +0200
From: stan.holmes@eskom.co.za
Subject: Re: Microsoft AD
Message-Id: <bvt016$qb1$1@newsreader02.ops.uunet.co.za>

Sorry for not giving enough info. It is an Microsoft Active directory which
I want to keep in sync with our Human Resource Oracle database using Perl.
Access to this can be via LDAP but I cant find any decent documentation on
the authentication between the MS AD and Perl LDAP. I'm looking for some
sample code to get started.
Stan
"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message
news:bvpatb$kea$1@canopus.cc.umanitoba.ca...
> In article <4020253E.777D4234@fake.domain>,
> MPBroida  <mbroida@fake.domain> wrote:
> : Considering his later post, perhaps:
>
> : AD == Access Database
>
> Hmmm, I read it as MS's Active Directory. Which is tied in with LDAP,
> and if you had an Oracle database of users, you might well want to
> export information from the Oracle database into Active Directory.
> --
>    Warhol's Law: every Usenet user is entitled to his or her very own
>    fifteen minutes of flame                  -- The Squoire
>




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

Date: Thu, 5 Feb 2004 13:58:34 +0000 (UTC)
From: Guru03 <Guru03@despammed.com>
Subject: Optimization request
Message-Id: <Xns9486986761FC0Guru03despammedcom@193.43.96.1>

For you, it's faster this:

s/>/&gt;/g;

or this:

s/>/&gt;/g if index ($_, '>');

and why?


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

Date: Thu, 05 Feb 2004 15:27:02 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: Optimization request
Message-Id: <Xns94866A4E9C8B1dkwwashere@216.168.3.30>

Guru03 <Guru03@despammed.com> wrote:

> For you, it's faster this:
> 
> s/>/&gt;/g;
> 
> or this:
> 
> s/>/&gt;/g if index ($_, '>');
> 
> and why?

Use the first one, no need to search the string twice.

"Premature optimization is the root of all evil."


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

Date: Thu, 05 Feb 2004 16:33:06 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: Optimization request
Message-Id: <pan.2004.02.05.15.29.03.543225@aursand.no>

On Thu, 05 Feb 2004 13:58:34 +0000, Guru03 wrote:
> For you, it's faster this:
> 
> s/>/&gt;/g;
> 
> or this:
> 
> s/>/&gt;/g if index ($_, '>');
> 
> and why?

Isn't it obvious that the first one is faster?  Your last line of code
requires Perl to do _two_ things, while the first one only do one thing;

  #!/usr/bin/perl
  #
  use strict;
  use warnings;
  use Benchmark qw( timethese );

  timethese(1_000_000, {
      'Method #1' => \&method_1,
      'Method #2' => \&method_2,
  });

  sub method_1 {
      $html =~ s,<,&lt;,g;
      $html =~ s,>,&gt;,g;
  }

  sub method_2 {
      $html =~ s,<,&lt;, if ( index($html, '<') );
      $html =~ s,>,&lt;, if ( index($html, '>') );
  }

This gives me the following:

  Benchmark: timing 1000000 iterations of Method #1, Method #2...
   Method #1: 2 wallclock secs (1.43 usr + 0.00 sys = 1.43 CPU) @ 699300.70/s
   Method #2: 3 wallclock secs (2.73 usr + 0.00 sys = 2.73 CPU) @ 366300.37/s


-- 
Tore Aursand <tore@aursand.no>
"Why shouldn't truth be stranger than fiction? Fiction, after all, has
 to make sense." -- Mark Twain


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

Date: Thu, 5 Feb 2004 15:44:48 +0000 (UTC)
From: Lukas Mai <lmai@mytum.de>
Subject: Re: Optimization request
Message-Id: <bvtodg$1o721$1@sunsystem5.informatik.tu-muenchen.de>

Guru03 <Guru03@despammed.com> wrote:
> For you, it's faster this:

> s/>/&gt;/g;

> or this:

> s/>/&gt;/g if index ($_, '>');

Doesn't matter, the second one is broken. It should be
 ... if index($_, '>') >= 0;

HTH, Lukas


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

Date: 5 Feb 2004 02:02:56 -0800
From: klicker-mail@gmx.net (Mario Fischer)
Subject: OT: biography of Larry Wall
Message-Id: <15494608.0402050202.696a79ad@posting.google.com>

Hi!

I have to create a presentation of a person who changed the history of
computer science and as a perl-programmer I want to introduce Larry
Wall to my profile course at school in my presentation.

I searched by using Google and others, but I didn't find a good
source. O'Reilly itself says there is no biography available, but that
doesn't make sense. Is this man such a great mistery? ;-)

Can anyone provide good sources with numbers (that was the main
problem of the sources I saw: there was said that he studied and
worked somewhere, but nowhere I could find the exact year or month, so
it was useless)?

Thanks!

Regards,
Mario


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

Date: Thu, 05 Feb 2004 09:02:02 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: OT: biography of Larry Wall
Message-Id: <pan.2004.02.05.14.02.01.170169@remove.adelphia.net>

On Thu, 05 Feb 2004 02:02:56 -0800, Mario Fischer wrote:

> I have to create a presentation of a person who changed the history of
> computer science and as a perl-programmer I want to introduce Larry
> Wall to my profile course at school in my presentation.
> 
> I searched by using Google and others, but I didn't find a good
> source. O'Reilly itself says there is no biography available, but that
> doesn't make sense. Is this man such a great mistery? ;-)
> 
> Can anyone provide good sources with numbers (that was the main
> problem of the sources I saw: there was said that he studied and
> worked somewhere, but nowhere I could find the exact year or month, so
> it was useless)?

http://www.wall.org/~larry/ is Larry Wall's home page.  There is listed
his .... email address :-)

You could just send him (a professional and honest) email and see what
happens.  I don't know the man, but I'm willing to go out on a limb and
say you're not the first person to ask. 

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Texas law forbids anyone to have a pair of pliers in his
possession. 



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

Date: Thu, 5 Feb 2004 10:52:26 -0500
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: OT: biography of Larry Wall
Message-Id: <20040205105143.M483@dishwasher.cs.rpi.edu>

On Thu, 5 Feb 2004, Mario Fischer wrote:

> Hi!
>
> I have to create a presentation of a person who changed the history of
> computer science and as a perl-programmer I want to introduce Larry
> Wall to my profile course at school in my presentation.
>
> I searched by using Google and others, but I didn't find a good
> source. O'Reilly itself says there is no biography available, but that
> doesn't make sense. Is this man such a great mistery? ;-)
>
> Can anyone provide good sources with numbers (that was the main
> problem of the sources I saw: there was said that he studied and
> worked somewhere, but nowhere I could find the exact year or month, so
> it was useless)?
>
> Thanks!
>
> Regards,
> Mario


Well, there's an interview he did with Linux Journal that has some basic
parts of a biography....

http://www.linuxjournal.com/article.php?sid=3394

Paul Lalli


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

Date: Fri, 06 Feb 2004 09:13:25 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl For Amateur Computer Programmers
Message-Id: <eeh5209quc3opak2l3729bql3f1vkg29dm@4ax.com>

On Wed, 04 Feb 2004 16:26:48 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
wrote:

>> i was taught that it was because we didn't appease the gods and they
>> were stomping around doing polkas. and that we can stop them by offering
>> up perl virgins in sacrifice. i should put this up in a web page
>> too. does anyone who knows how to *program* in html wanna help me?
>>
>
>Netscape has a free, downloadable Web page editor which I find works nicely.
>You don't really need to understand html to create Web pages though it
>helps.

4 words: it-was-a-joke!


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Thu, 05 Feb 2004 09:28:32 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Perl For Amateur Computer Programmers
Message-Id: <x7n07xzxhb.fsf@mail.sysarch.com>

>>>>> "MD" == Michele Dondi <bik.mido@tiscalinet.it> writes:

  MD> On Wed, 04 Feb 2004 16:26:48 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
  MD> wrote:

  >>> i was taught that it was because we didn't appease the gods and they
  >>> were stomping around doing polkas. and that we can stop them by offering
  >>> up perl virgins in sacrifice. i should put this up in a web page
  >>> too. does anyone who knows how to *program* in html wanna help me?
  >>> 
  >> 
  >> Netscape has a free, downloadable Web page editor which I find works nicely.
  >> You don't really need to understand html to create Web pages though it
  >> helps.

  MD> 4 words: it-was-a-joke!

4 words: he-has-no-clue!!

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Thu, 5 Feb 2004 08:12:45 +0000 (UTC)
From: stratus <gis86508@cissol1.cis.nctu.edu.tw>
Subject: Perlcc Problem...
Message-Id: <bvsttt$htn$1@news.cis.nctu.edu.tw>

I want to encrypt my perl code.
If I do not use perlcc, it is without any problem and can run well.
However, if I use perlcc to compile, it will generate some messages,like
 No definition for sub Term::ANSIColor::BLINK
 No definition for sub Term::ANSIColor::BLINK (unable to autoload)
 No definition for sub Term::ANSIColor::CONCEALED
 No definition for sub Term::ANSIColor::CONCEALED (unable to autoload)
 No definition for sub Term::ANSIColor::UNDERLINE (unable to autoload)
 No definition for sub Term::ANSIColor::BLACK (unable to autoload)

I have already "use lib....."in the code and run without any problems.
What's wrong ????
Thanks...



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

Date: Thu, 05 Feb 2004 19:20:22 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Perlcc Problem...
Message-Id: <4021fdbd$0$1735$5a62ac22@freenews.iinet.net.au>

stratus wrote:
> I want to encrypt my perl code.
> If I do not use perlcc, it is without any problem and can run well.
> However, if I use perlcc to compile, it will generate some messages,like
>  No definition for sub Term::ANSIColor::BLINK
>  No definition for sub Term::ANSIColor::BLINK (unable to autoload)
>  No definition for sub Term::ANSIColor::CONCEALED
>  No definition for sub Term::ANSIColor::CONCEALED (unable to autoload)
>  No definition for sub Term::ANSIColor::UNDERLINE (unable to autoload)
>  No definition for sub Term::ANSIColor::BLACK (unable to autoload)
> 
> I have already "use lib....."in the code and run without any problems.
> What's wrong ????
> Thanks...
> 

'perlcc' is no longer being maintained and was always buggy. Better to 
use the 'pp' tool that comes with the 'PAR' module from cpan instead of 
'perlcc'.

Cheers,
Rob

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



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

Date: Thu, 5 Feb 2004 09:35:55 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Perlcc Problem...
Message-Id: <bvt2pr$3g9$1@wisteria.csv.warwick.ac.uk>


Sisyphus <kalinaubears@iinet.net.au> wrote:
> stratus wrote:
> > I want to encrypt my perl code.

Why? You do realise this is almost certainly futile?

> > If I do not use perlcc, it is without any problem and can run well.
> > However, if I use perlcc to compile, it will generate some messages,like
> >  No definition for sub Term::ANSIColor::BLINK
> >  No definition for sub Term::ANSIColor::BLINK (unable to autoload)
> >  No definition for sub Term::ANSIColor::CONCEALED
> >  No definition for sub Term::ANSIColor::CONCEALED (unable to autoload)
> >  No definition for sub Term::ANSIColor::UNDERLINE (unable to autoload)
> >  No definition for sub Term::ANSIColor::BLACK (unable to autoload)
> > 
> > I have already "use lib....."in the code and run without any problems.
> > What's wrong ????
> > Thanks...
> > 
> 
> 'perlcc' is no longer being maintained and was always buggy. Better to 
> use the 'pp' tool that comes with the 'PAR' module from cpan instead of 
> 'perlcc'.

 ...except that the source will simply be copied into the executable
verbatim, so it would be trivial to extract it with a text editor.

Ben

-- 
I've seen things you people wouldn't believe: attack ships on fire off the
shoulder of Orion; I've watched C-beams glitter in the darkness near the
Tannhauser Gate. All these moments will be lost, in time, like tears in rain.
Time to die.  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|  ben@morrow.me.uk


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

Date: Thu, 5 Feb 2004 06:04:28 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perlcc Problem...
Message-Id: <slrnc24cac.425.tadmc@magna.augustmail.com>

stratus <gis86508@cissol1.cis.nctu.edu.tw> wrote:

> I want to encrypt my perl code.

> However, if I use perlcc to compile,


perlcc does not encrypt Perl code...


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


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

Date: Thu, 05 Feb 2004 09:07:08 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Perlcc Problem...
Message-Id: <pan.2004.02.05.14.07.05.603325@remove.adelphia.net>

On Thu, 05 Feb 2004 08:12:45 +0000, stratus wrote:

> I want to encrypt my perl code.
> If I do not use perlcc, it is without any problem and can run well.
> However, if I use perlcc to compile, it will generate some messages,like
>  No definition for sub Term::ANSIColor::BLINK
>  No definition for sub Term::ANSIColor::BLINK (unable to autoload)
>  No definition for sub Term::ANSIColor::CONCEALED
>  No definition for sub Term::ANSIColor::CONCEALED (unable to autoload)
>  No definition for sub Term::ANSIColor::UNDERLINE (unable to autoload)
>  No definition for sub Term::ANSIColor::BLACK (unable to autoload)
> 
> I have already "use lib....."in the code and run without any problems.
> What's wrong ????

compile != encrypt

perldoc -q 'hide'

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
You know you're a little fat if you have stretch marks on your
car.   -- Cyrus, Chicago Reader 1/22/82 



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

Date: Fri, 06 Feb 2004 01:04:57 +0900
From: JaSeong Ju <j_kkachi@yahoo.com>
Subject: problem with "our"
Message-Id: <402269A9.9030801@yahoo.com>

Hi..

I'm new to perl.

How come this piece of code does not work in SunOs5.8, with perl v.
5.005_03 ?
--------------------
#!/usr/bin/perl

our $choice = 67.90;
print STDERR " value is: ", $choice, "\n";
exit(0);
-------------
The error is as follows:

Can't modify subroutine entry in scalar assignment at test6.pl line 3,
near "67.90;"
Execution of test6.pl aborted due to compilation errors.





The above script works well in Linux 2.4.20-8 kernel with perl v. 5.8.0.
Also, if "our" is replaced with "my", then script works in both operating
systems.

Is perl version 5.005_03 too old?

Many thanks.

JaSeong Ju



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

Date: Thu, 5 Feb 2004 15:00:16 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: RDBMS to hold Perl objects?
Message-Id: <bvtlq0$cku$1@reader2.panix.com>




Is there a free RDBMS that can handle Perl objects?

Thanks,

jill



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

Date: Thu, 05 Feb 2004 10:16:09 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: RDBMS to hold Perl objects?
Message-Id: <pan.2004.02.05.15.16.07.648382@remove.adelphia.net>

On Thu, 05 Feb 2004 15:00:16 +0000, J Krugman wrote:

> Is there a free RDBMS that can handle Perl objects?

DBD::SQLite
(http://search.cpan.org/~msergeant/DBD-SQLite-0.29/lib/DBD/SQLite.pm)

DBD::Sprite
(http://search.cpan.org/~turnerjw/DBD-Sprite-0.47/lib/DBD/Sprite.pm)

DBD::Trini (Pure Perl DBMS)
(http://search.cpan.org/~miko/DBD-Trini-0.01/Trini.pm)

These *may* be what you're looking for.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Kerr's Three Rules for a Successful College:  Have plenty of
football for the alumni, sex for the students, and parking for
the faculty. 


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

Date: 5 Feb 2004 00:47:02 -0800
From: abhishes@hotmail.com (Abhishek Srivastava)
Subject: Running perl script from command line
Message-Id: <affe9fc.0402050047.901227d@posting.google.com>

Hello All,

I am using active state perl on windows xp. I keep all my perl scripts
in a directory called "c:\myapps\perl\" I have put this directory into
my system PATH.

now to run these scripts I want to go to the console and say

myscript.pl a b c [here a b c are the parameters to the script]

I have also assosiated *.pl extension with c:\perl\bin\perl.exe (using
windows explorer file->folder options)

When I run my script something strange happens, the script is run but
none of the command line parameters are passed to it.

Why are the command line params not being passed to my script?

I am sure someone would have tried this out if you use perl on a
windows machine.

Thanks a lot for your help.

regards,
Abhishek.


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

Date: Thu, 05 Feb 2004 21:33:54 +0900
From: ko <kuujinbo@hotmail.com>
Subject: Re: Running perl script from command line
Message-Id: <bvtd7r$mle$1@pin3.tky.plala.or.jp>

Abhishek Srivastava wrote:
> Hello All,
> 
> I am using active state perl on windows xp. I keep all my perl scripts
> in a directory called "c:\myapps\perl\" I have put this directory into
> my system PATH.
> 
> now to run these scripts I want to go to the console and say
> 
> myscript.pl a b c [here a b c are the parameters to the script]
> 
> I have also assosiated *.pl extension with c:\perl\bin\perl.exe (using
> windows explorer file->folder options)

Its easiest to let the install program create the file association...

> When I run my script something strange happens, the script is run but
> none of the command line parameters are passed to it.
> 
> Why are the command line params not being passed to my script?
> 
> I am sure someone would have tried this out if you use perl on a
> windows machine.
> 
> Thanks a lot for your help.
> 
> regards,
> Abhishek.

In the HTML documentation that comes with AS:

ActivePerl FAQ->Windows Specific->Windows NT/2000 and Windows 9x, the 
'How do I associate Perl scripts with perl?' section.

HTH - keith




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

Date: Thu, 05 Feb 2004 09:05:30 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Running perl script from command line
Message-Id: <pan.2004.02.05.14.05.28.664458@remove.adelphia.net>

On Thu, 05 Feb 2004 00:47:02 -0800, Abhishek Srivastava wrote:

<snip>
> When I run my script something strange happens, the script is run but
> none of the command line parameters are passed to it.
> 
> Why are the command line params not being passed to my script?
<snip>

Code would be helpful :-)

*How* are you parsing the command line options in your script?

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Honesty pays, but it doesn't seem to pay enough to suit some
<people.   -- F. M. Hubbard 



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

Date: 5 Feb 2004 02:32:21 -0800
From: ineverlookatthis@yahoo.com (Steve)
Subject: Re: Site Visitor's eMail Address
Message-Id: <f0d57f86.0402050232.33456143@posting.google.com>

Scott Bryce <sbryce@scottbryce.com> wrote in message news:<10229naq99jk578@corp.supernews.com>...
> Steve wrote:
> 
> 
> > You could send a link like this 
> > 
> > http://www.mysite.com/stuff/grab.pl?name=johnsmith
> 
> John could re-mung this URL, so you wouldn't know it was John.
> 
> This is more of a CGI question than a Perl question.

Err Yes, that's why I wrote the other 2 sentences in my post.


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

Date: Thu, 5 Feb 2004 08:17:15 -0600
From: Web Surfer <raisin@delete-this-trash.mts.net>
Subject: Re: Splitting a String into a List Using Seperator "*"
Message-Id: <MPG.1a8c0c697044ea399897ad@news.mts.net>



In article <d5cfdc47.0401301613.45257334@posting.google.com>, 
clusardi2k@aol.com says...
> Hello,
> 
>    How do I split a string using the library function "split" with an asterisk? 
> I have to tell split break the string when it sees "abc*". I.E.: If I give split
> the string "abc def ghi jkl abc* message" I want to get back two parts.
> I want "abc def ghi jkl" and "message".
> 
>               Thank you,
>               Christopher Lusardi
> 

my ( @fields , $string );

$string = "abc def ghi jkl abc* message";
@fields = split(/\*/,$string);

# see the command "perldoc -f split" for further details


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

Date: Thu, 05 Feb 2004 09:28:52 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Splitting a String into a List Using Seperator "*"
Message-Id: <pan.2004.02.05.14.28.50.926774@remove.adelphia.net>

On Fri, 30 Jan 2004 16:13:43 -0800, Christopher M. Lusardi wrote:

>    How do I split a string using the library function "split" with an asterisk? 
> I have to tell split break the string when it sees "abc*". I.E.: If I give split
> the string "abc def ghi jkl abc* message" I want to get back two parts.
> I want "abc def ghi jkl" and "message".

After reading some of the responses and re-reading this post again, I have
to ask ....

What *exactly* are you trying to do?  It almost seems like an XY problem. 
I say this becasue the last line your your post almost reads like ... you
want to parse a log file ("date ... message" versus "abc efg ... message"
- they *look* similar).

If you're trying to parse a *NIX log file, you could use a module to do
this and make life easier for yourself.  Or, you could use 'unpack', which
may work better for you instead of 'split'.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Peace, n.:  In international affairs, a period of cheating
<between two periods of fighting.   -- Ambrose Bierce, "The
Devil's Dictionary" 


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

Date: Thu, 5 Feb 2004 14:48:41 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: Re: Splitting a String into a List Using Seperator "*"
Message-Id: <bvtl49$ca2$1@reader2.panix.com>


Here's my entry:

split /\s*abc\*\s*/

(string in $_)


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

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 6083
***************************************


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