[8570] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2187 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 26 13:07:22 1998

Date: Thu, 26 Mar 98 10:00:36 -0800
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, 26 Mar 1998     Volume: 8 Number: 2187

Today's topics:
    Re: "Newbie" Crib Notes (Kevin B Cohen)
        A problem for Perlxs or Perlxstut <ni@aoe.vt.edu>
        A problem for Perlxs <ni@aoe.vt.edu>
        Autoloading - Probbis .. HELP ! <vlierd@uni-oldenburg.de>
        convert process ID to process handle ..<NT> <bickford@rational.com>
    Re: Days of the Week (Andrew M. Langmead)
    Re: Days of the Week schwern@starmedia.net
        Dealing with the special chars in the file name tipirneni@yahoo.com
    Re: Forced log out after a defined total time, how? <robh@lodgenet.com>
    Re: Going Rates for PERL Programming??? (benjamin j snyder)
    Re: hard reference, variable names ? (Jason Gloudon)
    Re: hard reference, variable names ? <mike@unival.com>
    Re: hard reference, variable names ? <mike@unival.com>
    Re: hard reference, variable names ? <mike@unival.com>
    Re: MacPerl fake 'exec'? (Andrew M. Langmead)
    Re: Need sorting routine in Perl <gwynne@utkux.utk.edu>
    Re: NNTP and Perl (John Moreno)
    Re: NNTP and Perl schwern@starmedia.net
        Odd-Numbered Array to Hash <upsetter@shore.net>
        Oracle & Perl connect? <browns1@borg.com>
    Re: Passing reference to array of hashes: a better way? (Ken Fox)
    Re: Passing reference to array of hashes: a better way? <cmargoli@world.northgrum.com>
        Perl and oracle web server 3 rduyme@ireste.fr
        Perl calling ADABAS C under Win95 or NT? (Ray Mullins)
    Re: Perl calling ADABAS C under Win95 or NT? <boei@trifox.com>
        Perl Libraries y2k compliance type40@tardis.ed.ac.uk
    Re: Perl versus Python benchmark-results (Thomas Ackermann)
    Re: Perl versus Python benchmark-results (Thomas Ackermann)
    Re: Perl5 on Irix (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
    Re: Perl5 on Irix lusol@turkey.cc.Lehigh.EDU
    Re: Perl5 on Irix <roland@rom.supportpartner.munich.sgi.com>
    Re: PROPOSAL: The Perl Dictionary <camerond@mail.uca.edu>
        Q about CPAN Date module (Stan Horwitz)
    Re: Shortcut question (Richard Bellavance)
    Re: Unlink on WinNT/95 (Faye Pearson)
    Re: Using Perl packages and "strict" <mike@unival.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 26 Mar 1998 10:34:21 -0500
From: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Re: "Newbie" Crib Notes
Message-Id: <6fdsht$565@julius.ling.ohio-state.edu>

In article <linberg-2303980955290001@projdirc.literacy.upenn.edu>,
Steve Linberg <linberg@literacy.upenn.edu> wrote:
>Abigail was pissed off for two entirely valid reasons:  (1) Referring
>newbies to incomplete, poorly-thought-out solutions instead of the
>easy-to-find and painstakingly developed FAQ, and (2) illegal and
>unethical appropriation of her work.  I would be livid too.  Just because
>you're a newbie doesn't mean you can ignore common sense and common
>courtesy, to say nothing of copyright law.


i have to agree with steve and abbie.  i think the idea of collecting
and posting some sort of "the best of clpm" is fantastic.  however,
being an academic of sorts, i pretty much live and die by my
publications (or lack thereof), and seeing a chunk of my writing
appearing here under someone else's name with no attribution of the
original source did kinda give me the creeps. 

kevin "it's nigel chapman, not me, who wrote 'if we suppose for the
moment that a pizza is a syntactical structure' in 'perl: the
programmer's companion'" cohen





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

Date: Thu, 26 Mar 1998 12:06:42 -0800
From: nisy <ni@aoe.vt.edu>
Subject: A problem for Perlxs or Perlxstut
Message-Id: <351AB552.2F33D34B@aoe.vt.edu>

I am using C routines called from Perl. I am wondering if arrays
can be shared across the Perl/C barrier now for Perl 5.004 in NT,
which  means that arrays (double or float) pass from Perl to C and
then from C back to Perl with new values.
If so, how can I do ?
Thanks,

Paul Ni
ni@aoe.vt.edu




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

Date: Thu, 26 Mar 1998 11:50:42 -0800
From: nisy <ni@aoe.vt.edu>
Subject: A problem for Perlxs
Message-Id: <351AB192.D1520A41@aoe.vt.edu>

I am using C routines called from Perl. I am wondering if arrays
can be shared across the Perl/C barrier now for Perl 5.004. If so,
how can I do ?
Thanks,

Paul Ni
ni@aoe.vt.edu




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

Date: Thu, 26 Mar 1998 16:22:21 +0100
From: Claus van de Vlierd <vlierd@uni-oldenburg.de>
Subject: Autoloading - Probbis .. HELP !
Message-Id: <351A72AD.FA1C26D3@uni-oldenburg.de>

For the first time I wrote a Package in a File
 called "CLASSMISC.pm"  which contains several functions for
 this class (of course all containing "use AutoLoader" and
__DATA__ before them ..) .
  
 then I "autosplitted" them by "autosplit" into several Files
 <xyz>.al (plus "autosplit.ix") and indeed I found them all in the
directory 

 .../lib/auto/CLASSMISC/<xyz>.al



 Fine !

Unfortunately , after calling in my  "main" - procedure


$ret=CLASSMISC->addall(%numbers)


I got "can't locate object method "addall" via package "CLASSMISC"


 although  "addall.al"  exists in ../lib/auto/CLASSMISC  !!!


 what did I miss ?!?

Do I have to say  "use lib ????"  : but what is ???


 regards ,

Claus van de Vlierd


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

Date: Thu, 26 Mar 1998 09:54:31 -0500
From: "Fred Bickford IV" <bickford@rational.com>
Subject: convert process ID to process handle ..<NT>
Message-Id: <6fdq5e$4u1$1@usenet.rational.com>

Does anyone know of a way (Perl 5.x on NT) to convert a
process ID to a process handle ?

Thanks

For any and all help


Fred




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

Date: Thu, 26 Mar 1998 15:22:07 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Days of the Week
Message-Id: <EqFMov.5Bq@world.std.com>

"Mike Barnes" <strepsil@very.net> writes:

>Anyone out there got a neat little snippet of code, or just a method I can
>use to find out what day of the week a given date fell on?

There are a bunch of Time and Date modules on CPAN 
<URL:http://www.perl.com/CPAN/modules/by-module/Date>
<URL:http://www.perl.com/CPAN/modules/by-module/Time>

The Date::Manip module seems like it does what you want to do:
<URL:http://reference.perl.com/module.cgi?Date::Manip>

but another way would be to use the Time::Local module that comes with
perl to take the date information and turn it into the elapsed number
of seconds, and then use perl's built in locatime() function to turn
it into a list which will contain an element which specifies day of
the week. And once you have the day of the week from localtime(), if
you want to format it according to the users locale, you could use
POSIX::strftime() function.


-- 
Andrew Langmead


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

Date: Thu, 26 Mar 1998 11:03:35 -0600
From: schwern@starmedia.net
To: strepsil@very.net
Subject: Re: Days of the Week
Message-Id: <6fe1k3$q4f$1@nnrp1.dejanews.com>

use Date::DateCalc qw(day_of_week);

print day_of_week(1998, 3, 26);  # Thursday, March 26, 1998


Note the minor trap there.  DateCalc uses 1 as January.  Localtime uses 0 as
January.

http://www.perl.com/CPAN/modules/by-module/Date/

In article <890790681.73936@satin.sensation.net.au>,
  "Mike Barnes" <strepsil@very.net> wrote:
>
> Anyone out there got a neat little snippet of code, or just a method I can
> use to find out what day of the week a given date fell on?
>
> I wouldn't have the faintest idea where to start, but that's mainly because
> I haven't memorised all the rules from leap years/centuries...

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 26 Mar 1998 09:28:31 -0600
From: tipirneni@yahoo.com
Subject: Dealing with the special chars in the file name
Message-Id: <6fds5k$l55$1@nnrp1.dejanews.com>

Hi Folks,

    I am having problems with the special characters in the file name. I have
a perl script that reads the dir using the following command,

          grep !\^\.\.?$/, readdir <directoryhandle>

and load every filename into a array. Then I use a foreach statement to do
some processing for each file. But the problem is the filanames has special
chars like,

      $, (, ), & and % that are changing the file names by replacing the
$<name> and %<name> by null or the & and ( are giving "sh: syntax errors".

     Is there a elegant way to deal with this problem ?

note: the file is not read directly, it is read through a lex filter, so the
exact way is like

    open XXX, "my_lex_filter \"$filename\"|";



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 26 Mar 1998 09:14:40 -0600
From: Robert Hatcher <robh@lodgenet.com>
To: moetteli@citeu.unige.ch
Subject: Re: Forced log out after a defined total time, how?
Message-Id: <351A70E0.56E7D135@lodgenet.com>

moetteli@citeu.unige.ch wrote:
> 
> Hi
> 
> Does anybody know of a script or program, that forces a user to log out, after he has been logged in for a certain _total_ time a day.
> If there)s no such beast, how can I force to log out a user? By killing it)s tty or what else?
> 
> Thanks for any response
> Phil
Some versions of UNIX allow this time of restriction to be configured. 
It is usually part of the Accounting Measures, allowing users to be
logged in only at certain times, for a certain length of time per call,
or for a certain total amount of time.  Different flavors of UNIX
implement (or not) these features in different ways, and the flavor you
are running may not support it, but it would be a place to start.
-- 
Later,
*********************************************************************
Rob Hatcher      605-988-1658      robert.hatcher@lodgenet.com

