[15888] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3301 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 9 09:05:26 2000

Date: Fri, 9 Jun 2000 06:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960555911-v9-i3301@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 9 Jun 2000     Volume: 9 Number: 3301

Today's topics:
    Re: Activeware perl 313 and makemake.pm <pds@x-datcon.co.uk>
    Re: Any Perl experts around? (Michel Dalle)
    Re: Calling perl module from C <hmerrill@my-deja.com>
        Chomp problem (-*-)
    Re: Chomp problem (Clinton A. Pierce)
    Re: Config.pm <nospam@nospam.com>
    Re: Content-type header to Set Cookie nobull@mail.com
        Cookies and perl??? <abel@inlander.es>
    Re: couple of beginner questions nobull@mail.com
    Re: Dumb question.. How to prompt the user and get the  <mattking@techie.com>
    Re: Dumb question.. How to prompt the user and get the  <mattking@techie.com>
    Re: Dumb question.. How to prompt the user and get the  <mattking@techie.com>
    Re: Encrypting / decrypting. <mattking@techie.com>
        Error: Can't locate loadable object for module? - csv_x (M. van den Bos)
    Re: form to mail script.. <nospam@nospam.com>
    Re: Help: OOPS Inheritance... <gisle@ActiveState.com>
        Historical charts with chart module <alessio.spadaro@petemark.net>
    Re: Larry Rosler interview on perl.com! (Reini Urban)
        mod_perl: PerlHandler not called from <Directory> hadleyr@hotmail.com
    Re: New perl (Clinton A. Pierce)
        Newbie Help: CGI,DBI attempt (AcidHawk)
    Re: No offense but Larry Wall should do the maths !! <bill.kemp@wire2.com>
    Re: No offense but Larry Wall should do the maths !! <alun.moon@ncl.ac.uk>
    Re: obfuscating script for security of distributed code (Clinton A. Pierce)
        Perl and Novell <switch-01@cistron.nl>
    Re: shadow password file <kenneth.lee@alfacomtech.com>
    Re: site_perl vs lib (Bart Lateur)
    Re: Solution needed for 'simple' task. <sweeheng@usa.net>
        Strategy for processing a log file <brendan@cathouse.nwnet.co.uk>
    Re: Turning off "wrong volume" error in ActiveState? (Clinton A. Pierce)
    Re: URI encoded parameter for CGI.pm problem. <nospam@nospam.com>
    Re: windows -> perl = no longer work <ryanc@nci1.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 9 Jun 2000 12:28:41 +0100
From: "Paul D.Smith" <pds@x-datcon.co.uk>
Subject: Re: Activeware perl 313 and makemake.pm
Message-Id: <8hqkd6$off$1@soap.pipex.net>

Jan,

I've actually written an XS module interfacing to a 'C' library so that was
(relatively) easy.  I was only when I tried to do something "simple" that I
had problems :-).

Thanks for the response though. The bottom line seems to be "hack it or
upgrade"!

Paul DS

--
Please remove the "x-" if replying to sender.
"Jan Dubois" <jand@activestate.com> wrote in message
news:hi01ks4art3sv5qtbmrmb308grb46ic6e9@4ax.com...
> [mailed & posted]
>
> "Paul D.Smith" <pds@x-datcon.co.uk> wrote:
>
> >Anyone hit this?  I have tried to install some Perl libraries (libnet)
but
> >have found that ExtUtils/MakeMaker.pm is absent.  This is with the
Windows
> >NT Activeware port of Perl (build 313).  Anyone know the "correct"
solution
> >to this?
>
> The "Perl for Win32" series (3xx) doesn't support MakeMaker at all.  You
> only solution is to either upgrade or to "manually" install the modules
> (if they even work under Perl 5.003_07).  This should be relatively easy
> for Perl-only modules, but for XS code it is almost hopeless.
>
> -Jan
>




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

Date: Fri, 09 Jun 2000 10:04:53 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Any Perl experts around?
Message-Id: <8hqfk5$e3i$1@news.mch.sbs.de>

In article <8hpqq3$5gf$1@nnrp1.deja.com>, farahas@my-deja.com wrote:
[snip]

I'm sorry, there are no Perl experts here. This newsgroup only discusses
issues concerning camels and other brown animals.

For example :

%%
Before we polish that "diamond", we should probably ask ourselves if
it's brown and stinks.
             -- Larry Wall in <199911061942.LAA29314@kiev.wall.org>
%%
And if it's brown and stinks, we should ask ourselves whether we can
put a saddle on its hump.  :-)
             -- Larry Wall in <199911061942.LAA29314@kiev.wall.org>
%%
A yacc is an unruly beast.
             -- Larry Wall in <199912012050.MAA06214@kiev.wall.org>

More gems can be found at 
http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz

:)

Michel.


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

Date: Fri, 09 Jun 2000 12:48:01 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: Re: Calling perl module from C
Message-Id: <8hqp1s$qpb$1@nnrp1.deja.com>

In article <393EB318.A11DEDCF@attglobal.net>,
  Drew Simonis <care227@attglobal.net> wrote:
