[9823] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3416 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 11 10:07:11 1998

Date: Tue, 11 Aug 98 07:00:27 -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           Tue, 11 Aug 1998     Volume: 8 Number: 3416

Today's topics:
        RE:  readdir FILEHANDLE, $dir <ryan@steelplan.com.au>
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: ActiveState 5.005: Where are the threads? (Nathan V. Patwardhan)
        attach file to email c.clark@student.unsw.edu.au
    Re: Date and Time (Mike Stok)
    Re: Date and Time (Mike Stok)
    Re: dates in excess of 2037 (A Problem???) <cstith@dstream.net>
    Re: emacs perl mode <marius@ace.funcom.com>
        File::Copy <peredina@progress.com>
    Re: first language (Paul Buder)
    Re: gethostbyname <magross@mmd.ch>
    Re: Help with regular expression salvador@my-dejanews.com
    Re: Installation problems with Perl5.004 <orangutan@grungyape.com>
    Re: Named Pipes on NT <Andreas.Kuckartz@materna.de>
        Need to Lock files (NFS)  <jonesma@betalasermike.com>
    Re: Perl in DOS or Win95... <cstith@dstream.net>
    Re: perlfaq - frequently asked questions about Perl (pa (Chris Nandor)
    Re: perlfaq - frequently asked questions about Perl (pa (Andrew M. Langmead)
        Run perl script "in-line"? <lee.davies@NOSPAMsaaconsultants.com>
    Re: Self-printing code <robin.houston@guardian.co.uk>
    Re: Test Results - Asking a question <conmara@tcon.net>
        Up-to-date version of Win32:ODBC fozdyke@my-dejanews.com
        Using Perl scripts in perl scripts? <clarkja@boat.bt.co.uk>
    Re: Using Perl scripts in perl scripts? <webmaster@fccjmail.fccj.cc.fl.us>
    Re: Using variable in TR (Mike Stok)
    Re: variable indirection [off topic - parens] <jdf@pobox.com>
    Re: Where can I find the binary for perl at least 5.002 (Alvin J. Alexander)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 11 Aug 1998 18:32:01 +0800
From: Ryan Snowden <ryan@steelplan.com.au>
Subject: RE:  readdir FILEHANDLE, $dir
Message-Id: <35D01DA1.2A27671C@steelplan.com.au>

opendir CONTENTS, $upload_dir;

@allfiles = grep !/^\.\.?$/, readdir CONTENTS;

foreach $file (<*>) {
	@allfiles = (@allfiles,"${file}\n");
	chomp($file);
	print ("	    <option value=$file>$file</option>\n");
	       }
closedir CONTENTS;

I have embeded the above into a perl script.  Either side lies HTML
code.  Now, the above works fine and it lists files within the HTML for,
but, the wrong files.  It only seems to show the files in my ../cgi-bin/
directory where my script is held, rather than the $upload_dir specified
by the opendir line.

$upload_dir looks something like
/home/web/users/spa/web/files/company/company_2_company

What am I doing wrong?


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

Date: Tue, 11 Aug 1998 10:24:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage902831041.21534@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 05 Aug 1998

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last major update of the Perl FAQ was in Summer of
1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://cpan.perl.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

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

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://cpan.perl.org/
    http://www.perl.com/CPAN/
    http://cpan.perl.org/doc/FAQs/FAQ/html/perlfaq.html
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq.html

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:

    setdir usenet-by-group/news.announce.newusers
    send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List

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

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: 11 Aug 1998 13:47:58 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: ActiveState 5.005: Where are the threads?
Message-Id: <6qpi2e$rfd@fridge.shore.net>

Jonathan Feinberg (jdf@pobox.com) wrote:

: FWIW, I have not been able to build Perl 5.005 with the latest Cygwin
: development kit, whereas building with an old version of MSVC was a

Interesting.  I had no problems with the 005 betas -- up to and
including _75.  I just used the cygwin hints file as config.sh and
worked my way from there.

What kind of errors do you see?

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Tue, 11 Aug 1998 13:51:35 GMT
From: c.clark@student.unsw.edu.au
Subject: attach file to email
Message-Id: <35d04c11.17476579@news.syd.enternet.com.au>

Hi,

Does anyone have some sample script that allows you to attach a file
to email?  (I'm wanting to create a sort of virtual flowers type
thing, but where the image is generated and sent to the person).


Ta,


Chris.


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

Date: 11 Aug 1998 12:56:48 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Date and Time
Message-Id: <6qpf2g$16k@news-central.tiac.net>

In article <35CF8547.1BEEE4DF@crocker.com>,
Thomas Emery  <temery@crocker.com> wrote:
>How can I show the date as month and day (no year), and the time as just
>hour and minute (dropping the second)?

If you have the POSIX module available then you can use strftime which was
designed to format time values into strings e.g.

  use POSIX 'strftime';

  [...]

  print strftime "%B %e %H:%M\n", localtime;

Produces something like

  August 11 08:55

To me this seems a little cleaner than manipulating localtime values, but
it does need to pull in a chunk of the POSIX module.

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@colltech.com                  |            Collective Technologies (work)


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

Date: 11 Aug 1998 13:00:28 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Date and Time
Message-Id: <6qpf9c$1aj@news-central.tiac.net>

In article <6qp6q3$mf7$1@nnrp1.dejanews.com>,  <huntersean@hotmail.com> wrote:

>You probably want something like this:
>
>my @month = qw(JAN, FEB, MAR, APR, MAY, JUN,
>               JUL, AUG, SEP, OCT, NOV, DEC);

Note that this will make @month contain elements like 'JAN,' - using the
-w flag would pick this up and warn you with a message like:

  Possible attempt to separate words with commas at ...

Of course sometimes a trailing comma is intentional, but given the later
use of %3.3s as a format specifier for outputting the month I would guess
that in this case it isn't.

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@colltech.com                  |            Collective Technologies (work)


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

Date: Tue, 11 Aug 1998 08:40:41 -0500
From: "Chris" <cstith@dstream.net>
Subject: Re: dates in excess of 2037 (A Problem???)
Message-Id: <6qphm0$6l4$1@news10.ispnews.com>

The best way to avoid epoch problems is to write your own code to handle the
time/date needs of the program. This will probably be the case until a
larger variable is used to store epoch time.

Chris


Dominic Tootell wrote in message <35CFEA59.41AB@mlch.ml.com>...
>Hi everyone... how are you doing??
>
>
>I have very interesting problem for you.  I need to calculate the number
>of days between two dates (in perl).  OK.. use the localtime function
>supplied with the perl standard library to get the number of seconds
>since
>1 January 1970 for the first date, then the number of second for the
>second date.  Minus the two and then perform the calculation
>(((Remaining
>seconds/60)/60)/24).  Ok fine that works, but the problem arises when
>you
>supply a date with the year 2028.  The function does not work,  The
>integer width cannot hold the seconds value, since 2038.
>
>This is quite a problem as I can see a few people using this to
>calculate the days between two dates  which uses this function, and
>there must be quite a few important applications that use this library
>which will fail when using a date in excess of 2037.
>
>This is just not a problem limited to perl, perl use the unix epoch date
>to get the number of seconds since 1970, so does this then mean quite a
>few other applications will have a problem?
>
>An ideal solution to the problem would be:-
>
>Get the number of seconds from 1970 until an end date in 2037, then
>specify that end date as the start of the next calculation, so that you
>can get the number of seconds since that date
>
>eg.  date 1/12/2040.
>
>get the number of seconds since 1/1/1970 for the date 1/12/2037. Then
>get the number of seconds since 1/12/2037 to the final date 1/12/2040.
>
>This would be perfect,but is there anyway of specifying this.
>
>This is a very important problem that I need solving.  I have kind of a
>solution, but it is just a patch.
>
>Please anyone reply to the address below
>
>Yours greatfully
>
>
>
>
>Dominic
>
>
>*************************************************
>Dominic Tootell, Merrill Lynch Derivative Products A.G.
>Stauffacherstrasse 5
>Zurich 8001.
>Switzerland
>
>Email: tootedom@mlch.ml.com
>Work Tel:-  +41 1 297 7830
>Mobile:- +41 079 691 5409
>***********************************************




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

Date: 11 Aug 1998 13:54:42 +0200
From: Marius Kjeldahl <marius@ace.funcom.com>
Subject: Re: emacs perl mode
Message-Id: <52hfzj7myl.fsf_-_@ace.funcom.com>

>>>>> "Philosopher" == Philosopher King <holcojh5@REMOVEMEwfu.edu> writes:

  >> Greg Dickson wrote:
  >>>  Does anyone know of a color syntax editor for perl preferably
  >>> 
  >>> I know this is pretty naff but Ive got used to this in my other
  >>> programing environments and it would just be nice
  >>  Looking at your .signature I think you are using Linux. If that
  >> is the case get cperl-mode for emacs at
  >> CPAN/misc/emacs/cperl-mode/

  Philosopher> If you don't like cperl-mode or can't get it to work,
  Philosopher> recent versions of Emacs have a built-in Perl mode with
  Philosopher> syntax highlighting. Just do M-x perl-mode 

Does anybody know if (possibly newer version) of perl-mode for emacs
is able to cope with $$ and ${...} constructs without messing up
indentation?

Marius


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

Date: Tue, 11 Aug 1998 08:31:34 -0400
From: Peredina <peredina@progress.com>
Subject: File::Copy
Message-Id: <35D039A6.46D1C459@progress.com>

Using this module, is there a way to copy the correct permissions,
particularly the executable?

Thanks in advance,

Curt



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

Date: Tue, 11 Aug 1998 11:00:45 GMT
From: paulb@user1.teleport.com (Paul Buder)
Subject: Re: first language
Message-Id: <6qp88n$783$1@user1.teleport.com>

In <35CA24BF.ABB78190@distorted.net> ray <ralba@distorted.net> writes:
>Also, I would like to mention, that if I could be a cook, I would be
>very happy.

The Perl Cookbook is coming out soon.  What is that in that oyster?


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

Date: Tue, 11 Aug 1998 13:01:15 +0200
From: Marc-Alain Gross <magross@mmd.ch>
Subject: Re: gethostbyname
Message-Id: <35D0247B.4B2E040@mmd.ch>

Did you try following ?
   while (@x = gethostent) {
      printf ("\nName: %s\nAliases: %s\nType: %s\nlen: %s\n", @x[0..3]);
      foreach $i (4..$#x) {
         printf ("Addr: %d.%d.%d.%d\n", unpack ('C4', $x[$i]));
         }
      }

Regards,
  Marc-Alain Gross


-- 
______________________________________________________________________

Marc-Alain GROSS                            Phone:  +41 (21) 213 61 32
MMD SA                                      Fax:    +41 (21) 213 44 09
Av. Mousquines 4                            E-Mail: magross@mmd.ch
CH-1005 Lausanne
______________________________________________________________________


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

Date: Tue, 11 Aug 1998 11:14:35 GMT
From: salvador@my-dejanews.com
Subject: Re: Help with regular expression
Message-Id: <6qp92s$opc$1@nnrp1.dejanews.com>

In article <1998080901363100.VAA20228@ladder01.news.aol.com>,
  awrobinson@aol.com (Awrobinson) wrote:
> I'm trying to parse table rows in a pathological html document. The document
> doesn't have any closing tags for <table>, <tr>, <th>, or <td>. This is what I
> tried that did not work:

Have you tried the HTML::TreeBuilder module, it will parse the html code and
insert the closing tags when needed. Look for it in CPAN, its name is
HTML-Tree-0.51.tar.gz

bye!

  - Salva.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 07:52:39 -0400
From: "Franklin L.Petersen" <orangutan@grungyape.com>
Subject: Re: Installation problems with Perl5.004
Message-Id: <6qpba8$3c7$1@cletus.bright.net>

Ben,

This is a fairly basic response meaning one of many things...these may not
be all of them.  Basically, I got this on my SCO system during first time
install of Perl, you either do not have a gcc compiler installed...or in my
case it was installed but SCO also requires a "multimedia library" package
to be installed so gcc works, or gcc is installed but not set up properly
and the program cannot locate it.

For a better response, please try to indicate what system you are using.

Franklin

Ben Crossman <ben@highway1.com.au> wrote in message
35CFFBE2.17DE@highway1.com.au...
>I'm getting the following installation problem. Any suggestions.
>
>Checking for GNU cc in disguise and/or its version number...
>
>*** WHOA THERE!!! ***
>    Your C compiler "gcc" doesn't seem to be working!
>    You'd better start hunting for one and let me know about it.
>Exit 1
>
>
>
>--
>------------------------------------
>Ben Crossman
>Web Consultant / Maintenance
>ben@highway1.com.au
>http://users.highway1.com.au/~ben
>Highway 1 (Aust) Pty Ltd




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

Date: Tue, 11 Aug 1998 11:36:27 +0200
From: "Andreas Kuckartz" <Andreas.Kuckartz@materna.de>
Subject: Re: Named Pipes on NT
Message-Id: <6qp3a9$o0u$1@penthesilea.Materna.DE>

>Does anyone know how to create a named pipe in perl on NT....are named
>pipes even supported
>on NT-Perl.


Get the module Win32::Pipe from CPAN.
The latest version perhaps needs some configuration changes
before it can be built.

I especially recommend using the Win32-function CallNamedPipe ...

Andreas





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

Date: Tue, 11 Aug 1998 13:31:52 GMT
From: "Michael A. Jones" <jonesma@betalasermike.com>
Subject: Need to Lock files (NFS) 
Message-Id: <35D04830.FAE00EC1@betalasermike.com>

Have been trying to find a good way to lock a file that an other user
might try to open while I'm processing it. The user is NFS mounted to
server and I would like to "Lock" the file. I'm looking for any
resources that might address such an attempt. I've tried the obvious
(flock) and have been experimenting with fcntl. Any advice would be
appreciated.
Details: file in question is a "pkziped" file created by a user. My
program watches for the creation of such files, waits until it's closed
and then does stuff to it. I would like to prevent anyone from opening
it during my (short) processing just in case. I think that means locking
it.



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

Date: Tue, 11 Aug 1998 08:34:53 -0500
From: "Chris" <cstith@dstream.net>
Subject: Re: Perl in DOS or Win95...
Message-Id: <6qphb5$648$1@news10.ispnews.com>

You don't need CGI access to program in Perl. All you need is a shell with
execute rights to perl.

John m. Hurley wrote in message <35D019C8.7EB76AEA@erols.com>...
>Hi,
>
>I'm a newbie to PERL programming and I was wondering of there is a way
>to test PERL programs on Win95 or DOS.  I feel I am getting the idea of
>the language but would like to try the in-book programs to learn it
>better as well as to privately modify them to "learn from my mistakes".
>My server doesn't allow me to use cgi on it's machine so I can't u/l the
>files to the server.  Any help would be greatly apperciated.
>
>    Thanks,
>        John
>




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

Date: Tue, 11 Aug 1998 08:56:53 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <pudge-1108980856530001@192.168.0.3>

In article <35cf85ed.26946597@nntpd.databasix.com>,
whatpartofdontemailme@dontyouunderstand wrote:

# On Fri, 07 Aug 1998 11:20:45 -0400, in article
# <pudge-0708981120450001@192.168.0.3>, pudge@pobox.com (Chris Nandor) wrote:
# 
# >No, I don't.  But it not similar, anyway.  Web sites and mail are two
# >different things.
# 
# You're starting to get it.  Web and email aren't the same thing. Usenet and
# web aren't the same thing. Usenet and email aren't the same thing.

I never said they were the same thing.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Tue, 11 Aug 1998 13:37:36 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <ExJ1up.2F0@world.std.com>

patrickq@autobahn.mb.ca (Patrick) writes:

>wondering if tom's minimalist philosophy means he uses:

>sed for his stream editing?
>awk for his pattern matching?
>sh for shell scripting?

This reminds me of a quote in
<URL:http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz>

:        And it goes against the grain of building small tools.
Innocent, Your Honor.  Perl users build small tools all day long.
                --Larry Wall in <1992Aug26.184221.29627@netlabs.com>
-- 
Andrew Langmead


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

Date: Tue, 11 Aug 1998 11:06:10 GMT
From: "Lee Davies" <lee.davies@NOSPAMsaaconsultants.com>
Subject: Run perl script "in-line"?
Message-Id: <CAVz1.30$Sd7.150517@news-reader.bt.net>

Is there a neat way to run a perl script in-line in much the same way as
Javascript can be embedded?

I have a perl script which collects some server details (hostname, port, OS
version etc.) and want this information echoed into the current document.
This has to happen without user intervention.

Any suggestions?




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

Date: Tue, 11 Aug 1998 11:02:16 GMT
From: Robin Houston <robin.houston@guardian.co.uk>
Subject: Re: Self-printing code
Message-Id: <6qp8bo$o6e$1@nnrp1.dejanews.com>

comdog@computerdog.com (brian d foy) wrote:
>Robin Houston <robin.houston@guardian.co.uk> posted:
> >Oh, but that's cheating :-)
> >It reads its own source
> ...
>    system '/bin/cat', $0;

On the subject of "cheating" solutions, how about:

open+0;print<0>
    -or-
print`cat $0`

I wanted to write the first one as   print<0+open+0>  but that's
intepreted as a glob, unfortunately.

 .robin.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 14:50:19 GMT
From: Ken McNamara <conmara@tcon.net>
Subject: Re: Test Results - Asking a question
Message-Id: <35D03E19.3453B30D@tcon.net>

Didn't someone postulate that life exists only on the boundry of chaos?

KenMc

Craig Berry wrote:

> Jonathan Feinberg (jdf@pobox.com) wrote:
> : cberry@cinenet.net (Craig Berry) writes:
> :
> : > At least until some postulated future time when most people claim to have
> : > read the docs, that claim will make a valid pre-filter for good intent.
> :
> : Hey, everybody!  I've read the docs, but they really suck!!!  I was
> : wondering, how do I...
>
> You know, the gleeful way software people leap directly onto pathological
> boundary condtions gets slightly wearing after a while... :)
>
> ---------------------------------------------------------------------
>    |   Craig Berry - cberry@cinenet.net
>  --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
>    |      Member of The HTML Writers Guild: http://www.hwg.org/
>        "Every man and every woman is a star."





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

Date: Tue, 11 Aug 1998 12:31:08 GMT
From: fozdyke@my-dejanews.com
Subject: Up-to-date version of Win32:ODBC
Message-Id: <6qpdic$tqq$1@nnrp1.dejanews.com>

Hi, I'm having some difficulty tracking down a version of Win32:ODBC. The
version I get from Dave Roth's site complains that the build number is too
high (316) where it reqiures build 302 (yes the error message is spelt that
way :-))

