[7212] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 837 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 9 08:17:23 1997

Date: Sat, 9 Aug 97 05:01:01 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 9 Aug 1997     Volume: 8 Number: 837

Today's topics:
     Re: [Q] Converter between ELM filter-rules file to proc (Sven Guckes)
     Re: awful suspicion about hash of arrays and dbm (Paul Marquess)
     BASE64 problem with special word <ip@cybernet.dk>
     Case Statement.. (CT2963)
     Re: changing perl to gibberish (brian d foy)
     Re: chop vs chomp (Jonathan Feinberg)
     DB_File Perl 5.004 compilation problem under BSDI (Gregg Graubins)
     Re: file locking - how does it act? (Matthew Burnham)
     Re: File locking (Bart Lateur)
     Re: GD with win32 perl: parse error! (Mr R Hamilton)
     Re: Have array, will (won't?) sort (Tad McClellan)
     Head of CGI Department <rbhattac@jetson.uh.edu>
     Re: Help.. <mystery@itis.com>
     Hopefully not a cgi question... (Mark Bainter)
     Re: How to get file names from a directory (Matthew Burnham)
     Re: html --> perl (Matthew Burnham)
     Re: known perl limitations (Matthew Burnham)
     Re: MLDBM manual page (Mike Stok)
     Module installation <tony@qsvideo.com>
     Re: Need help with split (Andrew M. Langmead)
     Re: Need help with split (Tad McClellan)
     Perl and ODBMS (Raz Shlomovich)
     perl-5.004 on UW prob (was: Re: perl-5.003 on UW: 'make <schludi@ra.syscomp.de>
     Re: please help me modify this perl script (Jonathan Feinberg)
     Re: Problems with Internet Explorer running a PERL scri <rootbeer@teleport.com>
     Re: Puzzle to be solved (Matthew Burnham)
     Re: Run PERL Programs in Win95? (Matthew Burnham)
     Re: sleep not mixing well with other signal handlers (Charles DeRykus)
     SQL error message handling with sybPerl? <id@aom.ericsson.se>
     XS and variable length ret values <jheck@merck.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 7 Aug 1997 20:15:37 GMT
From: guckes@math.fu-berlin.de (Sven Guckes)
Subject: Re: [Q] Converter between ELM filter-rules file to procmailrc file?
Message-Id: <slrn5ukb78.fuq.guckes@banach.math.fu-berlin.de>

ramsch@forwiss.uni-passau.de (Martin Ramsch):
> Motivated by your suggestions I did some bug-fixes
> and enhancement, so we're now at Version 1.1:
>   http://www.forwiss.uni-passau.de/~ramsch/Software/elmfilter2procmail.txt

How about a page with a litle text explaining what this is all about?  :-)

Suggested URLs:

page:	http://www.forwiss.uni-passau.de/~ramsch/elm/
link:	http://www.forwiss.uni-passau.de/~ramsch/elm/filter2procmail.pl

"Software" seems a bit redundant.  URLs need not be explanations...  ;-)

> - todo: %1, %2, %3, ... submaches (how can I do this?)
> - todo: mimic Filter's handling of X-Filtered-By: headers.

Eli?  Randall?  Larry?