> Hardy Merrill wrote:
> >
> >
> > cc -I/usr/lib/perl5/5.00503/i386-linux/CORE
> > -L/usr/lib/perl5/5.500503/i386-linux/CORE -o myfile myfile.o
> >
> > Has anyone else been able to successfully implement invoking a Perl
> > subroutine from a C program?  What are we missing?
> >
>
> Did you check out the documentation at:
>
> http://www.perl.com/pub/doc/manual/html/pod/perlembed.html
>
> called "How to embed perl in your C program"?

Yes I did - I should have mentioned that before.  We've tried to follow
those instructions, but the compile that that documentation advises does
not work, and we're not sure why.  The compile can't seem to find
"EXTERN.h" nor "perl.h".  Anyone else see what our problem is?

--
Hardy Merrill
Mission Critical Linux
http://www.missioncriticallinux.com


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 9 Jun 2000 12:42:21 +0100
From: "Damian (-*-)" <damian@amorphous.co.uk>
Subject: Chomp problem
Message-Id: <JN405.9205$0c7.50076@news2-hme0>

Hi There,

Does anyone have infomation about problems with chomp() ? I developed a
script locally (NT4 / Apache / ActivePerl) that worked fine with the lines :

 # Read all lines in ...
 while ($fileline = <HIFILE>)
 {
  # Remove trailing EOL char ...
  chomp($fileline);

  # Anything left to use ?
  if (length($fileline) != 0)
  {
   $inTable[$entryCount++] = $fileline;
  }
 }

which basically reads lines from a file, storing them after stipping the end
of line character. When I tried this on our live server (BSDi / Apache / and
Perl V5.005_03 built for i386-bsdos by Larry Wall), I get the following
errors :

"chomp" may clash with future reserved word at
/usr/local/etc/httpd/cgi-bin/jeghitable.pl line 46.
syntax error in file /usr/local/etc/httpd/cgi-bin/jeghitable.pl at line 46,
next 2 tokens "chomp("
Execution of /usr/local/etc/httpd/cgi-bin/jeghitable.pl aborted due to
compilation errors

So what is so wrong with chomp($fileline) on this setup ? Or how can I
replace it with something that strips trailing whitespace / EOL characters ?

TIA

Damian (-*-)





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

Date: Fri, 09 Jun 2000 12:32:09 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Chomp problem
Message-Id: <dt505.103644$h01.823272@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <JN405.9205$0c7.50076@news2-hme0>,
	"Damian (-*-)" <damian@amorphous.co.uk> writes:
> 
> which basically reads lines from a file, storing them after stipping the end
> of line character. When I tried this on our live server (BSDi / Apache / and
> Perl V5.005_03 built for i386-bsdos by Larry Wall), I get the following
> errors :

It lied.  It's not perl 5.005_03.  It's not even Perl 5.  Watch and learn...

> "chomp" may clash with future reserved word at

Uh-oh.  Perl doesn't know what chomp() is?  That's a new keyword in Perl 5!

> next 2 tokens "chomp("

"next 2 tokens" are a red flag that tells you that this is Perl 4.  No 
mistaking it at all.  Double check the #! line of your script, use "perl -v"
to get the version number and yell at your sysadmin for having an unmaintained,
ancient, crufy, dead version of a language installed on your system.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: 9 Jun 2000 12:00:58 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Config.pm
Message-Id: <8hqm9q$nhu$4@216.155.33.31>

In article <394063F3.F507E361@208.23.123.242>, James Tolley 
<james@208.23.123.242> wrote:

 | The WebDragon wrote:
 | > 
 | > #!perl -w
 | > print Config::myconfig();
 | > 
 | > prints out osvers=7.5 despite the fact that I am running on MacOS 8.6
 | 
 | myconfig() doesn't ever look to find anything out about the current
 | environment.
 | It just looks at hard-coded strings $summary and $config_sh, both found
 | in Config.pm

so, if I wanted to be able to report OS 8.6 compatibility or os 9.x 
compatibility to testers.cpan.org I'd need to basically compile my own 
perl instead of using the MacPerl binary install provided by Matthias 
Neeracher, correct?

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: 09 Jun 2000 12:12:52 +0100
From: nobull@mail.com
Subject: Re: Content-type header to Set Cookie
Message-Id: <u9hfb3kszv.fsf@wcl-l.bham.ac.uk>

Tom Briles <sariq@texas.net> writes:

> The language you choose for the program is irrelevant.  Ask in a group
> which discusses HTML.

Whereupon the OP will be told the markup language (or other content
type) that you use for the HTTP entity content is also irrelevant.
The OP should ask in a group which discusses HTTP.  Whereupon the OP
will be told to RTFM.

Please do not direct people who bring non-Perl questions to
comp.lang.perl.* away to equally inappropriate fora. 

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 09 Jun 2000 11:26:29 GMT
From: Abel Almazan <abel@inlander.es>
Subject: Cookies and perl???
Message-Id: <3940D48A.856FECE2@inlander.es>

How can i ignore a cookie from an URL??

I made a perl script that connects to an URL and downloads the HTML.
Then, the perl script get only some lines (containing some key words),
and this lines  are mounted as HTML and viewed on the browser, but.....

 ....when i connect to an URL with cookie validation, then i cant get the
HTML because the perl script gets the cookie validation page.

How can i ignore this page an go to the page i'm really interested
on????

Send the answer to my mail too.

Thanx a lot.



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

Date: 09 Jun 2000 12:25:14 +0100
From: nobull@mail.com
Subject: Re: couple of beginner questions
Message-Id: <u9g0qnksf9.fsf@wcl-l.bham.ac.uk>

"Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com> writes:

>     Hi,
> 
> ldkramer@my-deja.com schrieb in Nachricht <8gvftp$hf4$1@nnrp1.deja.com>...
> >Hello, I have two questions that I haven't been able to find the
> >answers to.  Hope someone can help!
> >
> >1. Is it possible to write a CGI script that doesn't make the browser
> >display any new HTML when it's done running?  I keep seeing references
> >to CGI scripts that either spit out some HTML (that wipes out what was
> >in the browser window) or that redirect the browser to some other
> >page.  I can't figure out how to just "do nothing" when the CGI script
> >is done.
> 
>     doing "nothing" is really difficuilt. The reason for this is that
>     stdout from the cgi is redirected to the web server which
>     additionaly generates a http header. Thus the browser gets
>     some answer anyway but you can try to redirect it to a particular
>     target window. I have not done it but I would try to include an
>     iframe (or a traditional frame window) of height=0, width=0 in
>     your page and redirect the output of your cgi to this invisible frame.

That's a passable work-round for broken web clients.  For non-broken
clients use a 204 status.  204 exists in HTTP/1.0 but is better
documented in 1.1.

  10.2.5 204 No Content 

  The server has fulfilled the request but does not need to return an
  entity-body, and might want to return updated metainformation. The
  response MAY include new or updated metainformation in the form of
  entity-headers, which if present SHOULD be associated with the
  requested variant. 

  If the client is a user agent, it SHOULD NOT change its document view
  from that which caused the request to be sent. This response is
  primarily intended to allow input for actions to take place without
  causing a change to the user agent's active document view, although
  any new or updated metainformation SHOULD be applied to the document
  currently in the user agent's active view. 

  The 204 response MUST NOT include a message-body, and thus is always
  terminated by the first empty line after the header fields. 

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 9 Jun 2000 12:15:09 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <8hqg45$th0$1@news2atm.raleigh.ibm.com>

No, I used the example not requiring the use of an external module. I only
want this in the main file, no where else. So I use the getc command. In C I
can use, for example, getch, does Perl have a native command for doing this?

Matt
Abe Timmerman <abe@ztreet.demon.nl> wrote in message
news:6pc1kscelengsjptc78uo80n5k6qg6s14d@4ax.com...
> On Fri, 9 Jun 2000 10:07:22 +0200, "Matt King" <mattking@techie.com>
> wrote:
>
> > As well as that, the information in the Perl FAQ does not work with
Active
> > Perl. I added the commands, and nothing happens. It's just skipped over.
> > Perhaps that's why it's not in the Active DOC's.
>
> You mean you wrote the test program as is stated in perlfaq8, like:
> use Term::ReadKey;
> ReadMode('cbreak');
> print "Press any key ";
> my $key = ReadKey(0);
> ReadMode('normal');
> print "OK\n";
>
> and it skipped over the 'my $key = ReadKey(0)' line?
> then your Term::ReadKey might be broken, try to reinstall it:
> ppm install TermReadKey
>
> And (re)read the docs:
> perldoc Term::ReadKey
>
> >
> > Comments? Do you, perhaps, know how one does it with Active Perl? And
please
> > don't point me to another DOC, unless it's really included with the
Active
> > Perl, and really is in the DOC's, please.
>
> FYI: It _is_ in perlfaq8!
> perldoc -q read
> perldoc perlfaq8
>
> --
> Good luck,
> Abe




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

Date: Fri, 9 Jun 2000 12:21:54 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <8hqggr$9mc$1@news2atm.raleigh.ibm.com>

I have Active Perl 5.00503 and the documentation is different and not the
same as the Perl that is commenly refered to here. Perhaps they have seen
this error and corrected it, but only after I downloaded and installed that
version? I don't know. But the docs that I have with my installed version
are very different then what you are all refering to. Perhaps I just need to
dl and install a newer version, but that seams a waist when the only thing
missing/incorrect are the docs. The software it's self is fine and I see no
reason to update it.

Matt
Peter Hill <phill@modulus.com.au> wrote in message
news:3940A657.59A0@modulus.com.au...
> Matt King wrote:
> >
> > Interesting. Just shows how different the Avtive Perl Dist. and the real
> > Perl Dist. are. Namley, this EXACT topic IS NOT in the Active Perl FAQ
docs.
> [snip]
>
> Strange indeed; at:
> http://www.activestate.com/Products/ActivePerl/docs/index.html
> the topic *is* in the on-line docs for ActivePerl 5.6.0.613, and on my
> hard disk for Active Perl 5.005003 the topic *is* in the inline docs, in
> the perlfaq which Lauren mentioned.
>
> Do you have a rather obscure version of ActivePerl installed with
> defective docs.?
>
> > >
> > > Behold:
> > >
> > > perlfaq8: How do I read just one key without waiting for a return key?
> > >
> > > Lauren
> --
> Peter Hill,
> Modulus Pty. Ltd.,
> http://www.modulus.com.au/




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

Date: Fri, 9 Jun 2000 12:29:21 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <8hqguq$15js$1@news2atm.raleigh.ibm.com>

OK I got it. I used the $key = getc(TTY); from the docs and that does not
work. However, changing that to $key = getc(); and it does work. I didn't
see that is not docs so.....