Does anyone know of a way around this? or where a more modern version is?

Thanks

Terry

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 13:40:24 +0100
From: Jason clark <clarkja@boat.bt.co.uk>
Subject: Using Perl scripts in perl scripts?
Message-Id: <35D03BB8.6AE42609@boat.bt.co.uk>

I am trying to call a perl script from withing another perl script using
the below syntax.
However each time i run this,  the condition is always true. if somthing
in "config.pl" script has failed I will want the calling script to know
this by somehow returning a code.
(return(0); do not appear to work?).

      **How do I get "CONFIG.PL" To indicate a failure to the calling
script**.
----------------------
if ('config.pl')
  {
    print "it worked";
  }
else
   {
    print "Didn't work";
   }                # This just seems to indicate if the file exists???
------------------------
Many thanks Jason.
clarkjason@bikebits.bt.co.uk



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

Date: Tue, 11 Aug 1998 08:33:41 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Using Perl scripts in perl scripts?
Message-Id: <35D03A25.D795B4C3@fccjmail.fccj.cc.fl.us>

Jason clark wrote:
> 
> I am trying to call a perl script from withing another perl script using
> the below syntax.
> However each time i run this,  the condition is always true. if somthing
> in "config.pl" script has failed I will want the calling script to know
> this by somehow returning a code.
> (return(0); do not appear to work?).
> 
>       **How do I get "CONFIG.PL" To indicate a failure to the calling
> script**.
> ----------------------
> if ('config.pl')
>   {
>     print "it worked";
>   }
> else
>    {
>     print "Didn't work";
>    }                # This just seems to indicate if the file exists???
> ------------------------
> Many thanks Jason.
> clarkjason@bikebits.bt.co.uk