Sven  [don't look at me]


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

Date: 9 Aug 1997 09:34:49 GMT
From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
Subject: Re: awful suspicion about hash of arrays and dbm
Message-Id: <5shdjp$t7g$1@pheidippides.axion.bt.co.uk>

Trudno zhit' v derevne bez nagana. (alex@kawo2.rwth-aachen.de) wrote:
: Hi,

: please tell me that it isnt true, and it is 
: possible to save hash of arrays in dbm-files!
: Why doent following program work, when i 
: uncomment the 2 lines?

: #    dbmopen %plan, 'test', 0666 or die;
:      $plan{'user'} = ['a', 'b'];    
:      print $plan{'user'}[0];
: #    dbmclose %plan;

>From the FAQ:


    How can I store a multidimensional array in a DBM file?

    Either stringify the structure yourself (no fun), or else get the
    MLDBM (which uses Data::Dumper) module from CPAN and layer it on
    top of either DB_File or GDBM_File.

Paul


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

Date: Thu, 07 Aug 1997 14:02:01 +0200
From: ip <ip@cybernet.dk>
Subject: BASE64 problem with special word
Message-Id: <33E9B939.2289@cybernet.dk>

I have a serious problem with the base64 encoding/decoding rutine.



the word: Artifax



gives strange output when decoding it.



what is the problem?????



does anybody know



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

#

# LIB: BASE64.PL

#



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

# Sub: Version

# Parm: none

# Retur: none

# Gxr: viser base64 versionsnr

# Eksempel pe kald: Version();

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



$VERSION = sprintf("%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/);



sub Version 

{ 

  $VERSION; 

}



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

# Sub: Base64encode

# Parm: tekst der skal kodes

# Retur: kodet tekst

# Gxr: cryptere i base64 format

# Eksempel pe kald: $enc = Base64encode($ren_tekst);

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

use integer;



sub Base64encode

{

    my $res = "";

    while ($_[0] =~ /(.{1,45})/gs) {

        $res .= substr(pack('u', $1), 1);

        chop($res);

    }

    $res =~ tr| -_|A-Za-z0-9+/|;

    # fix padding at the end

    my $padding = (3 - length($_[0]) % 3) % 3;

    $res =~ s/.{$padding}$/'=' x $padding/e if $padding;

    $res;

}





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

# Sub: Base64decode

# Parm: kodet tekst

# Retur: normaltekst

# Gxr: decryptere base64 format til normal tekst

# Eksempel pe kald: $deco = Base64decode();

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

sub Base64decode

{

    local($^W) = 0; # unpack("u",...) gives bogus warning in 5.001m



    my $str = shift;

    my $res = "";



    $str =~ tr|A-Za-z0-9+/||cd;             # remove non-base64 chars

(padding)

    $str =~ tr|A-Za-z0-9+/| -_|;            # convert to uuencoded

format

    while ($str =~ /(.{1,60})/gs) {

        my $len = chr(32 + length($1)*3/4); # compute length byte

        $res .= unpack("u", $len . $1 );    # uudecode

    }

    $res;

}



#slut indikation

1;


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

Date: 5 Aug 1997 23:58:25 GMT
From: ct2963@aol.com (CT2963)
Subject: Case Statement..
Message-Id: <19970805235801.TAA15218@ladder02.news.aol.com>

Question...

Is there any type of case statement in Perl??? I cant seems to find any
references to one or any code that uses one.

If there is could somebody provide me with the syntax..

Thanks


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

Date: Sat, 09 Aug 1997 07:24:46 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: changing perl to gibberish
Message-Id: <comdog-ya02408000R0908970724460001@netnews.worldnet.att.net>

In article <33EB7CE2.48BD481A@talas.com>, Victor Magdic <vmagdic@talas.com>
wrote:

> Does anyone know if there are any programs that will take perl source
> and scramble it into gibberish, so that it is effectively unreadable

wouldn't it be more fun to write your own :)

> I've seen stuff like this for javascript code.

the stuff that i've seen for javascript is quite easy to undo.  i
even have a couple of (Perl) scripts that do just that (read: this
is not a good way to hide source).

-- 
brian d foy                              <URL:http://computerdog.com>                      



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

Date: 6 Aug 1997 14:52:04 GMT
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: chop vs chomp
Message-Id: <5sa32k$818$1@gte1.gte.net>

Benarson.Behajaina@swh.sk said...

> 1. chop and chomp

chomp is "safe chop"; it only chops if the last character of the
choppee is \n.

> 2. localtime and gmtime

gmtime = "Greenwich Mean Time".  If you live on the same longitude
as Greenwhich, then there is no difference.

-- 
Jonathan Feinberg    jdf@pobox.com    Sunny Manhattan, NY


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

Date: 5 Aug 1997 20:39:50 GMT
From: gregg@wrigley.wwti.com (Gregg Graubins)
Subject: DB_File Perl 5.004 compilation problem under BSDI
Message-Id: <5s832m$r91$1@wrigley.wwti.com>
Keywords: Perl,DB_File,BSDI,2.1,3.0,compilation,make,error


Hey guys,

I'm having a problem compiling perl 5.004 under BSDI 2.1 *and* 3.0.
I'm mainly trying to get it working under 3.0, but I've tried it
under 2.1 and the same problem occurs with DB_File.c. Here's the
output from make ("gmake" reports the same thing):

===[ capture begins here ]===
Script started on Tue Aug  5 15:06:42 1997
gregg $ make
[snipped]

        Making DB_File (dynamic)
Writing Makefile for DB_File
Skip ../../lib/DB_File.pm (unchanged)
 ../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap -typemap typemap
DB_File.xs >DB_File.tc && mv DB_File.tc DB_File.c
gcc -c   -O     -DVERSION=\"1.14\"  -DXS_VERSION=\"1.14\" -fpic
-I../..
DB_File.c
DB_File.c:28:invalid character '[' in first operand
DB_File.c:30:invalid character '@' in first operand
DB_File.c:39:invalid character '@' in first operand
DB_File.c:45:invalid character '@' in first operand
DB_File.c:48:invalid character '@' in first operand
DB_File.c:49:invalid character '@' in first operand
DB_File.c:50:invalid character '@' in first operand
DB_File.c:51:invalid character '@' in first operand
DB_File.c:52:invalid character '@' in first operand
DB_File.c:55:invalid character '@' in first operand
DB_File.c:57:invalid character '@' in first operand
DB_File.c:62:invalid character '@' in first operand
DB_File.c:64:invalid character '@' in first operand
DB_File.c:66:invalid character '@' in first operand
[similar errors keep going for another 1000 or so lines, and then ...]

*** Error code 1

Stop.
*** Error code 1

Stop.
Script done on Tue Aug  5 15:11:09 1997
===[ capture ends here ]===

I've tried several distributions of perl versions, including 5.003,
5.004, and 5.004_01. All of them produce the same errors in
DB_File.c. I have the Berkeley DB library installed, so that
shouldn't be posing this problem (?). I'm going nuts on this
problem! :( Maybe I should load the DB stuff statically? Please help
and CC to my email address at gregg@wwti.com so I'll get your reply
immediately.

Thanks in advance!!!

---
Gregg Graubins <gregg@wwti.com>
Whitewater Technologies, Inc.
Voice: 630-705-5678 / Fax: 312-697-6720
For PGP signature, finger gregg@wwti.com


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

Date: Sat, 09 Aug 1997 10:16:51 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: file locking - how does it act?
Message-Id: <33ed0cc0.14198315@news.enterprise.net>

ced@bcstec.ca.boeing.com (Charles DeRykus) wrote:

>  >Yes.
>Um, I interpreted "finishes" to mean "finishes with the locked file".  
>Actually, closing the filehandle releases the lock so the
>answere is "No". 
Just say maybe :)



-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Thu, 07 Aug 1997 09:22:30 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: File locking
Message-Id: <33ef9222.4154581@news.tornado.be>

Randal Schwartz <merlyn@stonehenge.com> wrote:

> May I also add that *every* version of Perl prior to 5.004
>(which came out this spring) has an active CERT-ifiable security hole,
>so it's wise to upgrade anyway if you consider your data to be
>valuable.

Does this mean that 5.004 doesn't have any security hole, or just that
nobody has found it yet?

My bet is on the latter. Nothing is ever 100% secure.

	Bart Lateur
	bart.mediamind@tornado.be


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

Date: 7 Aug 1997 10:03:23 +0100
From: csrax@csv.warwick.ac.uk (Mr R Hamilton)
Subject: Re: GD with win32 perl: parse error!
Message-Id: <5sc30r$1dg@crocus.csv.warwick.ac.uk>

In article <33E8F9A2.D9B@dial.pipex.com>,
	IS-DEV <yt62@dial.pipex.com> writes:
>Hello all,
>
>	I am running perl 5.003_07 build 307 on a windows nt4 machine.
>	I obtained GD-Tools which contains the GD package for windows,
>        as compiled and tweaked by Dave Roth. However placing "use GD;"
>        at the top of any script causes the perl script to fail with:-
>
>		Error: pase exception
>
>	any ideas???

There's a newer version on his ftp site which solves this
problem. Hunt around in ftp://ftp.roth.com/pub/ntperl/

Ross

 .-------Ross Hamilton, PhD Student in the History of Computing-------.
| http://www.dcs.warwick.ac.uk/~ross | mailto:ross@dcs.warwick.ac.uk |
|    Department of Computer Science, | 12 Newbold Place, Leamington  |
| Uni. of Warwick, Coventry, CV4 7AL | Spa, Warwks, CV32 4HR, UK     |
`-------------- Office: 01203 528043 | Home: 01926 886146 -----------'





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

Date: Wed, 6 Aug 1997 07:15:53 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Have array, will (won't?) sort
Message-Id: <ptp9s5.lp.ln@localhost>

Doug Seay (seay@absyss.fr) wrote:
: [posted and mailed]

: D.F. Parkhurst wrote:
: > 
: > I'm new at Perl, so this is probably an easy question.
: > 
: > I have a program that was translated from awk to perl.  It
: > includes an array $r ($r{1}, etc.) of floating point numbers that
: > I want to sort.
: > 
: > The llama book shows a numeric sort in the form
: > 
: > @sortedlist = sort { $a <=> $b } @unsortedlist,
: > 
: > but that sorts a list and produces a list.
: > 
: > How do I sort an array of numbers to get an array?

: Vocabulary problem here.  $r{1} is not an "array".  It is an
: "associative array" which is usually called a "hash" these days (much
: shorter name).  Simply put, you cannot sort a hash.  It is implemented
: by a hash table (hence the name), and hash tables are unordered. 
: Usually what people do is sort the keys of the hash with something like


The vocabulary problem continues ;-)

$r{1} is not an "array".

It is not a "hash" either.

It is a scalar variable that happens to be an element in a hash.

%r is a "hash"  ;-)


: my @sorted_r = sort { $r{$a} <=> $r{$b} } keys %r;


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Wed, 06 Aug 1997 09:06:18 -0500
From: Rishi Bhattacharya <rbhattac@jetson.uh.edu>
Subject: Head of CGI Department
Message-Id: <33E884DA.1E22@jetson.uh.edu>

Hello,

I am currently starting a new project and am looking for someone to head
the CGI department of my site. The project is www.webresource.net. It is
a site intended for webmasters of all genre's, from novice to advanced.
Please feel free to check out the layout at :

http://www.webresource.net/

My current team consists of experienced proffessionals, ranging from IBM
software developers to NASA engineers. We are already getting numerous
requests for advertising space, even before the site is complete. The
ideal applicant will have two very important traits : 1) A plethora of
experience in designing and writing CGI (Perl). 2) A reasonable amount
of time per week to devote to the project. (The amount of time is more
clearly defined below in the commonly asked questions). Please look over
the following commonly asked questions :

> What will I have to do?

You will be the complete head of the java section. What that section
will consist of is completely up to you. You can either spend time and
showcase the best scripts on the web, or you can concentrate on writing
articles (Like the ones on the front page) that show how to create
useful scripts (or both). Again, at the risk of sounding redundant, it
is all up to you. That is one thing the current team members like --
they have the final say on everything. One thing will be required of
you, and that is that you write articles highlighting some aspect of cgi
design, implementation, etc.

> Who are the other team members?

There are currently five people working on the team. The head of the
java department is an software engineer for IBM. The head of the vrml
section is a hardware engineer for Digital Equipment Corporation (DEC).
I myself am doing the activex section (I am a engineer for NASA). The
head of the graphics section is a graphic design specialist for the past
ten years. Finally, a internet consultant in Dallas is doing the HTML
and JavaScript sections.

> How will I be compensated for my work?

The team members and I are all working on a profit motive. That means
that we know that the site maybe a bust, and we also know that we could
get to the point where we have multiple $10000/month advertisers. I will
say this though, that whatever revenues are made, they will split right
down the middle. Everyone will get their equal share. How do you know
this? Well, if their was someway to prove to you that I am an honest
person, then I would. Until then, I guess you'll have to trust me. Maybe
this will help. I started this project not for monetary reasons, but for
valuable "experience" on my resume.

> Will I have to pay for anything ?

No. I will cover all hosting fees and other costs.

> How much work do I have to put in?

All team members currently have full time jobs. We will understand if
you can't work more than 10-15 hours/week.


If you meet the above qualifications and are interested (serious offers
only please) feel free to contact me at rbhattac@bayou.uh.edu. Please
email, for I will not be back to check this newsgroup for replies. Thank
you for your time.

Rishi Bhattacharya
rbhattac@bayou.uh.edu


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

Date: Wed, 06 Aug 1997 08:41:47 -0400
From: Prince Mystery <mystery@itis.com>
Subject: Re: Help..
Message-Id: <33E8710B.633CCA0B@itis.com>

Altfnine wrote:
> 
> Here is a part of my script but for some reason this is not doing what it
> is suppose . Every thing else is working fine.
> 
<..clip..>
> Can some one tell me why this is not working..
> 
> Thank You.

close(MAIL);

Myst

-- 

Version: 2.6.2

owEBiAB3/4kAdQMFADPY9d1hGXgCUdEssQEBvREDAJodjyXMMZnOxrzl6Z5Anldh
p/mCNLshfYr/aLB+vmR2CrdySGCqBZFg+GanInyn/Vg6oRNoLgM/sU5+sbYntGt1
nI2B8/PZIDxOTA3S6BktLawONN/RGcqjPhDPm8l636wOYgh0ZXh0ZmlsZQAAAAA=
=beaq
-----END PGP MESSAGE-----


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

Date: Thu, 07 Aug 1997 17:16:03 GMT
From: mark@michiana.net (Mark Bainter)
Subject: Hopefully not a cgi question...
Message-Id: <33ea00ac.255274625@news.michiana.net>

I'm hoping that this really is a perl question.  I've been wrestling
with this problem for about 12 hours now and can't figure out what is
going on.  I admit that I'm new to perl but I just can't seem to get
this to work.  (I also know next to nothing about html, so perhaps
that is my problem. :)

I have included here an excerpt of my code in hopes that one of you
might be able to spot my problem.  I'm fairly certain that the issue
is located in this subroutine.  The variable that get's passed to the
routine is an html file.

The section marked debug is the way I originally tried to write it,
just today I tried replacing it with the code you see under it.  The
problem, is that when the page is sent to the browser everything comes
through but the image that is referenced in the html file.  The
browser indicates that it knows the image is there and is downloading
it but it never arrives.  Is this perhaps a question for another news
group?  Or am I making some kind of quoting mistake?  (The image is a
server side map I think, and it has a lot of double-quotes in it.  Is
this messing up the print command when it get's expanded?  I tried
using blockquote in an effort to eliminate this, but it hasn't
helped.)  If you know the answer please let me in on it. :)  Either
email or a response here is fine.  If it is a cgi issue and not perl
related, please follow up via email.  

Thanks,
Mark Bainter


-----Begin Code-----

sub display_page{
	my $q = CGI->new();
	my @html = "";
	$FILE = $_[0];
	open(FILE) or die "Cannot open $FILE : $!";
	
	print $q->header;

#debug	while(<FILE>){
#debug		print blockquote($_);
#debug	}

	@html=<FILE>;
	print blockquote(@html);

	print $q->end_html;
}

-----End Code-----
---
mailto:mark@turnergroup.com          
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CS/CM/G/IT/P/O d++(+) s+(++):(-) a-- C++(+++)$ ULSC++++(on+++)$ P+>+++ L+ E--- W+$ N++$ !o !K w(++++)$ !O- M--(-) V-- PS--(---) PE++(+++) Y++ PGP++(+++)>++++ t+(++) 5++++(+++) X(-) R tv+ b+++(++++) DI++(+++)>++++ !D-- G>+++ e>+ h---(--) r+++ y+++(++++) 
------END GEEK CODE BLOCK------ 


--------------------------------------------------------------------------------------
 ex abusu non arguitur in usum                                      
 (the abuse of a thing is no argument against its use)  
--------------------------------------------------------------------------------------



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

Date: Sat, 09 Aug 1997 10:17:29 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: How to get file names from a directory
Message-Id: <33ee0cee.14244061@news.enterprise.net>

Euan Forrester <deforres@acs.ucalgary.ca> wrote:

>I need to write a Perl script to remove old files from a specific
>directory. I can find the time since the file was last accessed just fine,
>but I don't know how to find out what file names exist in the directory,
>so I can check them. Can anyone help me? Thanks in advance!
As well as the methods for finding the filenames suggested by other
posters you might want to look at 'stat' too (unless that's the way
you're finding the time already).



-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Sat, 09 Aug 1997 10:19:01 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: html --> perl
Message-Id: <33f20f50.14854059@news.enterprise.net>

"Jeff Oien" <jeff@webdesigns1.com> wrote:

>This program runs only in Windows95 or Windows NT v4.0 as it is a true
>32-bit
>application.  We may be making a 16-bit version soon for those of you still
>using Windows v3.x, however, we can't promise it yet since we're still in
>the middle of giving birth to this one.

Why? It it'd be a lot more portable if it was written in perl itself!


-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Sat, 09 Aug 1997 10:18:28 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: known perl limitations
Message-Id: <33f10e7d.14643512@news.enterprise.net>

ez041407@dilbert.ucdavis.edu (Eric Finley) wrote:

>: What sort of limitations are you looking for? Things like "identifiers
>: can't be 800 characters long" or things like "Perl doesn't have safe
>: signal handling"? Or something else? 
>Actually I enjoy using 800 char identifiers, it makes for good typing
>practice  ;)
>My problem:
>I have a file that is ~250 Meg and I want to read it in a record at a time
>like:

It serves you write if you're using about a meg for each variable name

 :)

-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: 9 Aug 1997 11:02:25 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: MLDBM manual page
Message-Id: <5shio1$7hv@news-central.tiac.net>

In article <33ec04ae.186402802@news.wco.com>, Eric Penn <stupid@wco.com> wrote:
>I tried building MLDBM on my ISP and it failed at the test stage.  I'm not
>good enought to know what it means, but I'm fairly certain that it is bad.
>I copied the MLDBM.pm file into my perl/libs directory, but am missing
>any/all of the supposed documentation that should habve come with the
>module.  This puts me at (I think) a bit of a disadvantage in using the
>module.  Can some kind sole (sic) email me the man page for MLDBM?  Thanks!

What did it report as it failed?

If you go to the directory where you copied MLDBM.pm then you should be
able to say

  perldoc MLDBM

and see the docs.  Do you have Data::Dumper instaled OK?  What version of
perl are you using?

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Wed, 06 Aug 1997 20:43:57 -0600
From: Tony <tony@qsvideo.com>
Subject: Module installation
Message-Id: <33E9366C.21450227@qsvideo.com>

I'm trying to install the libwww, penguin and some other modules to my
ISP.

When I type 'perl makefile.pl' everything is just fine.  When I type
'make' I get a a bad command error.  Where am I going wrong?  How do I
get these modules to install to my ISP?

Also, what are these patches the readme file keeps referring to?  How do

I use them:  perl5.004_01.pat, gd-1_14.pat, etc.?

Answers anybody?

Thanks!



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

Date: Wed, 6 Aug 1997 13:13:59 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Need help with split
Message-Id: <EEHu3B.Br1@world.std.com>

tor@kmd.dk (Torfinn Keringen) writes:

 
>but what if I want to use a variable:
>$separator = "+" or $separator = "$" 
>Is this possible, and what is the syntax?????
>[($first,$second,$third) = split("What do I put here");]

In regular expressions, you can use the "\Q" metacharacter to disable
the special meanings to other regular expression metacharacters.

($first, $second, $third) = split /\Q$separator/;

This is discussed in the perlre man page, but now that I look it over,
the explaination could be clearer. ("quote regexp metacharacters" is
rather of terse, and it gets lost where it is tacked onto the end of
the old perl 4's idiom of "$pattern =~ s/(\W)/\\$1/g;"
-- 
Andrew Langmead


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

Date: Wed, 6 Aug 1997 07:19:09 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Need help with split
Message-Id: <t3q9s5.lp.ln@localhost>

Torfinn Keringen (tor@kmd.dk) wrote:
: Hi
: This works ofcourse fine
: ($first,$second,$third) = split(/\+/);
: and this works fine
: ($first,$second,$third) = split(/\$/);
: but what if I want to use a variable: 
: $separator = "+" or $separator = "$" 
: Is this possible, and what is the syntax?????
: [($first,$second,$third) = split("What do I put here");]


($first,$second,$third) = split(/\Q$separator/);

or

$separator = quotemeta("+");
($first,$second,$third) = split(/$separator/);

or

$separator = "\\+";
($first,$second,$third) = split(/$separator/);

or

$separator = '\+';
($first,$second,$third) = split(/$separator/);


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Sat, 09 Aug 1997 07:05:02 GMT
From: raz_s@NetVision.net.il (Raz Shlomovich)
Subject: Perl and ODBMS
Message-Id: <5sh4s9$5ag$1@news.NetVision.net.il>

Accessing ODBMS from Perl - any idea?
Anyone consider writing Versant/ObjectStore/O2 extension ?




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

Date: 07 Aug 1997 11:23:40 +0200
From: Wolfgang Schludi <schludi@ra.syscomp.de>
Subject: perl-5.004 on UW prob (was: Re: perl-5.003 on UW: 'make test' fails)
Message-Id: <nok9hy5otf.fsf_-_@ra.syscomp.de>

>>>>> "Bob" == Bob Farmer <ucs_brf@unx1.shsu.edu> writes:
Bob> In article <no67tkzmaa.fsf@ra.syscomp.de>, Wolfgang Schludi
Bob> <schludi@syscomp.de> wrote:
>> $ uname -a UNIX_SV soft2 4.2MP 2.1 i386 x86at
>> 
>> if I compile perl-5.003 under UW and run 'make test' I get the
>> following errors:
[...]
Bob> I had the same problem with glob, dirhand, and readdir when
Bob> compiling 5.004.  Changing the "d_csh" thing from define to
Bob> undef fixed it.  Never encountered the groups problem.  --
Bob> Bob Farmer ucs_brf@unx1.shsu.edu University Computer
Bob> Services, Sam Houston State Univ.  (409)294-3547
Bob> comp.lang.perl.misc

hi,

I now switched to perl-5.004 and the above tests passed ok.
The only test that fails now is the "lib/io_sel":
[...]
> lib/io_sel..........select not implemented at ../lib/IO/Select.pm line 259.
> dubious
> 	  Test returned status 2 (wstat 512)
> DIED. FAILED tests 11-21
> 	  Failed 11/21 tests, 47.62% okay
[...]
> Failed Test  Status Wstat Total Fail  Failed  List of failed
> ----------------------------------------------------------------------------
> lib/io_sel.t      2   512    21   11  52,38%  11-21
> Failed 1/152 test scripts, 99.34% okay. 11/4163 subtests failed, 99.74% okay.
> 

any hints?

-- 
schludi@syscomp.de


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

Date: 6 Aug 1997 13:53:15 GMT
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: please help me modify this perl script
Message-Id: <5s9vkb$cvh$1@gte2.gte.net>

labinfo@gaia.csus.edu said...

> 1) allow one to backspace when it prompts me for data

That's a function of the shell you're using.  What happens when you
hit the backspace key?  Have you tried ctrl-H?

> 2) eliminate those fork errors that I somehow don't get when I
> split the distribution list in half and run the script for each.

>     unless (fork) {
>         exec("mailx -s '$subject' $field < $distribution_file");
>     }

There's no reason for this program to create async processes!  Use
the 'system' builtin rather than fork/exec, or simply open a
pipe to mailx, like so
	open MAILX, "| mailx -s '$subject' $field";
and then write the contents of the distribution file to MAILX.

Some unsolicited advice: read the contents of $distribution_file into
a variable, rather than accessing the file over and over.

-- 
Jonathan Feinberg    jdf@pobox.com    Sunny Manhattan, NY


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

Date: Tue, 5 Aug 1997 11:00:17 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: kennedycy@thecb.state.tx.us
Subject: Re: Problems with Internet Explorer running a PERL script
Message-Id: <Pine.GSO.3.96.970805105603.29887F-100000@kelly.teleport.com>

On Tue, 5 Aug 1997 kennedycy@thecb.state.tx.us wrote:

>   I have written a program in Perl and have successfully tested it using
> Netscape. However, when I use IE, after several operations, it flashes an
> error message. Unfortunately, it flashes it too quickly for me to read.
>    After this error message, IE locks up, requiring a Ctrl-Alt-Del to kill
> the process.
>    I appreciate any light you can shed on this.

Whatever you're sending to IE seems to be making it crash. If you're
sending it something which matches the standards, then it's a bug in IE.
If you're sending it something else, then it's a bug in what you're
sending. (Since your script is working, you must have valid Perl, so
there's nothing more that I can offer you here.) To find out whether a
piece of text is valid http/html, see the docs and newsgroups associated
with those specifications. Good luck! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 09 Aug 1997 10:15:47 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Puzzle to be solved
Message-Id: <33eb051e.12244389@news.enterprise.net>

"Neil Edmondson" <neiled@enteract.com> wrote:

>I have the following subroutine running on FreeBSD.  It works fine ...  
>
>However, just today (after three months of no problems) my "next number"
>was reset to 000001 (it had been up in the 00100x range).  It would appear
>to me that the file somehow got deleted.  And I didn't do it! Honest!
>
>Can anyone offer another explanation.  And yes the flocks really are
>commented out on the UNIX system where this happened.
The flocks ARE commented out on the UNIX system? or AREN'T? If the
former it was probably because the next number file was accessed by two
different things at once.



-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Sat, 09 Aug 1997 10:16:18 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Run PERL Programs in Win95?
Message-Id: <33ec0c11.14022911@news.enterprise.net>

hyg@cpcw.com (Cyber Wolf) wrote:

>Please tell me , How to run PERL programs in win95? I have "Win Perl
>4.0",but how to run CGI in it? Thanks a lot !!!
Get a webserver, eg. OmniHTTPd from
http://www.fas.harvard.edu/~glau/httpd/

Then see if it'll work with Win Perl (modify the path in the
Properties|Advanced section), if not got to http://www.activeware.com/
and get the latest perl port from there.



-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Wed, 6 Aug 1997 21:43:13 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: sleep not mixing well with other signal handlers
Message-Id: <EEIHo1.4yn@bcstec.ca.boeing.com>

In article <EEGy8t.A30@bcstec.ca.boeing.com>,
Charles DeRykus <ced@bcstec.ca.boeing.com> wrote:
 >In article <5s7mvl$3np@gap.cco.caltech.edu>,
 >Shimpei Yamashita  <shimpei@socrates.caltech.edu> wrote:
   > > As I understand from perlfunc man pages, sleep should not be used
   > > along with signal handlers for SIGALRM, but there shouldn't be any
   > > problems installing signal handlers for other signals, right?
   > > 
         [ snip ]
 >
 >   Here's something I modified which appears to work by blocking 
 >   receipt of the alarm signal while the SIGSTOP is sent.  
 >   Sending the STOP signal to the local process first may
 >   be heavy handed too though.  
 > 
 >   $SIG{STOP} = \&reaper;
 >   sub reaper {
 >      my $mask    = new POSIX::SigSet SIGALRM;
 >      my $action  = new POSIX::SigAction "reaper", $mask;
 >      sigaction SIGSTOP, $action or die $!;
 >      kill 'STOP', $kid;
 >  };
 >  ...
 >  ...
 >  kill 'STOP', $$;
 >  sleep 10;
 >  $SIG{STOP} = 'DEFAULT';



Er, forget the above. The problem is much simpler.

Apparently, sending a SIGSTOP generates a SIGCHLD. This
is what causes the second sleep to be cancelled. Here's
a one possibility that fixes this: 

 ...
sleep 2;
{ 
  local $SIG{CHLD} = 'IGNORE';
  kill 'STOP', $child or warn "couldn't SIGSTOP $child\n";
  sleep 10;
}
 ...


HTH,

--
Charles DeRykus
ced@carios2.ca.boeing.no_spam.com_


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

Date: Thu, 07 Aug 1997 14:00:02 +0200
From: Your Name <id@aom.ericsson.se>
Subject: SQL error message handling with sybPerl?
Message-Id: <33E9B73D.2490@aom.ericsson.se>

I wonder if someone can help me
with how to handle SQL error
messages or error-codes in SybPerl.

Any help would be appreciated.

Patrik


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

Date: Tue, 05 Aug 1997 14:42:24 -0400
From: "James J. Heck" <jheck@merck.com>
Subject: XS and variable length ret values
Message-Id: <33E77410.15FB@merck.com>

I am trying to figure out how to write an XS procedure that takes one
value but returns a list of values.  This list would be variable in
length.  In otherwords I have a C function that will walk a linked list
and everytime it gets to a certain point in the list it will push this
value on the perl return stack and continue on until it gets to the end
of the Linked list.  
	Any help would be greatly appreciated.

	TIA,
James
--------------------
James J. Heck
jheck@acm.org
http://www.heckconsulting.com/jheck/


       The contents of this message express only the sender's opinion.
       This message does not necessarily reflect the policy or views of
       my employer, Merck & Co., Inc.  All responsibility for the statements
       made in this Usenet posting resides solely and completely with the
       sender.


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 837
*************************************

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