I guess Perl does have a native way of doing this. It's just a matter of
using what's in the docs, and a bit of guess work. Is it possible to have
that added to the docs with some type statement that that line will work
with Active Perl under Windows 9X, NT, and 2000?

Matt




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

Date: Fri, 9 Jun 2000 14:02:20 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Encrypting / decrypting.
Message-Id: <8hqmd6$toc$1@news2atm.raleigh.ibm.com>

Hi, I like your example, however, it just doesn't give me the output I
need/want.
Using your script, I converted 11 and got 31311. I would like it better if
that was shown in a hex number (like AF for example). I have tried making
some changes to script to get that, but I have yet to get it working. Can
you help me out with that (also the decoder needs to work the same, but in
reverse)?

Thanks. Matt

Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:393FCF9F.6312ADFA@stomp.stomp.tokyo...
> Matt King wrote:
>
> > Hi. I need a way to encrypt and decrypt a small string
> > (between 8 and 16 chars). I have looked on CPAN, but all
> > I find are add-in modules. I need something small...
>
> > ...so that the file is a 'stand alone' file and can be
> > moved from PC to PC without installing anything...
>
> > I would like some type of encryption that can't easly be
> > broken and doesn't make the encrypted string more then
> > double the orginal length...
>
> > Can one of you please help me out with this?
>
>
>
> Funny, encryption and modules, yet again...
>
>
> I love these type of questions. Just takes a bit of old
> fashion imagination Matt. Not doubling your original
> string length using HEX as you suggest, clearly is
> quite impossible. HEX doubles a string, inherently.
> Would you mind double length plus one?
>
> This test script and results below, affords encoding
> and decoding based on four basic principles:
>
> Encode based on a random ROT-13 variation.
> Reverse a string.
> HEX encode.
> Append a decode key.
>
>
> I have limited this to two ROT-13 variations
> to keep it a simple example. You can develop
> as many ROT-13 variations as you like and key
> them to a random number generator.
>
> Reversing your string adds a 'frustration' factor.
>
> HEX, not all that secure but befuddles those who
> are not familiar with HEX encoding; a bit more
> frustration for those with idle hands.
>
> Your Green Hornet Magic Key, a random number,
> can be prepended or appended to your string
> then extracted for decoding.
>
> However, there is another slick trick you
> may employ, one of dozens of variations.
> You could include a random substring, slice
> up your string, glue it together backwards,
> sidewards, upside down, whatever and, the
> reverse for decoding. Easy enough to do
> by generating a random number for a substring
> start position or a substring character count,
> or both! A random substring number could also
> be used to conceal your decode number or numbers
> well within a string.
>
> You might even consider adding a number to each
> of your HEX numbers, or multiply, divide...
> Lots and lots of 'stuff' you can do.
>
> How complicated you make this is only limited
> by your imagination and how much work you are
> willing to give this methodology.
>
> Naturally this method can be cracked but would
> be rather frustrating. This method is not intended
> for absolute high level security but may well
> meet your needs for casual encoding, as a stand
> alone method with no need for any modules. Your
> security with this method relies on frustration,
> not on high level eighty-bagillion key encryption
> requiring a ten gigabyte module taking forty-seven
> hours to run and complete.
>
> Otherwords, it's stand-alone and portable.
>
> Have fun with this, should you decide to
> use something similar to this. If you wish
> to test this code of mine, it is quite
> portable and will run under any Perl 4
> or Perl 5 version, no problems. This code
> is ready to run on your server.
>
> Godzilla!
>
>
> "Imagination is more important than knowledge."
>
>   - Albert Einstein
>
>
>
> SAMPLE PRINTED RESULTS
> ______________________
>
> Input Sample Is:
>      Green Hornet Secret Decoder Ring
>
> Encoded Sample Is:
>      7a67624b206b787768767857206d786b76784c206d78676b6841206778786b5a1
>
> Decoded Sample Is:
>      Green Hornet Secret Decoder Ring
>
>
> SAMPLE PRINTED RESULTS
> ______________________
>
> Input Sample Is:
>      Green Hornet Secret Decoder Ring
>
> Encoded Sample Is:
>      6e75705920796c6b766a6c4b20616c796a6c5a20616c7579764f20756c6c794e0
>
> Decoded Sample Is:
>      Green Hornet Secret Decoder Ring
>
>
>
> TEST SCRIPT
> ___________
>
> #!/usr/local/bin/perl
>
> print "Content-Type: text/plain\n\n";
>
> $sample = "Green Hornet Secret Decoder Ring";
>
> print "Input Sample Is:
>      $sample\n\n";
>
>
> ## Encode:
>
> local ($random_key) = int(rand(2));
>
> if (!($random_key))
>  {
>   srand;
>   $random_key = int(rand(2));
>  }
>
> if ($random_key == 0)
>  { $sample =~ tr/a-zA-Z/h-za-gH-ZA-G/; }
>
> elsif ($random_key == 1)
>  { $sample =~ tr/a-zA-Z/t-za-sT-ZA-S/; }
>
> else
>  { print "Random Key Generation Failed"; exit; }
>
> $sample = reverse ($sample);
>
> $sample =~ s/(.)/sprintf('%02x',ord($1))/ge;
>
> $sample = join ("", $sample, $random_key);
>
> print "Encoded Sample Is:
>      $sample\n\n";
>
>
> ## Decode:
>
> $random_key = chop ($sample);
>
> $sample =~ s/([0-9A-Fa-f]{2})/sprintf("%c",hex($1))/ge;
>
> $sample = reverse ($sample);
>
> if ($random_key == 0)
>  { $sample =~ tr/h-za-gH-ZA-G/a-zA-Z/; }
>
> elsif ($random_key == 1)
>  { $sample =~ tr/t-za-sT-ZA-S/a-zA-Z/; }
>
> else
>  { print "Random Key Generation Failed"; exit; }
>
> print "Decoded Sample Is:
>      $sample\n\n";
>
> exit;




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