Well, I wouldn't use backticks (`) (you didn't use them either,
you used (')...)

I would either use system() for the call or correct the called script
to complain better.  

HTH,
-- 
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
http://www.fccj.org/cgi/mail?webmaster | http://webmaster.fccj.org/Webmaster


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

Date: 11 Aug 1998 13:22:16 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Using variable in TR
Message-Id: <6qpgi8$25r@news-central.tiac.net>

In article <6qodt2$ii13@hkpa05.polyu.edu.hk>,
cs - Elton Kong <cselton@hkp.hk> wrote:
>Hi!
>
>I want to use a variable's value in the tr operator. Below is my
>test code:
>
>$m = 'abc';
>$n = 'xyz';
>$o = 'a1b2c3';
>$o =~ tr/$m/$n/;
>print $o, "\n";

The perlop docs say this in the section on y/// (which the tr entry points
you to)

               Note that because the transliteration table is
               built at compile time, neither the SEARCHLIST nor
               the REPLACEMENTLIST are subjected to double quote
               interpolation.  That means that if you want to use
               variables, you must use an eval():

                   eval "tr/$oldlist/$newlist/";
                   die $@ if $@;

                   eval "tr/$oldlist/$newlist/, 1" or die $@;

So you might want to say

  eval "\$o =~ tr/$m/$n/, 1" or die $@;