"If it weren't for my Beautiful Wife, Fantastic Children, and this
 Wonderful Job,  I'd be hunting or fishing right now" 
*********************************************************************


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

Date: 26 Mar 1998 11:28:50 -0500
From: bens@colon.cis.ohio-state.edu (benjamin j snyder)
Subject: Re: Going Rates for PERL Programming???
Message-Id: <6fdvo2INN69g@colon.cis.ohio-state.edu>



Where does someone who contracts or free-lances PERL programming advertise 
their service?
-- 
Ben Snyder				
Student Programmer
Ohio Supercomputer Center


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

Date: Thu, 26 Mar 1998 14:56:03 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: hard reference, variable names ?
Message-Id: <slrn6hkr1g.o6r.jgloudon@manitoba.bbn.com>

Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:
>
>($sex eq 'M' ? $M{$offer} : $F{$offer}) = $sth->fetchrow_array;
>

Yeah we keep forgetting these fancy C++ like tricks :).

-- 
Jason Gloudon


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

Date: Thu, 26 Mar 1998 09:37:56 -0800
From: Mike Hitchcock <mike@unival.com>
Subject: Re: hard reference, variable names ?
Message-Id: <351A9274.DBF2B337@unival.com>

Phil R Lawrence wrote:
> I thought I might try:
>    $$sex{$offer} = $sth->fetchrow_array;
> but 'use strict' doesn't allow symbolic references.  (I don't want to delete
> the 'use strict' line 