Date: Fri, 09 Jun 2000 12:13:44 GMT
From: mvdbos@integral.nl (M. van den Bos)
Subject: Error: Can't locate loadable object for module? - csv_xs.pm (0/1)
Message-Id: <3940de9b.12474080@news.nl.net>

Hello,

When running my program (more information below) in a browser or from
the comman-line, I get this error:

Can't locate loadable object for module Text::CSV_XS in @INC 
(@INC contains: /usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005 .) at DBD/CSV.pm line 47

As far as I know this error doesn't say that the package Text::CSV_XS
can't be found, But what it does say I don't know. 
There is a subroutine 'new()' in CSV_XS.

I haven't installed the module in perl. 
This is because I have no root privileges on the system.

To show what I have done to still be able to use these modules I will
try to make a representation of my cgi-bin dir. I hope this is
intelligable.

|cgi-bin|
	- Main.pl
	- |DBD|
		- File.pm
		- CSV.pm
	- |Text|
		- CSV_XS.pm
	- |SQL|
		- Statement.pm
		- Eval.pm
		- |Statement|
			- Statement.pm


line 47 in DBD/CSV.pm looks like this:
use Text::CSV_XS();

The version of Text::CSV_XS is 0.20

Attached is the Text::CSV_XS module

Any help would be greatly appreciated.




--
Matthijs van den Bos     INTEGRAL Knowledge Utilization BV
mvdbos@integral.nl       www.integral.nl


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

Date: 9 Jun 2000 11:58:35 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: form to mail script..
Message-Id: <8hqm5b$nhu$3@216.155.33.31>

In article <39401088.2228AAF0@attglobal.net>, Drew Simonis 
<care227@attglobal.net> wrote:
 
 | Not using CGI.pm or some similar CGI module is one of the 
 | oddities of this script, one that I am sure many won't like.
 | (Now that I know what it means, I can use it...  here I go)

 | This is Cargo Cult programming:

I remember reading some sci-fi stories related to this, but how does the 
'cargo cult' reference apply to perl? :) (I mean, I sorta get it, but I 
wanna get it in the way that it's intended to be gotten *chuckle*)
 
 | read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
 | 
 | # Split the name-value pairs
 | @pairs = split(/&/, $buffer);
 | 
 | foreach $pair (@pairs)
 | {
 |     ($name, $value) = split(/=/, $pair);
 | 
 |     # Un-Webify plus signs and %-encoding
 |     $value =~ tr/+/ /;
 |     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
 |     $name =~ tr/+/ /;
 |     $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
 |     
 |     $FORM{$name} = $value;
 | }
 | 
 | (I feel much better now)
 | 
 | 
 | And this:  
 | 
 | # clean up the recipient address, to avoid hackers
 | ($whoto) = ($FORM{'recipient'} =~ /([\w\.\-\%]+\@[\w\.\-]+)/);
 | if ($whoto eq "") {
 |    &safe_die("Invalid Recipient!\n");
 | }
 | 
 | is bad. Better would have been to use something like Email::Valid,
 | but even that has numerous pitfalls.  But, since we only want to 
 | check to make sure we aren't passing shell escapes to sendmail,
 | the usage of a validity check is warranted. 

I can't help but think it would be simpler to use some sort of Net::SMTP 
module or something for this instead. (now that I'm aware of such things 
:D )

 | Im kinda unsure about why I see the author "Un-Webify plus signs 
 | and %-encoding" 3 times.  That just seems odd.

yeah, I agree, particularly when it could have been simply wrapped into 
a subroutine. 

Anyone else have any thoughts on this bad boy before I retire it?

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: 09 Jun 2000 13:24:23 +0200
From: Gisle Aas <gisle@ActiveState.com>
Subject: Re: Help: OOPS Inheritance...
Message-Id: <m33dmnp060.fsf@eik.g.aas.no>

abigail@arena-i.com (Abigail) writes:

> On Mon, 05 Jun 2000 15:10:57 GMT, Eisen Chao <echao@interaccess.com> wrote:
> ++ To All:
> ++ 
> ++ I need some help in setting up my very-first .PM
> ++ and getting the inheritance to work right. Given:
> ++ 
> ++ HTMLStrip.pm
> ++ -------------------------------------------
> ++    package HTMLStrip;
> ++    require Exporter;
> ++    @ISA         = qw( Exporter HTML::Parser );
> ++    @EXPORT_OK   = qw ( $global_string );
> ++ 
> ++    # package Main; # doesn't work if I include or not include...
> ++    $global_string = "";
> ++    sub text {
> ++        my ( $self, $text ) = @_;
> ++        $global_string .= $text;
> ++    }
> ++    1;
> ++ 
> ++ 
> ++ test1.pl
> ++ ----------------------------------------------
> ++    use HTMLStrip;
> ++ 
> ++    $p = new HTMLStrip;
> ++ 
> ++    $content = "";
> ++    $file = "joel.html";
> ++ 
> ++    open FIL, "<$file";
> ++    while (<FIL>) {
> ++       $content .= $_;
> ++    }
> ++ 
> ++    $p->parse($content);
> ++    $p->eof;
> ++ 
> ++    print "-->$p::global_string<--";
> ++ 
> ++ When I run this I get an error:
> ++ 
> ++    "Can't locate object method "new" via package HTLMStrip" at
> ++     test1.pl line 5"
> ++ 
> ++ what am I missing here ?
> 
> 
> Well, I don't see any subroutine called 'new' in your code....

And the reason HTML::Parser's new is not invoked either is that the
module was not loaded.  A 'require HTML::Parser' before setting up
@ISA would help.  A 'use base qw(Exporter HTML::Parser)' would also
help since base will automatically require stuff.

It is generally a bad idea to inherit from Exporter when you write a
OO module.  Consider taking Exporter out of your @ISA.

-- 
Gisle Aas


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

Date: Fri, 9 Jun 2000 14:46:52 +0100
From: "Alessio Spadaro" <alessio.spadaro@petemark.net>
Subject: Historical charts with chart module
Message-Id: <8hqp46$g1m$1@stargate1.inet.it>

Anyone know if it's possible to pruduce historical charts (i.e. with date on
the x-axis) with the chart module?
Thanks
Alessio Spadaro
Petemark.net





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