Note that you might want to check the contents of $m and $n if you don't
specify them yourself as it doesn't take much imagination to make the eval
do a lot more than just a tr.

There are other ways to do this, this is just the one suggested in the
documentation - check out the docs on eval too to see what it does.

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@colltech.com                  |            Collective Technologies (work)


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

Date: 11 Aug 1998 08:20:35 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: variable indirection [off topic - parens]
Message-Id: <iujzven0.fsf@mailhost.panix.com>

nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht) writes:

> When calling my(), a *function*, I think you should put your
> arguments in parens, just like you have to when you call your own
> function that you've written or like you always have to when you
> program in C.

Using parens with my() creates a list assignment, and is therefore
semantically different from my() without parens.

   my @a = qw( a b c );
   my ($x) = @a;
   my  $y  = @a;
   print "\$x is $x\n\$y is $y\n";

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Tue, 11 Aug 1998 10:47:05 GMT
From: aja@DevDaily.com (Alvin J. Alexander)
Subject: Re: Where can I find the binary for perl at least 5.002 (better 5.005) for Windows NT4.0 ?
Message-Id: <35d020bf.39692774@news.iglou.com>

If you're looking for the binary for Windows, try looking here:

     http://www.activestate.com

For other operating systems, you can usually find a binary at their
web site.

Al A.

Developer's Daily
http://DevDaily.com
"The resource for Java, Perl, and Unix developers."



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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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