You can also turn off strict refs within a local scope:

   { # begin scope
      no strict 'refs'; # disable strict 'refs'
      ${$sex}{$offer} = $sth->fetchrow_array;
   } # end scope

   # now using strict refs again...

-- 
Mike Hitchcock
mike@unival.com
hitchcock@earthling.net


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

Date: Thu, 26 Mar 1998 09:23:28 -0800
From: Mike Hitchcock <mike@unival.com>
Subject: Re: hard reference, variable names ?
Message-Id: <351A8F10.B451770A@unival.com>

Jason Gloudon wrote:
> 
> Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:
> >
> >($sex eq 'M' ? $M{$offer} : $F{$offer}) = $sth->fetchrow_array;
> >
> 
> Yeah we keep forgetting these fancy C++ like tricks :).
> 
> --
> Jason Gloudon

You can also turn off strict refs within a local scope:

   { # begin scope
      no strict 'refs';
      ${$sex}{$offer} = $sth->fetchrow_array;
   } # end scope

   # now using strict refs...

-- 
Mike Hitchcock
mike@unival.com
hitchcock@earthling.net


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

Date: Thu, 26 Mar 1998 09:25:31 -0800
From: Mike Hitchcock <mike@unival.com>
Subject: Re: hard reference, variable names ?
Message-Id: <351A8F8B.CE5D2B14@unival.com>

Phil R Lawrence wrote:

> I thought I might try:
>    $$sex{$offer} = $sth->fetchrow_array;
> but 'use strict' doesn't allow symbolic references.  (I don't want to delete
> the 'use strict' line 

You can also turn off strict refs within a local scope:

   { # begin scope
      no strict 'refs';
      ${$sex}{$offer} = $sth->fetchrow_array;
   } # end scope

   # now using strict refs...

-- 
Mike Hitchcock
mike@unival.com
hitchcock@earthling.net


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

Date: Thu, 26 Mar 1998 15:08:46 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: MacPerl fake 'exec'?
Message-Id: <EqFM2M.Iww@world.std.com>

gregdunn@indy.net (Greg Dunn) writes:

>I've scoured the sample scripts and documents, but I'm unable to find a
>suggested way to launch a Mac application from MacPerl; even the Apple

I think you might be looking for Chris Nandor's or Mac::Apps::Launch
module. <URL:http://www.perl.com/cgi-bin/cpan_mod?module=Mac::Apps::Launch>

>event docs aren't very helpful.  I don't want to run an AppleScript (I'm
>replacing a couple of AppleScripts with a Perl script already!) and it's OK
>if the Perl script goes away when the subsequent app launches.

You might want to check with "The Perl Journal" and see if you can get
a copy of issue number 8. <URL:http://www.tpj.com/tpj/ordering> Chris
Nandor wrote an article "Interprocess Communication with MacPerl"
explaining how to use the AppleEvents module and avoid writing
Applescript to send AppleEvents on your behalf. There also might be
similar information in the upcoming book "MacPerl: Power and Ease"
published by Prime Time Freeware. A draft of the book is available
online at <URL:http://www.ptf.com/macperl/>
-- 
Andrew Langmead


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

Date: Thu, 26 Mar 1998 10:08:40 -0500
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: Need sorting routine in Perl
Message-Id: <6fdr38$j6d$1@gaia.ns.utk.edu>

Use the sort function. See pp. 217 ff. of Programming Perl.  Spend the
necessary time learning Perl so that you would know this.

Bob Gwynne

Didiek wrote in message <3519CD44.60D@intouch.co.id>...
>Hi,
>
>Does anyone know how or where can I get a sample perl script for sorting
>numbers. I plan to build a link list and display them in a top referrer
>order basis. Just like top50 or top100 or whatever.
>
>Any information would be very appreciated.
>
>Regards,
>Didiek




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

Date: Thu, 26 Mar 1998 15:30:48 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: NNTP and Perl
Message-Id: <1d6hq3e.jobk8118phmioN@roxboro0-039.dyn.interpath.net>

Doran L. Barton <fozz@mail.xmission.com> wrote:

> Didier LADNER wrote:
> 
> > Hello, I have a problem that I can not solve because lack of a knowledge
> > of the protocol nntp and the standard headers  of this protocol.
> >
> > I work for a network organization which exchange the cv and job offer
> > over extranet.
> > The cv are e.mailed by a simple routine to sendmail.
> > Each cv emanating from one of the members of the group will be sent to a
> > forum of new dedicated to job.

-snip-
 
> So, to post a message to a newsgroup you should either check out some of the
> stuff in the libnet module. Or, find a program that posts messages to NNTP
> servers and works like sendmail at the shell prompt and open a pipe to it in
> the same way.

I've been looking and couldn't find a MacPerl version of libnet, would
you happen know if one has been made and if so where I can find it?
Failing that I guess it'll be time to hit the books and see what I can
learn about modules (it's giving me a error on using $NetConfig and I'm
not sure why).

-- 
John Moreno
I am trying to convince the author of YA-NewsWatcher that the latest
version should be released to the public.  He doesn't think there's much
interest in a new version.  Help me prove him wrong.  To do so, send me
mail <mailto:phenix@interpath.com> with a Subject of New YA.  Comments
on what you like/dislike in the current version will be appreciated.


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

Date: Thu, 26 Mar 1998 10:30:35 -0600
From: schwern@starmedia.net
To: didier@referencement.net
Subject: Re: NNTP and Perl
Message-Id: <6fdvq0$ocf$1@nnrp1.dejanews.com>

I believe you want to have a look at Net::NNTP and the News::* modules.

Net::NNTP is part of the libnet bundle.

http://www.perl.com/CPAN/modules/by-module/Net/
http://www.perl.com/CPAN/modules/by-module/News/

Can't post a news article via sendmail as far as I know.


In article <MPG.f8276b1da1b9f66989685@news.planete.net>,
  didier@referencement.net (Didier LADNER) wrote:
> I work for a network organization which exchange the cv and job offer
> over extranet.
> The cv are e.mailed by a simple routine to sendmail.
> Each cv emanating from one of the members of the group will be sent to a
> forum of new dedicated to job.
>
> Here the code:
>
> $mailprog = '/usr/lib/sendmail -oi -t';
> $addressee = 'myname@mydomainname.x';
>
> open (MAIL, "|$mailprog") || die "impossible1 $!\n";
> print MAIL "From: didier\@referencement.net\n";
> print MAIL "To: $addressee\n";
> print MAIL "Newsgroups: test\n";
> print MAIL "Subject: $subject\n";
> print MAIL "Reply-To: $sender\n";
> print MAIL "$mess\n";
> close (MAIL);
>
> Which sends me the message but obviously not to the newsgroup test.
> I imagine that since the email uses smtp and the new nntp, this code can
> not function.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 26 Mar 1998 17:16:30 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Odd-Numbered Array to Hash
Message-Id: <6fe2he$27a@fridge.shore.net>

Hi Folks;

I have a list with an odd number of elements... let's say it looks like
this:

	@data = ("name", "Art", "phone");

 (The reason for this is that the user left the phone number blank and it
  got written out to a data file as "name\tArt\tphone\t". When I later
  split on tab characters I got the above array).

I want to convert this to a hash %data where $data{'name'} eq "Art" and
$data{'phone'} eq "", however, simply saying 

	%data = @data;

doesn't work... the last field ("phone") simply gets thrown into the bit
bucket. Is there any way to avoid this?

I can think of a number of ways to get around this (e.g. leave the newline
at the end and then chomp each individual field) but they're all kind of
kludgy... is there some easy or preferred way of doing this? I've checked
the FAQ and man perldata but haven't found any clue.

Thanks in advance.

--Art
(email cc preferred)

National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
        Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html



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

Date: Thu, 26 Mar 1998 11:48:40 -0500
From: Vinnie <browns1@borg.com>
Subject: Oracle & Perl connect?
Message-Id: <351A86E7.6DB97612@borg.com>

I am trying to connect to a ORACLE  useing PERL. I keep getting the
error
Error connecting to DSN=tacc;UID=iftw;PWD=iftw; Error: [12641] []
"[Oracle][ODBC Oracle Driver][Oracle OCI]ORA-12641: TNS:authentication
service failed to initialize."

Vinnie



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

Date: 26 Mar 1998 15:42:23 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Passing reference to array of hashes: a better way?
Message-Id: <6fdt0v$skk8@eccws1.dearborn.ford.com>

Zenin <zenin@archive.rhps.org> writes:
> Ken Fox <kfox@pt0204.pto.ford.com> wrote:
> : That might work if %thisrecord is a lexical and a new lexical is
> : created for each record.  Otherwise @pmdata will just get a whole
> : bunch of references to the same hash.  Probably better to use a
> : reference from the start:
> 
> 	Or just create one on the fly and not worry about what kind
> 	of data you have or it's scope:
> 
> 	push @pmdata, { %thisrecord };

That works, but it's kind of expensive.  Perl has to first flatten
the hash to a list and then build an anonymous hash from the list.
(Or is this optimized to a hash copy?)  For small hashes it won't
make much difference, but just building the hash "in place" is
a good practice to get used to.

- Ken

-- 
Ken Fox (kfox@ford.com)                  | My opinions or statements do
                                         | not represent those of, nor are