Date: Fri, 09 Jun 2000 11:18:11 GMT
From: rurban@x-ray.at (Reini Urban)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3940cfb0.73215818@news>

Larry Rosler wrote:
>Standardization may be 'de jure' or 'de facto'.  Because of its 
>monopolistic clout, anything Microsoft promulgates by itself is de facto 
>standardized.  They tried to subsume and subvert the de facto 
>standardization of Java to their own purposes, but have failed so far.  
>And I have been told that Visual C++ is a travesty of the C++ Standard.
>
>Perl is in fact already de facto standardized (because of the single 
>official source), but the definition is vague and there is no corporate 
>clout to support it.  That is why I believe a more formal, de jure 
>activity is required.
>
>But the Open Source movemet may be creating a new paradigm for 
>standardization.  We shall see!

As long there is only one official source there's no need for any
standardization. lisp, C, C++ e.g. had to be standardized because of
multiple competing implementations and vendors vs. the big user
community, but languages like python or perl will never need that. 
esp. after ActiveWare (my only fear some years ago) being incoorporated
into the 5.6 process. same with mark hammond with pythonwin. it's not
only open source it's also good politics.

A formal activity will be VERY time-consuming. 
And perl should hold itself back from the buzzword throwing manager
crowd who will be the only folks who would be impressed by this.
The community doesn't need that.
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html


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

Date: Fri, 09 Jun 2000 12:44:00 GMT
From: hadleyr@hotmail.com
Subject: mod_perl: PerlHandler not called from <Directory>
Message-Id: <8hqoqc$qeg$1@nnrp1.deja.com>

Hi,

I have written a PerlHandler that executes when called from within a
Location tag. But doesn't even get called when I change the tag to
being a Directory tag.

e.g
<Location>
    SetHandler perl-script
    PerlHandler Apache::MyModule
</Location>
Works fine

<Directory>
    SetHandler perl-script
    PerlHandler Apache::MyModule
</Directory>

NOTHING HAPPENS ...!

Anyone know why this is ?

MTIA
Richard




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 09 Jun 2000 12:34:42 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: New perl
Message-Id: <Cv505.103647$h01.823272@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <3940B383.75CD3185@eleganceintime.com>,
	Christopher Hahn <chahn@eleganceintime.com> writes:
> (I wanted to build in threading anyway)

Then you'll probably want to rebuild your modules as well.

> Well, the previous version was in /usr, including
> libraries.  The new version installed into /usr/local
> by default (which is where I wanted it in the first
> place). (5.00503 vs. 5.6)

Don't forget to remove the old one first.  Remember that 
during the configure stage, you can specify where you want
perl to go with --prefix.

> What I want to know is whether I will need to reinstall
> the modules into the new /usr perl install?

The key phrase is "rebuild" those modules.  Your Perl binary
will have changed enough from 5.00503 (nothreads) to 5.6 (threads)
that the modules which contain binary components might not work
correctly.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Fri, 09 Jun 2000 12:26:34 GMT
From: acidhawk@flashmail.com (AcidHawk)
Subject: Newbie Help: CGI,DBI attempt
Message-Id: <3942e1de.177491919@news1.mweb.co.za>

Hi

I have written this to output the results from the SQL select to a web
page nothing fancy..  When I run it from the cmd line I get what the
source for the web page should look like but when I execute this from
a link on antoher page all I get is the head stuff until the HtmBefore
nothing after that where the connect to the DSN starts


Any help would be much appreciated..

#########################################################
#!D:\Perl\Bin\perl.exe

use DBI;

# Create Header for CGI

print "Content-type:text/html\n\n"; 