Ford Motor Company, Powertrain           | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section             | "Is this some sort of trick
                                         |  question or what?" -- Calvin


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

Date: Thu, 26 Mar 1998 15:52:47 GMT
From: Charles Margolin <cmargoli@world.northgrum.com>
Subject: Re: Passing reference to array of hashes: a better way?
Message-Id: <351A79CF.1C8B@world.northgrum.com>

Zenin wrote:
> 
> Ken Fox <kfox@pt0204.pto.ford.com> wrote:
> : That might work if %thisrecord is a lexical and a new lexical is
> : created for each record.  Otherwise @pmdata will just get a whole
> : bunch of references to the same hash.  Probably better to use a
> : reference from the start:
> 
>         Or just create one on the fly and not worry about what kind
>         of data you have or it's scope:
> 
>         push @pmdata, { %thisrecord };
> 

If you *really* want to make a copy of the original hash.  In a
previous thread we discussed some tradeoffs involving safety vs.
efficiency.

-- 
Charles G. Margolin                   DSSD Internal Information Services
cmargoli@world.northgrum.com          Northrop Grumman Corp. 0624/23
margolin@acm.org                      Hawthorne, California 90250-3277


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

Date: Thu, 26 Mar 1998 10:26:22 -0600
From: rduyme@ireste.fr
Subject: Perl and oracle web server 3
Message-Id: <6fdvea$o0f$1@nnrp1.dejanews.com>

hello

I try to implement a connection to a remote Oracle database using
perl and Oracle web server 3 on solaris.

here is my code:

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

$ENV{'TWO_TASK'}='alias-V2';

$lda = &ora_login('', 'www_user/web@alias-V2', '') || die $ora_errstr;

but I get:

Content-type: text/plain Perl Cartridge Error: ORA-12203: TNS:unable to
connect to destination (DBD: login failed) at (eval 8) line 12.

(TNS_ADMIN is set)
PS: when I use alias-V2 to configure a DAD it work with a PL/SQL cartridge
application.

any suggestions?

reno




-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 26 Mar 1998 16:28:53 GMT
From: mrm@lerami.lerctr.org (Ray Mullins)
Subject: Perl calling ADABAS C under Win95 or NT?
Message-Id: <EqFps5.Cq8@lerami.lerctr.org>

Does anyone know of callable modules from Perl that will access ADABAS C
(_not_ ADABAS D) under Win95 or NT (they are interchangeable), preferably 
freeware?

TIA,
Ray Mullins
-- 
M. Ray Mullins (http://www.lerctr.org/~mrm/) from Roseville, California
(which has better transit service than Arlington TX, and 1/5 the population)
TIPs: http://socaltip.lerctr.org, norcaltip.lerctr.org, cencaltip.lerctr.org
mrm -a- lerami.lerctr.org-Who's been spamming me? profit@health.com


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

Date: Thu, 26 Mar 1998 09:48:06 -0800
From: Bob Eisner <boei@trifox.com>
To: Ray Mullins <mrm@lerami.lerctr.org>
Subject: Re: Perl calling ADABAS C under Win95 or NT?
Message-Id: <351A94D6.4A5@trifox.com>

Ray Mullins wrote:
> 
> Does anyone know of callable modules from Perl that will access ADABAS C
> (_not_ ADABAS D) under Win95 or NT (they are interchangeable), preferably
> freeware?
> 
> TIA,
> Ray Mullins
> --
> M. Ray Mullins (http://www.lerctr.org/~mrm/) from Roseville, California
> (which has better transit service than Arlington TX, and 1/5 the population)
> TIPs: http://socaltip.lerctr.org, norcaltip.lerctr.org, cencaltip.lerctr.org
> mrm -a- lerami.lerctr.org-Who's been spamming me? profit@health.com


Hi Ray,

The following annoncement appeared on the SAG-L LISTSERV back in
Febuary.

At the time the annonucment was made, it only worked with ADABAS on MVS.

Bob


Forwarded message:
> From owner-sag-l@UAFSYSB.UARK.EDU Fri Feb 27 03:07 PST 1998
> Mime-Version: 1.0
> Content-Transfer-Encoding: quoted-printable
> Message-ID:  <01BD4376.BCD883F0@pcrr.software-ag.de>
> Date:         Fri, 27 Feb 1998 11:56:27 +0100
> Reply-To: Software AG Discussion List <SAG-L@UAFSYSB.UARK.EDU>
> Sender: Software AG Discussion List <SAG-L@UAFSYSB.UARK.EDU>
> From: Roger Randall <rr@SOFTWARE-AG.DE>
> Subject:      Technology evaluation program: Java class library for ADABAS
> To: SAG-L@UAFSYSB.UARK.EDU
> Content-Type: text/plain; charset="us-ascii"
> Content-Length: 841
> 
> Software AG announces the limited availability of a Java class library
> for ADABAS native calls. The object of the technology evaluation program
> is to present new technology to the customer community for a trial
> period to verify its acceptance prior to release as a product. This
> offer does not imply in any way that the technology will become a
> product nor that the software distributed may be used in a production
> environment. It is for test and evaluation only. Support will be on a
> best effort basis. To keep the support activities under control the
> software will only be distributed to a limited number of customers on a
> first-come first-serve basis.
> We hope this new offering will meet with wide-spread customer interest.
> Please submit requests to me.
> 
> Roger Randall
> ADABAS Product Marketing
> rr@software-ag.de
>


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

Date: Thu, 26 Mar 1998 10:41:36 -0600
From: type40@tardis.ed.ac.uk
Subject: Perl Libraries y2k compliance
Message-Id: <6fe0at$osc$1@nnrp1.dejanews.com>

The standard Perl libraries (as of Perl v5.003) all *seem* to be Y2K
compliant.  Some of the libraries on CPAN aren't, though.  (eg Net::SNPP,
Net::NNTP, although these could be protocol problems).

I trawled dejanews looking for a post like this, on whether the libraries
packaged with Perl (not perl itself) were y2k compliant.  Haveing checked all
uses of gmtime and localtime in the perl libraries, I want to save anyone else
the same bother.

I have only checked uses of gmtime and localtime, so if any of the libraries
are using 'year' variables that don't somehow use one of these functions, they
could still fall foul.  And I've only looked at the code, not run them through
a proper test.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 26 Mar 1998 17:14:54 GMT
From: tgm@rhein.iam.uni-bonn.de (Thomas Ackermann)
Subject: Re: Perl versus Python benchmark-results
Message-Id: <6fe2ee$12k6@news.rhrz.uni-bonn.de>

Andrew Kuchling (akuchlin@cnri.reston.va.us) wrote alot	;-)
<snipped>

Hi Andrew!

What you write sounds valid - but this benchmark was not really
my idea or main interest:
I found Guid's code in ../Python-1.5/Demo/comparions/ and was curious
to see how Python compares to Perl in exactly those test (that originaly
were idea from Tom Christiansen some 4 years ago).
Unfortunately i was not able to get Tom's versions, so i had to get them
from other perl-programmers ...

My interest in this is simply to get a feeling for how fast Python is
campared to Perl in some few areas (as choosen from a seemingly good
perl-programmer). Personally this was sponsered by a friend's sentence
about the apparent outcome: "Python has to grow two or three years to
be able to beat Perl in regex-issues" - and i was satisfied to see that
it *can* be faster in at least some cases.

What still would be interesting for me is, if the Python-version *can* be 
coded to be faster for the first test (only one pattern) - just because
perl is *such* faster there.

This was never intended to start a language-war again, but simply to
produce some nice comparisions ...

(I deleted the comp.lang.perl.modules group becaue it seems to be 
not appropiate for this	;-)

	Byebye,
--
 Thomas Ackermann | <tgm@math.uni-bonn.de> | Tel. 0228/73-7773|631369
     LINUX, not Micro$oft! | no unnecessary MIME extended mails!
     no unnecessary Graphics in HTML-Document! | GURPS, not T$R!
          put your HTML stuff in a ftp-accessible directory!
           finger tgm@rhein.iam.uni-bonn.de for public key


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

Date: 26 Mar 1998 17:16:40 GMT
From: tgm@rhein.iam.uni-bonn.de (Thomas Ackermann)
Subject: Re: Perl versus Python benchmark-results
Message-Id: <6fe2ho$12k6@news.rhrz.uni-bonn.de>

Abigail (abigail@fnx.com) wrote:
: Shouldn't that be:
:    $pats = join('/o||/', @pats);
: in the third line of code?

Jup - this way, perl produces the same as the python-version	;-)

	Byebye,
--
 Thomas Ackermann | <tgm@math.uni-bonn.de> | Tel. 0228/73-7773|631369
     LINUX, not Micro$oft! | no unnecessary MIME extended mails!
     no unnecessary Graphics in HTML-Document! | GURPS, not T$R!
          put your HTML stuff in a ftp-accessible directory!
           finger tgm@rhein.iam.uni-bonn.de for public key


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

Date: Thu, 26 Mar 1998 16:56:30 +0100
From: lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
Subject: Re: Perl5 on Irix
Message-Id: <lassehp-2603981656300001@ra.imv.aau.dk>

In article <35197e5b.0@argo.hks.com>, andre@argo.hks.com (David Andre) wrote:

>If anyone could help, I would really appreciate it. Or better yet,
>if anyone has a hints file that I can use for an Irix 6.4 64 bit
>IP27 processor, that would be even better. Am I asking the correct
>people?? Also, if you need more information, like my config.sh file,
>let me know and I'll send it to you.

I've installed and use perl5.004 on IRIX64 version 6.4, with the 7.1
compiler package.

However I haven't compiled it as -64, but as -n32. This should work out of
the box (well, latest.tar.gz), although I preferred using the following
patch to irix_6.sh:

65a66,70
> # This is a much better way to use -n32 than then dirty hack defining cc
as "cc -n32".
> # Including the option in cc breaks things. This one shouldn't.
>         ccflags=" -n32 $ccflags"
>         cc=cc
>       ldflags = " -n32 $ldflags"

I only did this because defining cc as two words broke some other package
(modperl) that I was installing. (A matter of quoting, where $(MAKE)
CC="$(CC)" resulted in "make cc=cc -n32". Although -n is a valid argument
to make, it is wrong here, and neither 3 nor 2 are valid arguments to
make! ;-) )