print <<HtmBefore;
<html>
<head>
<title>
Availability Report
</title>
</head>
<body>
<center><h2>
Router Availability Report on Interface
</h2></center>
<hr>
<p><p>
<DIV ALIGN=CENTER><TABLE BORDER='0' WIDTH='400'>

HtmBefore

#Connect to DSN


$dbh = DBI->connect('DBI:ODBC:Test' ,'sa' ,'pass') or die "Couldn't
connect to database: " . DBI->errstr;

# Build SQL statement

$st = "SELECT NodeID,Interface,sum(DownTime) FROM NetStatus where
DownTime != '0' group by Interface,NodeID";

# Prepare and Execute SQL statement

$sth = $dbh->prepare($st);
$sth->execute;

while (@row=$sth->fetchrow_array) {

print "<TR><TD>@row[0]</TD><TD>@row[1]</TD><TD>@row[2]</TD></TR>"; 

}

print <<HtmlAfter;
</TABLE></DIV>
<hr>
<p>
<center>
<a href=http://localhost/default.htm>Home</a>
</center>
<br>
</body>
</html>

HtmlAfter

#########################################################


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

Date: Fri, 9 Jun 2000 12:44:58 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: No offense but Larry Wall should do the maths !!
Message-Id: <960551204.4745.0.nnrp-01.c3ad6973@news.demon.co.uk>

<snip>

> > Hint for the truly lazy:  Try it again with rand() instead of just rand.


I find my code has more brackets in it than the code I see elsewhere.
I think style comments say that's OK if you feel like it. (and (rand()*3))
works)

Would I be saved from other unusual featurees with my bracket fetish?
Is there any real penalty from over-use of brakets?

BK




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

Date: Fri, 09 Jun 2000 13:03:43 +0100
From: Alun Moon <alun.moon@ncl.ac.uk>
Subject: Re: No offense but Larry Wall should do the maths !!
Message-Id: <3940DD1F.6CA54D96@ncl.ac.uk>

Since rand produces different numbers on successive calls the following
$r = rand;
print "random number is $r\n";
print int($r*30)."\n";
print int(30*$r)."\n";
 
produces
random number is 0.205291748046875
6
6

There may be an additional problem with the rand*3 and 3*rand test,
rand takes an argument, it may be confused with followed by the *3
(though I'm not too familiar yet with how Perl deals with un bracketed arguments
or not)

Alun


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

Date: Fri, 09 Jun 2000 12:37:17 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: obfuscating script for security of distributed code
Message-Id: <1y505.103662$h01.823272@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <slrn8k1at1.4i7.eric@plum.fruitcom.com>,
	eric@fruitcom.com (Eric Smith) writes:
> (second attempt)

It's the second attempt because what you want is nonsense.

> I have been unable to locate a code obfuscating script tat I know is out
> there.  For removing white space, changing variable names, whatever.

Obfuscation is one thing...

> The purpose is to discourage tampering or backward engineering of
> distributed code.  We have given up comiling our code which previously
> served this purpose.

Security through obscurity is not secure at all.  If Perl can read it,
then programmers can too.  Don't fool yourself, buddy.  This is what 
licenses, copyrights and (sigh) patents are for.  Use them wisely.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Fri, 9 Jun 2000 13:22:01 +0200
From: "Merlijn Freij" <switch-01@cistron.nl>
Subject: Perl and Novell
Message-Id: <8hqjup$o5l$1@enterprise.cistron.net>

Hi,
Is there any (perl) tool available to communicate with NDS (Novell).
I develop an intranetsite which needs to communicate with
NDS to obtain Passwords and Logins for the security.

Merlijn




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

Date: Fri, 09 Jun 2000 18:57:41 +0800
From: Kenneth Lee <kenneth.lee@alfacomtech.com>
To: mnatoni@rumbanet.it
Subject: Re: shadow password file
Message-Id: <3940CDA5.1B322DCB@alfacomtech.com>

Thanks for your quick response.
However I'm not only doing lookup, but updates. It seems only 
the putspent() function in libshadow can do this.


Marco Natoni wrote:
> 
> Kenneth,
> 
> Kenneth Lee wrote:
> > Is there any tools available for manipulating the shadow
> > password file?  I got Crypt::PasswdMD5, but then I've to update
> > the file myself and do the lookup one by one. It's good if there's
> > an interface to the libshadow library.
> 
>   I had a similar problem.  That's the Jonathan Stowe's ultimate answer:
> 
> <cite>
>         Q: I wonder if someone can point me to a module (or give
>         Q: me just a tip) in order to verify the UNIX
>         Q: authentication of an user when the shadow password system
>         Q: is used.  I have read the FAQ, but, as a terrifying
>         Q: caveat recites, "If perl was> installed correctly, and
>         Q: your shadow library was written properly, the
>         Q: getpw*() functions described in the perlfunc manpage
>         Q: should in theory provide (read-only) access to entries in
>         Q: the shadow password file.".  That theory is unfortunately
>         Q: not effective for my system (Linux):  In fact,
>         Q: getpwname returns a disconsolate 'x' in the
>         Q: password field.
>         A: In 5.6.0 this has been fixed for OS that have System V
>         A: style shadow password functions (such as Linux or
>         A: SCO ) although it still says the same thing in perlfunc -
>         A: I have submitted a doc patch via perlbug.
> </cite>
> 
>   Hoping that it could help you...
> 
>         Best regards,
>                 Marco


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