I configured with:
sh Configure -Ud_bincompat3 -Dd_dosuid -des

Oh, I also had installed the Berkely DB package - I can't remember where I
got it, so let me know if you need it. It wasn't the version on the
freeware CD, which is -o32, not -n32, so it won't link with -n32.

I don't know if perl works in a "real" 64-bit world. I guess there could
be many places in perl where a 32-bit word size is assumed.

But unless you want to use perl to manipulate terabytes of data in some
way that requires 64 bits, -n32 should be both quite sufficient and
efficient.

-Lasse


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

Date: 26 Mar 1998 15:31:10 GMT
From: lusol@turkey.cc.Lehigh.EDU
Subject: Re: Perl5 on Irix
Message-Id: <6fdsbu$1k7a@fidoii.cc.Lehigh.EDU>

     Ron Savage <rpsavage@ozemail.com.au> wrote in article <351994B8.6B02@ozemail.com.au> :
>
>David Andre wrote:
>> 
>> I've tried looking at FAQ's and through the www.perl.com
>> pages but I've found nothing referencing this. I'm trying to
>> build a 64bit version of perl on an SGI machine running Irix
>> 6.4. There is no irix_6_4.sh file in the hints directory. I
>> was wondering if anyone had any luck building this.[snip]
>
>You didn't actually say you'd built the non-64 bit version successfully...
>
>I've built it for IRIX 5.3, for what little that's worth.

I'm stil trying to get perl5.004_63 to build on IRIX 6.3.... something
about can't find file ./sol_locations, thus can't assign virtual address for
Module.so within specified range.


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

Date: 26 Mar 1998 17:39:41 +0100
From: Roland Huss <roland@rom.supportpartner.munich.sgi.com>
Subject: Re: Perl5 on Irix
Message-Id: <55ra3p1k4y.fsf@rom.supportpartner.munich.sgi.com>

Hello,

you might want to have a look at 

	http://reality.sgi.com/scotth/info/perl5.html

There are precompiled  versions   of perl5  for Irix  6.4   (and other
versions) .  However, I don't think they are compiled for 64bit.

What compiler version are you  using ? I  tried to reproduce the error
with MIPSpro 7.2, but I had no problems in compiling Perl5 with '-64':

 .
 .
 .
`sh  cflags libperl.a pp.o`  pp.c
          CCCMD =  cc -64 -DPERL_CORE -c -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C -O3   
rm -f libperl.a
 .
 .
 .


At the  end, I appended my hint  file 'irix_6.sh', which  I modified a
little bit  for using the '-64' option  as default, if available. With
this hint file, everything compiled  smoothly without problems. (Maybe
you are using  an older MIPSpro version ?)

A quick workaround might be  to add  "#include <sys/time.h>" to  pp.c,
since  'struct timeval' is defined there,  and the compiler definitely
croaks about an undefined type.

bye....
-- 
							...roland huss
						             consol.de

[hint file mailed directly to David since is rather long and boring]


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

Date: Thu, 26 Mar 1998 09:20:20 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: scribble@pobox.com
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <351A7234.E3B56A78@mail.uca.edu>