Date: Fri, 09 Jun 2000 11:45:06 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: site_perl vs lib
Message-Id: <3943cc70.3047843@news.skynet.be>

The WebDragon wrote:

>If I understand this correctly, MacPerl will use any modules installed 
>in site_perl, preferring them over the ones in lib? or is there 
>something else I need to do ?

You need to do it. The search order is defined by the order of the
folders in the "Preferences" -> "Libraries" (which will get copied into
@INC). If site_perl comes first, then that will be tested first.

One of the modules written/poted by Chris Nandor depends on this (I
think it's CPAN.pm), because he included a newer version of a module
which is standard, and it doesn't work with the old version.

I don't like this approach. If you're sure a new version is backward
compatible with your old scripts, you should simply remove the older
version, so that there are no conflicts at all, and no matter what order
the library folders are in @INC, you always load the same version of the
module.

-- 
	Bart.


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

Date: Fri, 9 Jun 2000 18:39:43 +0800
From: "Swee Heng" <sweeheng@usa.net>
Subject: Re: Solution needed for 'simple' task.
Message-Id: <8hqh6s$r8e$1@clematis.singnet.com.sg>

> This works perfectly for the example you gave. Unfortunately in trying
> to simplify the details of the task I think I must have misled you
> regards the terms.
No, I was not misled.

> The contents of the list are actually words, not
> letters, and so the code doesn't work - it returns the terms with
> incremented last-letters.
Oh really??? It didn't work???

> Can you suggest an appropriate modification?
None required. Try this with the *same* pretty() function:

sub pretty { ($c = pop @_, @_)[1] ? (join (', ', @_) . " and $c") : $c }
@annoyed_words = qw(DID YOU EVEN TRY THE CODE ??? !!!);
print pretty (@annoyed_words);





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

Date: Fri, 9 Jun 2000 14:01:00 +0100
From: "Brendan Newport" <brendan@cathouse.nwnet.co.uk>
Subject: Strategy for processing a log file
Message-Id: <3940e9f0$1@news.telinco.net>

I'm in the process of evaluating a method for processing a log file from a
provisioning process.

The log file contains a huge degree of spurious data. However I'd like to
extract individual lines and print them to a file.

The data I'm after always appears numerous times in an uninterrupted
section, separated by the spurious data.

So I'd like to identify the lines between a start pattern and end pattern,
and then print both and everything in between, for each occasion where the
patterns match. The number of lines between the patterns is always fixed.

So for instance I'd like to print lines that might be between line 2-10 ,
52-60, 100-108, but without knowing what the numbers those sections are
beforehand.

Sounds easy enough I'm sure to an experienced Perl programmer (but I'm not
even a beginner!)

Could anyone suggest some strategies for achieving this sort of result? But
without explicitly showing me how to do it, otherwise I'll never learn for
myself.

Thanks in anticipation,


Bren






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

Date: Fri, 09 Jun 2000 12:39:31 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Turning off "wrong volume" error in ActiveState?
Message-Id: <7A505.103664$h01.823272@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <8hotq1$fro$1@nnrp1.deja.com>,
	azzarito@bigfoot.com writes:
> Does anyone know how to turn off the "wrong volume" error in
> ActiveState perl? I've got a script that uses a win32 app to write a
> diskette image to a floppy drive. Once I do that, if I try to open a
> file on the floppy, I get a "wrong volume" error popup.

Post code!  Not vague accussations!

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: 9 Jun 2000 11:42:51 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: URI encoded parameter for CGI.pm problem.
Message-Id: <8hql7r$nhu$2@216.155.33.31>

In article <8hppk7$4me$1@nnrp1.deja.com>, crrjohnson@my-deja.com wrote:

 | Thanks for your responses.
 | 
 | At first this appeared to be an issue in perl, and I tried escaping out
 | the ampersand appropriately.
 | 
 | On further testing, I found that Perl was okay debug mode for the cgi
 | module from the command line works fine, so it <em>is</em> a SSI issue
 | not Perl as I originally thought.
 | 
 | I have posted a message in alt.www.webmaster to see if someone knows how
 | to solve it.  The documentation for SSI that I have seems to say that it
 | should work. (Apache web site, O'Rieley Webmaster in a Nutshell, etc)
 | 
 | Thanks again,
 | Colin.

cc: me a reply when you figure it out. I'm interested.

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Fri, 9 Jun 2000 06:35:27 -0400
From: "Ryan & Treena Carrier" <ryanc@nci1.net>
Subject: Re: windows -> perl = no longer work
Message-Id: <3940c889_2@news.cybertours.com>

What server software is he running? Sounds like your cgi-bin needs to be
given the rights it needs.
Blair Heuer <ab@cd.com> wrote in message
news:Pj_%4.31784$2X2.290742@newsread2.prod.itd.earthlink.net...
> Recently my server admin changed the operating his server from Windows to
> Linux. Hooray, right? Not exactly. All the little differences are making
all
> of my scripts, which are critical to operation, non-operational.
>
> In one script I get a header error. Here is the start of the code:
>
> <snippet>
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
>
> </snippet>
>
> Running the program from the command line if fine. But I get a 500 server
> error from the web. Other scripts work fine with the same headers. What is
> going wrong?
>
> Any help appreciated.
>
>




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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 3301
**************************************


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