[cc'd to ts]

Tushar Samant wrote:
> 
> nvp@shore.net writes:
> >Ed Finch (efinch@vais.net) wrote:
> >: Perl is going to take over the world. Therefore, the word perl and its derivitives are going to become part of everyday speech, just as "dude" is now.
> 
> What's "dude" mean?

It's the masculine form of "dudette." (i.e., a guy)

Cameron
camerond@mail.uca.edu


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

Date: 26 Mar 1998 15:06:27 GMT
From: stan@thunder.temple.edu (Stan Horwitz)
Subject: Q about CPAN Date module
Message-Id: <6fdqtj$u0c$1@cronkite.ocis.temple.edu>

Thanks to the folks in this group, I was recently introduced to Sullivan
Beck's Date module, which I installed yesterday after downloading it from
the CPAN Web site. The reason why I installed this Date module package is
so I can set up a Perl script that iterates once for each date between two
dates. For example, if I have "03/30/98" and "04/02/98" as my start and
end dates, respectively, I want to process "03/30/98", "03/31/98",
"04/01/98", and "04/02/98". I am a novice Perl programmer, but it seems to
me that the logical thing to do is to use the &Date_GetNext function to
begin with the start date and keep looping until the program reaches the
end date. 

So far though, I am having much difficulty in figuring out how this
function works. Reading the man pages and the info on Sullivan Beck's Web
site has not been enlightening. As a test, I wrote a very short script
that's almost identical (as near as I can tell) to the example in the
docs, but I get the wrong answer.  This is with Perl5.00404 running under
HP Unix. 

Here's one of many things I tried:

use Date::Manip;

$date1 = "11/20/98";
$dow = 4;
$date2 = &Date_GetNext(&ParseDate($date1), $dow, 0);

print " The date following ".$date1." is ".&ParseDateString($date2)."\n";
exit;

The output is:

 The date following 11/20/98 is 1998112600:00:00

Which is incorrect. I am not concerned with the time, but the date part
should be 19981121, but the program's results are five days a head. What
in the world am I doing wrong? 

Thank you



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

Date: 26 Mar 1998 11:24:03 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: Shortcut question
Message-Id: <6fdvf3$7f6@stratus.CAM.ORG>

In article <alecler-2503982121200001@dialup-530.hip.cam.org>,
Andre L. <alecler@cam.org> wrote:
>
>I find that these two variations behave identically. Still, I'm wondering
>whether example #1 is legit syntax or if it is wrong. What do you think?
>

Not only is it legit (it does work, no?), but it is more "Perlish" too.
But remember the Perl motto: TMTOWTDI !

I'd use this (provided @entries is not too large):

    @found = grep $search_val eq $_, @entries;

Have fun !

Richard.
-- 
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
    "All along this path I tread  /  My heart betrays my weary head
     With nothing but my love to save / From the cradle to the grave"
                                 (Eric Clapton, "From the cradle")


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

Date: Thu, 26 Mar 1998 16:26:41 -0000
From: faye@zippysoft.com (Faye Pearson)
To: comp.lang.perl.misc
Subject: Re: Unlink on WinNT/95
Message-Id: <ZPPY11361C717@zippy.zippysoft.com>

On Wed, 25 Mar 1998 21:21:40 +0000, Karl Dyson wrote:
>while (-e "counter.lock") { #Use the -e thing to check if the file 
>                            #exists. Notice the newly added quotes
>                            #around the filename
>}

I hope you weren't planning to use your computer for anything else
during this time (like let another process finish)?  A sleep() or
select() within the while loop is more multitasking friendly.


Faye

-- 
Faye Pearson, faye@zippysoft.com

Scan your mailbox for unwanted mail before you fetch it:
POP3c for Java at http://www.zippysoft.com/


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

Date: Thu, 26 Mar 1998 09:18:30 -0800
From: Mike Hitchcock <mike@unival.com>
Subject: Re: Using Perl packages and "strict"
Message-Id: <351A8DE5.7342DF6A@unival.com>

Alberto Aimar wrote:
> 
> Hi,
>   I have looked hard on books, the Web,
> Dejanews, FAQs, etc. but I do not understand how
> to use packages.
> 
> See the example below:
> 
> 1. If I do not put "strict" nor "my" statements it works.
> 
> 2. With "strict" and therefore "my" statements, it doesn't work.
>    Most variables are null-valued.
> 
> Thanks for your help.
> 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> use strict;
> 
> package sub;
> 
> my $mainvar;
> my $mainvar1;
> $mainvar=2;
> $mainvar1=2;
> 
> 
> package top;
> 
> my $mainvar;
> my $mainvar1;
> $mainvar=22;
> $mainvar1=22;
> 
> 
> print "########### SUB ##########\n";
> print "1# $mainvar  $mainvar1\n";
> print "2# $::mainvar  $::mainvar1\n";
> print "3# $top::mainvar  $top::mainvar1\n";
> print "4# $sub::mainvar  $sub::mainvar1\n";
> print "==============\n";
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> --
> Alberto Aimar
> ---------------------------------------------------------------------
> Note  : This is my *personal* opinion, nothing to do with my employer
> Remove: "the" from the email address in order to reply correctly;
>         this is avoid unsolicited automatic commercial emails

I always find it useful to use the "-w" (warning) option to perl.
When applied to this script, we get the following output:

   "my" variable $mainvar masks earlier declaration in same scope at kk
line 14.
   "my" variable $mainvar1 masks earlier declaration in same scope at kk
line 15.
   Name "top::mainvar" used only once: possible typo at kk line 22.
   Name "top::mainvar1" used only once: possible typo at kk line 22.
   Name "main::mainvar" used only once: possible typo at kk line 21.
   Name "sub::mainvar" used only once: possible typo at kk line 23.
   Name "sub::mainvar1" used only once: possible typo at kk line 23.
   Name "main::mainvar1" used only once: possible typo at kk line 21.
   ########### SUB ##########
   1# 22  22
   Use of uninitialized value at kk line 21.
   Use of uninitialized value at kk line 21.
   2#   
   Use of uninitialized value at kk line 22.
   Use of uninitialized value at kk line 22.
   3#   
   Use of uninitialized value at kk line 23.
   Use of uninitialized value at kk line 23.
   4#   
   ==============

Recall that my() does NOT make an entry in the symbol table. Therefore
in
package "foo", saying "my($bar) = 1" will not create a $foo::bar. This 
is why perl complains of uninitialized values (there are no
$package::variables
defined) and also why it complains about them only being used once (they
haven't been set, so when you try to print them, that is the first time
perl sees these varnames).

The first print works because we are still within scope, so $mainvar==22
and $mainvar2==22.

When you do not use strict, and also do not use my(), your variables are
package globals, and thus go into the packages symbol table.

When use()ing strict, you can fully qualify the varname and perl does
not
complain:

   #!/usr/local/bin/perl5.004 -w
   use strict;

   package sub;
   $sub::mainvar=2;

   package top;
   $top::mainvar=22;

   print "########### SUB ##########\n";
   print "1# $top::mainvar\n";
   print "2# $sub::mainvar\n";
   print "==============\n";

outputs the following:

   ########### SUB ##########
   1# 22
   2# 2
   ==============

Hope this helps.
-- 
Mike Hitchcock
mike@unival.com
hitchcock@earthling.net


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

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

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