[10095] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3688 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 11 02:07:22 1998

Date: Thu, 10 Sep 98 23:00:22 -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           Thu, 10 Sep 1998     Volume: 8 Number: 3688

Today's topics:
        &ReadParse; <ryan@steelplan.com.au>
    Re: &ReadParse; <ryan@steelplan.com.au>
    Re: Danish FXE (Andre L.)
        Have problem with import of global variables <alitvak@shrike.depaul.edu>
    Re: HELP:  Malformed header error (Asher)
    Re: How do you hide the definition of a subroutine? (Andrew M. Langmead)
        how to install perl on hp-ux9.05 <zpskcea@chollian.net>
        Looking for example code that does modem communication. <atdt@nycap.rr.com>
    Re: Looping and grep problem (Ronald J Kimball)
    Re: Net::CDDB? <root@kam.xvi.com>
    Re: Objects & type checking (Kenneth Herron)
    Re: Passing file handles (Martien Verbruggen)
    Re: Perl & Java - differences and uses <elaine@cts.wustl.edu>
    Re: Perl & Java - differences and uses <pats@acm.org>
    Re: Perl & Java - differences and uses bitnut1@my-dejanews.com
    Re: Perl & Java - differences and uses <borg@imaginary.com>
        Perl 5.0 in Windows NT Server 4.0? <diretor@mercosulsearch.com.br>
        Perl 5.0 in Windows NT Server 4.0? <diretor@mercosulsearch.com.br>
    Re: printf,sprintf padding character (Craig Berry)
        problems with win32-odbc and watcom database jeremy.graveson@adis.co.nz
        Q: Suspicious "ld"'s behavior on SunOS 4.1.4 while comp <kmin@netbeta.sogang.ac.kr>
        Question about Perl/mysql (charles lin)
    Re: Question about Perl/mysql (Michael Fuhr)
    Re: QUESTIONS (was: Perl Programmer Needed) (Ronald J Kimball)
    Re: Returning objects?  Is it possible? <jdf@pobox.com>
    Re: SPSS Gateways in PERL <rcbieber@ameritech.net>
    Re: SPSS Gateways in PERL <eashton@bbnplanet.com>
        Thanks for your responses to my CGI/Fork Question.. <mchari@cisco.com>
        turning perlpod into man documentation <gremio@Glue.umd.edu>
    Re: What is Robot in Perl? <eashton@bbnplanet.com>
        While loop with regex as condition? <mhughe@acs.ucalgary.ca>
        While loop with regex as condition? <mhughe@acs.ucalgary.ca>
        wtb: Perl 5 for dummies (used) <mecran01@homer.louisville.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 11 Sep 1998 09:24:20 +0800
From: ryan <ryan@steelplan.com.au>
Subject: &ReadParse;
Message-Id: <35F87BC4.1304B16D@steelplan.com.au>

I'm using the library module cgi-lib.pl to upload files from a Web
page.  This works fine and the file uploads fine.  I now have more form
information to submit on the form (two radio buttons).  My aim is to
read in the value of these radio buttons and, depending on their value,
run them through some if statements.

The problem lies in the upload script itself.  &ReadParse is in the
following line:

    $ret = &ReadParse(\%cgi_data,\%cgi_cfn,\%cgi_ct,\%cgi_sfn);

This works ok for the file, but it does not read in the radio button
values when I go:

    $project = $in{'project'};

How can I change that &ReadParse command line as to include the new
radio buttons?

Kind Regards
Ryan Snowden





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

Date: Fri, 11 Sep 1998 09:28:10 +0800
From: ryan <ryan@steelplan.com.au>
Subject: Re: &ReadParse;
Message-Id: <35F87CAA.6E9017E1@steelplan.com.au>

Oh hang on...

$project = $cgi_data{'project'};

should do the trick, shouldn't it?


Ryan.


ryan wrote:

> I'm using the library module cgi-lib.pl to upload files from a Web
> page.  This works fine and the file uploads fine.  I now have more form
> information to submit on the form (two radio buttons).  My aim is to
> read in the value of these radio buttons and, depending on their value,
> run them through some if statements.
>
> The problem lies in the upload script itself.  &ReadParse is in the
> following line:
>
>     $ret = &ReadParse(\%cgi_data,\%cgi_cfn,\%cgi_ct,\%cgi_sfn);
>
> This works ok for the file, but it does not read in the radio button
> values when I go:
>
>     $project = $in{'project'};
>
> How can I change that &ReadParse command line as to include the new
> radio buttons?
>
> Kind Regards
> Ryan Snowden
>



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

Date: Fri, 11 Sep 1998 01:38:21 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Danish FXE
Message-Id: <alecler-1109980138210001@dialup-575.hip.cam.org>

[Courtesy copy mailed to author.]

In article <35F865DF.71B4@post10.tele.dk>, tcd@post10.tele.dk wrote:

> I have been looking at some database scripts
> And it seems that they all have the same fault.
> When you do a search for a word that starts with a danish letter
> F X E f x e - like in the words  "Fg" "Xlstykke" "Erhus"
> the scripts cant find it.
> 
> 
> I'm not sure but this seems to be a problem with
> perls reg expression matching, not the programs..
> 
> Can anyone help me with this problem ????????????
> Please email me if you have the answer to the problem.


This is a problem with the programs, not Perl's regexp engine, which
adapts to national character sets.

Consider this. We want to match all word characters until 'tykke'.

   $_ = 'Xlstykke';
   ($found) = /(\w+)tykke/;

By default, $found will contain "ls", because the X character is not
considered a word character in the standard locale. However, if the
locale's LC_TYPE is set to Danish (which should be "da", according to the
Locale::Language module):

  #!/usr/local/bin/perl -w

  use POSIX qw/locale_h/;    # import the POSIX locale definitions

  setlocale(LC_TYPE, "da");  # set the appropriate locale

  $_ = 'Xlstykke';

  { use locale;              # now, we're speaking Danish
    ($found) = /(\w+)tykke/;
  }

then the match will give the results you expect.

Note that functions like uc() and lc() are also affected by the locale.

   { use locale;
     $caps = uc 'xlstykke';   # -> $caps eq 'XLSTYKKE'
   }

As well as sort(), which is affected (indirectly) by the LC_COLLATE part
of the locale.

Please refer to the "perllocale" document for more info.

Hope this badly written reply helps somewhat,

Andre
who has no clue what xlstykke means


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

Date: Fri, 11 Sep 1998 00:01:38 -0500
From: "Alex Litvak" <alitvak@shrike.depaul.edu>
Subject: Have problem with import of global variables
Message-Id: <35f8ae18.0@news.depaul.edu>

Hello everybody.

I created a module that exports huge list of variables that are used in the
many our scripts.

This variables are exported through @EXPORT and @EXPORT_OK.  They are also
assign values in the module in the manner
my $MYVAR="Foo";

The problem  is that when I use this module in other scripts I import
the variables with no value.
print $MYVAR; gets me nothing at the output.
What am I doing wrong?  Any help is appreciated

Alexander Litvak
alitvak@shrike.depaul.edu
alexl@vailsys.vom





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

Date: 11 Sep 1998 01:06:52 GMT
From: asher@localhost.localdomain (Asher)
Subject: Re: HELP:  Malformed header error
Message-Id: <slrn6vgth1.2fq.asher@localhost.localdomain>

The problem is not in the second line of your script; it's in the 
second line of the script's _output_.  Try sending newline (\n) to 
terminate lines instead of carriage return (\r) you seem to be using.
On 08 Sep 1998 22:40:17 PDT, Jeff Prince <jprince@rockisl.com> wrote:
>
>I'm new to CGI scripting, but I'm trying hard to learn to do some relatively
>simple database operations form my web site.  I've taken an example tutorial
>script from an on-line source, placed it in directories on my domain, and
>attempted to execute it to study how it works.  When I call the script, I
>get the following error:
>
>    Error: HTTPd: malformed header from script /cgi/add.cgi
>
>My cgierr_log gives this information:
>
>    09/08/98 20:22 "/cgi/data_search.cgi", proc "/usr/local/bin/perl":
>    Illegal character \015 (carriage return) at /cgi/data_search.cgi line 2.
>    (Maybe you didn't strip carriage returns after a network transfer?)
>
>Here is a header snippet from the offending CGI code:
>
>    #!/usr/local/bin/perl
>    use CGI qw /:standard :html3/;
>
>I'm stumped on this one.  What am I doing wrong that won't allow this to run
>on my server?  It runs just fine on it's home server.
>
>Can anyone shed some light you can on what's happening here?
>
>Thanks in advance,
>Jeff Prince
>jprince@rockisl.com
>
>
>
>
>
>
>


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

Date: Fri, 11 Sep 1998 05:25:38 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How do you hide the definition of a subroutine?
Message-Id: <Ez3tqr.LvB@world.std.com>

bernie@fantasyfarm.com (Bernard Cosell) writes:

>I need to replace the definition of a subroutine, and I'm having a
>devil of a time figuring out how to do it without generating 'warning'
>complaints.

You may find it cheating, but why not just temporarily turn off
warnings?

*origfcn = \&fcn ;
{ 
   local ($^W) = 0;
   *fcn = \&newfcn;
}
-- 
Andrew Langmead


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

Date: Fri, 11 Sep 1998 14:12:03 +0900
From: "@L?5?A" <zpskcea@chollian.net>
Subject: how to install perl on hp-ux9.05
Message-Id: <6tab75$hp5$1@news.kornet.nm.kr>

hi.
I want to install perl on hp-ux 9.05 system.
But whenever I compile perl to hp-ux, I met  error message like this.

"AutoSplitting Text::ParseWords (lib/auto/Text/ParseWords)
sh: 15228 Memory fault - core dumped
*** Error code 139                       "

If anyone know to solve this problem, help me .please.

Thanks.

E-mail : zpskcea@chollian.net





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

Date: Fri, 11 Sep 1998 01:39:05 -0400
From: Zailong Bian <atdt@nycap.rr.com>
Subject: Looking for example code that does modem communication.
Message-Id: <Pine.LNX.3.96.980911013007.1165A-100000@dt06q1n12.nycap.rr.com>


I got a numeric pager and I want to be able to page from a www interface.
But I have not got the modem working yet...

What I need the perl script to do is: 

	connect to the modem;
	dial a number;
	wait a few sec(for tone)
	dial some  numbers
	hang up.

That's it.  But I tried sth like:

open MODEM, "+>/dev/modem";
print MODEM, "ATDT12334\n";
 ....

It won't dial at all.

I can do this by minicom:

	ath1<enter>
	atdt123344444;<enter>
	atdt12312312313123123123123131;<enter>
	ath0<enter>

I don't know perl very well.  Anyone can give me some hints?

Thanks.

ZB



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

Date: Thu, 10 Sep 1998 22:07:20 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Looping and grep problem
Message-Id: <1df5tyk.a74sjo1j9y3kcN@bay2-509.quincy.ziplink.net>

Asa C. Martin <non-spammers_asa.c.martin@boeing.com> wrote:

>    if ((grep /SUBJECT/, $line) && !($subjFound)) {
>       until (grep /f\d/, $junk) {
>       until (grep /newpath/, $subject_search) {
>    if ((grep /Number/, $line) && !($numFound)) {
>       until (grep /f\d/, $junk) {

grep is generally used on lists of multiple elements.  If you want to
apply a regex to a single scalar, this is the preferred way to do it:

$string =~ /regex/

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 11 Sep 1998 01:17:57 GMT
From: Jean-Francois Doyon <root@kam.xvi.com>
Subject: Re: Net::CDDB?
Message-Id: <Pine.LNX.3.96.980910211514.5367A-100000@kam.xvi.com>



On Thu, 10 Sep 1998, Ketan Patel wrote:

> Anyone know where I can find this module?  I looked on CPAN and couldn't
> find it... I also emailed the author and received no response...
> 

It hasn't been released yet ... it's in pre-alpha ...

J.F.



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

Date: Fri, 11 Sep 1998 02:24:36 GMT
From: kherron@campus.mci.net (Kenneth Herron)
Subject: Re: Objects & type checking
Message-Id: <ER%J1.2$mr.118019@pull-feed.internetmci.com>

In article <m3zpc7hnge.fsf@satch.markl.com>,
Mark Lehrer  <mark@satch.markl.com> wrote:
|That is not what I'm saying; I'm saying that I want to use the same
|method name with different argument types, without having to make an
|if statement to see what type of object each argument is.

As others have said, this is generally done by having the method
examine its arguments.  If you're thinking that it's bad to have to
code this yourself instead of letting the compiler do this for you,
remember that (a) perl isn't strongly typed, so perl wouldn't have much
to go on, and (b) perl is interpreted, so it's all runtime anyway.

If you want to make it cleaner, consider the magical form of goto:

	sub new {

		if (@_ == 3) {
			goto &new_3;
		}
		elsif (@_ == 2) {
			goto &new_2;
		}
		else {
			die "usage: ...";
		}
	}

	sub new_2 {
		my($type) = shift;
		my($arg) = shift;

		...
	}

This is the constructor from something I'm working on.  Based on one
of the arguments, it loads an appropriate subclass module, then
constructs and returns an object in that module's class.

	sub _initialize($) { die "${_[0]} base class initializer called" }

	sub new ($$) {
		my($self) = shift;
		my($product) = shift;

		my($type) = ref($self) || $self;
		$type .= '::' . $product;
		unless (eval "require $type") {
			warn $@;
			return undef;
		}

		my($obj) = {
			PROD => $product,
		};
		bless $obj, $type;
		$obj->_initialize();
		return $obj;
	}
-- 
Kenneth Herron -- kherron@campus.mci.net
"When Microsoft first took control of the Funk & Wagnalls Encyclopedia
product, there was a flattering biography of Bill Gates.  But it said he
was known as a tough competitor.  Now it says that he's known for his
charitable contributions." -- Gary Reback, <http://www.ljx.com/reback/>


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

Date: Fri, 11 Sep 1998 02:44:26 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Passing file handles
Message-Id: <e80K1.4$VN3.16912@nsw.nnrp.telstra.net>

In article <slrn6vgma7.4h.alastair@calliope.demon.co.uk>,
	alastair@calliope.demon.co.uk (Alastair) writes:

>>perldoc -q filehandle
> 
> That doesn't work for me - has perldoc been updated for 5.005?

yes.
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 75% of the people make up 3/4 of the
Commercial Dynamics Pty. Ltd.       | population.
NSW, Australia                      | 


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

Date: Thu, 10 Sep 1998 21:44:32 -0500
From: elaine ashton <elaine@cts.wustl.edu>
To: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <Pine.SOL.3.96.980910213954.22211B-100000@helen.cts.wustl.edu>

> No, my point is that Python and Perl are roughly identical in
> functionality but that Python produces some of the easiest to maintain
> and extend code on earth while Perl is its polar opposite--some of the
> hardest to maintain and extend code on earth.

Ok, I can't resist this any more. Define the above. What do you really
mean by extending and maintaining code? I'm no Python devotee' and I don't
really see it being that much more brilliant than Perl. In fact,
maintainabilty and extendibilty largely depend on the programmer. The
human that writes the code. I fail to see the language argument here.
Convince me.

e.



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

Date: 10 Sep 1998 20:17:55 PDT
From: Patricia Shanahan <pats@acm.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <35F89612.DD1971ED@acm.org>

There's a lot more to it than whether people like to use the language.
Consider the momentum issue. In reading this thread I thought about
whether I would switch to python from perl for my text processing
scripts, *assuming all that is being claimed for python technically
were true*. I wouldn't.

The problem is that the scripts have to be easy to run and maintain in
an environment where everyone uses common application distribution
directories with perl, but not python, already installed, and large
numbers of people can read and write perl, but not python.

Patricia

Brian Wheeler wrote:
> 
> In article <6t9bkt$r8o$1@nnrp1.dejanews.com>,
>         bitnut1@my-dejanews.com writes:
> >
> >>------------------------------------
> >> George Reese <borg@imaginary.com>:
> >> Perl has no real use.  If you have to do scripting or text processing,
> >> use Python.  Otherwise, use Java.
> >>------------------------------------
> >
> > I hate to throw cold water on both Perl and Python camps but there are
> > interpreters that are: 1. Intrinsically better (meaning: can accomplish
> > similar tasks without the noise and illogical constructs that plague Perl and
> > Python); and 2. ANSI standard (or soon to be).
> 
>         And these interpreters are?
> 
> >
> > Perl and Python will end up in the dustbin sooner or later and
> > no amount of your kicking and screaming is going to save them.
> 
>         Funny, because people were saying that about COBOL...and its *still*
> here being used.  Languages live or die depending on if the users *like* to
> use the language...standardization and 'illogical constructs' are a secondary
> goal.
> 
> Brian Wheeler
> bdwheele@indiana.edu
> 
>


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

Date: Fri, 11 Sep 1998 03:55:23 GMT
From: bitnut1@my-dejanews.com
Subject: Re: Perl & Java - differences and uses
Message-Id: <6ta6vb$3k9$1@nnrp1.dejanews.com>



There is an order of magnitude in difference between dimly defined
"languages" with only one implementation and thousands of programmers
(such as Perl and Python),
and well-defined languages implemented by everyone-and-his-sister
and used by millions of programmers.

Those hoping that their fervent support will some day turn their
favorite lingo into a truly popular (read: standard) language
should reread the above paragraph and think about the other
requirements.

B.

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


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

Date: Fri, 11 Sep 1998 05:00:07 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <r72K1.831$E9.2786827@ptah.visi.com>

In comp.lang.java.programmer elaine ashton <elaine@cts.wustl.edu> wrote:
:> No, my point is that Python and Perl are roughly identical in
:> functionality but that Python produces some of the easiest to maintain
:> and extend code on earth while Perl is its polar opposite--some of the
:> hardest to maintain and extend code on earth.

: Ok, I can't resist this any more. Define the above. What do you really
: mean by extending and maintaining code? I'm no Python devotee' and I don't
: really see it being that much more brilliant than Perl. In fact,
: maintainabilty and extendibilty largely depend on the programmer. The
: human that writes the code. I fail to see the language argument here.
: Convince me.

Maintainability is the ease of fixing bugs and evolving code as the
concepts that code supports change and technology advances.  It is
also the ease with which someone who did not write the original code
can come in, understand that code, and make the required changes.

Extensibility is turning the code into something it was not originally
designed for.  The ease with which it interoperates with other
systems.

Python's power in these respects derives from its clean syntax and
well-defined OO paradigm--two things Perl simply does not have.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Thu, 10 Sep 1998 23:08:50 -0300
From: mardel <diretor@mercosulsearch.com.br>
Subject: Perl 5.0 in Windows NT Server 4.0?
Message-Id: <35F88632.A1BBEA35@mercosulsearch.com.br>

Dear sir,

I am having problems in put the Perl in my Windows Nt Server 4.0.
I have the Perl in my Windows 95. I use the Front Page and
configured the Perl in the directory cgi-bin. I use the instruction
"winscriptalias" in the file "srm.cnf". With this instruction the Perl
function well.
    But I need to do the Perl run in the Windows Nt 4.0. I am
using de IIS 4.0.? What Must I do?

    Mardel Cardoso
    http://www.mercosulsearch.com.br/inter/curric.htm
    guia@tba.com.br



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

Date: Thu, 10 Sep 1998 23:11:59 -0300
From: mardel <diretor@mercosulsearch.com.br>
Subject: Perl 5.0 in Windows NT Server 4.0?
Message-Id: <35F886EE.5B2A2BB@mercosulsearch.com.br>

Continued...

I forgot other thing! Do I need to have the Compiler Visual C++ in my machine Windows
NT? In the Windows 95 I don't used the language C. What the difference?

Mardel Cardoso
guia@tba.com.br



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

Date: 11 Sep 1998 04:44:46 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: printf,sprintf padding character
Message-Id: <6ta9ru$gn4$1@marina.cinenet.net>

Tom Christiansen (tchrist@mox.perl.com) wrote:
:  [courtesy cc of this posting sent to cited author via email]
: 
: In comp.lang.perl.misc, cberry@cinenet.net (Craig Berry) writes:
: :Doing it for an arbitrary fill character is slightly tougher, but for
: :zeroes, just put '0' before the desired width in the (s)printf format
: :string:
: :
: :  printf '%010d', 1234;
: 
: Ah, but not too much harder.  Here's how to pad that puppy with a 
: plus symbol:
: 
:     ($puppy = sprintf("%010d", 1234)) =~ s/\G0/+/g;

Or, for that matter:

  ($puppy = sprintf '%10d', 1234) =~ tr/ /+/;

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Fri, 11 Sep 1998 01:53:04 GMT
From: jeremy.graveson@adis.co.nz
Subject: problems with win32-odbc and watcom database
Message-Id: <6t9vq0$q63$1@nnrp1.dejanews.com>

I am having trouble with getting the win32-odbc package to work with our
watcom database. Briefly, the problem is that when I call "new
WIN32::ODBC($DSN)" it tells ODBC to open a connection - ODBC runs a program
called "dbclient.exe" which is a TSR program that runs in the background
doing all the ODBC stuff. The problem is not making the connection because
that works... the problem is returning from dbclient.exe - it doesn't! It
just sits there saying that the connection has been started.

I find all this out when I run the test.pl script that comes with the win32-
odbc package. The test it runs is test 3 and the code looks like this:
------------------------------------
####
#   T E S T  3
####
    PrintTest(3, "Open several ODBC connections");
    print "\n\tOpening ODBC connection for \"$DSN\"...\n\t\t";
    if (!($O = new Win32::ODBC($DSN))){
        print "Failure. \n\n";
        $Failed{'Test 3a'} = "new(): " . Win32::ODBC::Error();
        PresentErrors();
        exit();
    }else{
        print "Success (connection #", $O->Connection(), ")\n\n";
    }

    print "\tOpening ODBC connection for \"$DSN\"...\n\t\t";
    if (!($O2 = new Win32::ODBC($DSN))){
        $Failed{'Test 3b'} = "new(): " . Win32::ODBC::Error();
        print "Failure. \n\n";
    }else{
        print "Success (connection #", $O2->Connection(), ")\n\n";
    }

    print "\tOpening ODBC connection for \"$DSN\"\n\t\t";
    if (!($O3 = new Win32::ODBC($DSN))){
        $Failed{'Test 3c'} = "new(): " . Win32::ODBC::Error();
        print "Failure. \n\n";
    }else{
        print "Success (connection #", $O3->Connection(), ")\n\n";
    }
------------------------------------------

The output looks like this:
------------------------------------------
        DSN="Excel Files" ("Microsoft Excel Driver (*.xls)")
        DSN="SQL Anywhere 5.0 Sample Client" ("Sybase SQL Anywhere 5.0")
        DSN="MS Access 97 Database" ("Microsoft Access Driver (*.mdb)")


We are using the DSN:
        DSN = "rnd"
        Driver = "Sybase SQL Anywhere 5.0"


------------------  T E S T  3 Open several ODBC connections -----------------
        Open several ODBC connections

        Opening ODBC connection for "rnd"...

Watcom SQL Network Requestor Version 4.0
Copyright by Watcom International Corp. 1988-1994. All rights reserved.
Watcom is a trademark of Watcom International Corp.

Trying to start IPX link ...
    IPX link started successfully
Starting with 98 buffers of size 512 bytes
Found server rnd on IPX link
started
---------------------------------------------------------

As you can see, it actually gets to the "new WIN32::ODBC($DSN)" but it doesn't
get any further (no output of "success" or "failure").



Has anyone else come across this problem??



Thanks in advance
Jero

PS if/when you post a reply can you email me a copy as well
(jeremy.graveson@adis.co.nz). Ta

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


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

Date: Fri, 11 Sep 1998 14:46:02 +0900
From: Koo Min <kmin@netbeta.sogang.ac.kr>
Subject: Q: Suspicious "ld"'s behavior on SunOS 4.1.4 while compiling perl 5.005_02
Message-Id: <35F8B91A.DA39C188@netbeta.sogang.ac.kr>

Hi all,

Now I am trying to install perl 5.005_02 on SunOS 4.1.4, which is in
Sun's SS20
compatible machine(sun4m).  But I meet these errors continuously when I
run "make test"
after "Configure" and "make":

    :
    :
pragma/constant.....ok
pragma/locale.......ld.so: Undefined symbol: __mb_cur_max
dubious
        Test returned status 127 (wstat 32512, 0x7f00)
pragma/overload.....ok
    :
    :
lib/complex.........ok
lib/db-btree........ld.so: call to undefined procedure _dbopen from
0xef4c63c8
dubious
        Test returned status 127 (wstat 32512, 0x7f00)
lib/db-hash.........ld.so: call to undefined procedure _dbopen from
0xef4c63c8
dubious
        Test returned status 127 (wstat 32512, 0x7f00)
lib/db-recno........ld.so: call to undefined procedure _dbopen from
0xef4c63c8
dubious
        Test returned status 127 (wstat 32512, 0x7f00)
lib/dirhand.........ok
    :
    :
lib/parsewords......ok
lib/posix...........ld.so: Undefined symbol: __mb_cur_max
dubious
        Test returned status 127 (wstat 32512, 0x7f00)
lib/safe1...........ok
    :
    :

Moreover, I have similar errors when I execute some programs:

netdelta : kmin /usr/lib] xman
ld.so: warning: /usr/openwin/lib/libXt.so.4.0 has older revision than
expected 20
ld.so: warning: /usr/openwin/lib/libX11.so.4.3 has older revision than
expected 20
ld.so: Undefined symbol: _sessionShellClassRec
netdelta : kmin /usr/lib] xcalc
ld.so: warning: /usr/openwin/lib/libXt.so.4.0 has older revision than
expected 20
ld.so: warning: /usr/openwin/lib/libX11.so.4.3 has older revision than
expected 20
ld.so: Undefined symbol: _sessionShellClassRec
netdelta : kmin /usr/lib]

I've applied recommended patches from Sun(sunsolve.sun.com), but these
errors still remain...  In my opinion, there are something wrong with
"ld" or
"ld.so" but I cannot figure them out.  Please let me know useful
information
for these errors. Thank you.

Koo Min
kmin@netbeta.sogang.ac.kr

P.S. I compiled perl 5.004_04, but the same problems occured.



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

Date: Fri, 11 Sep 1998 03:29:25 GMT
From: charles@ix.netcom.com (charles lin)
Subject: Question about Perl/mysql
Message-Id: <35f998ea.11444601@NNTP.ix.netcom.com>

Hi,

I am studing how to use Perl with mysql. But I keep getting the
following error message:

Can't call method "do" without a package or object reference at ...

Can anyone explain to me what happened?

The code is like:

use DBD::mysql;
$db = 'db';
$dbh = DBI->connect("DBI:mysql:$db"); 
$rc = $dbh->do("create table .....


Thanks in advance.

charles,



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

Date: Fri, 11 Sep 1998 04:21:33 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Question about Perl/mysql
Message-Id: <6ta8g5$t18@flatland.dimensional.com>

charles@ix.netcom.com (charles lin) writes:

> I am studing how to use Perl with mysql. But I keep getting the
> following error message:
>
> Can't call method "do" without a package or object reference at ...
>
> Can anyone explain to me what happened?
>
> The code is like:
>
> use DBD::mysql;
> $db = 'db';
> $dbh = DBI->connect("DBI:mysql:$db"); 
> $rc = $dbh->do("create table .....

You're not checking the value returned by DBI->connect.  See the
DBI documentation for how to print the result of a failed connection.

-- 
Michael Fuhr
http://www.fuhr.net/~mfuhr/


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

Date: Thu, 10 Sep 1998 22:07:24 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <1df5ue8.1pcp8wt18mq8sbN@bay2-509.quincy.ziplink.net>

Patrick Timmins <ptimmins@netserv.unmc.edu> wrote:

> > Anyone who thinks this was a joke needs to pay more attention to From:
>                          ^^^
>                          !!!
> Hey! You left off the n't! (or should I say NT?). Or are you just
> "one-upping" me in public again! :) <-(necessary smiley, apparently:)

Oops, you're right, I did leave off the n't.  I think I originally wrote
"Anyone who thinks this was serious...", changed it to "...a joke", and
forgot to add the negation.  Sorry about that!

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 11 Sep 1998 03:00:26 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: Mark Lehrer <mark@satch.markl.com>
Subject: Re: Returning objects?  Is it possible?
Message-Id: <m3lnnrzcnp.fsf@joshua.panix.com>

Mark Lehrer <mark@satch.markl.com> writes:

>     return new square();

> $foo=pick_shape("square");

> print STDOUT $foo->area();

> Can't call method "area" without a package or object reference at
> ./test.pl line 11.

Is square::new() returning a blessed reference?

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


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

Date: Thu, 10 Sep 1998 20:14:45 -0500
From: "Ron Bieber" <rcbieber@ameritech.net>
Subject: Re: SPSS Gateways in PERL
Message-Id: <MV_J1.1091$2R.3100095@nntp0.chicago.il.ameritech.net>

What version, and what operating system?

Danny J. Sohier wrote in message <35F839E2.6F55E8E1@spiff.bibl.ulaval.ca>...
>Hi folks,
>
>Does anyone know where I could find
>gateways to SPSS scripted in PERL ?
>
>Thanks for any advice
>
>Danny J. Sohier
>dsohier@bibl.ulaval.ca
>




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

Date: Fri, 11 Sep 1998 01:45:56 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: SPSS Gateways in PERL
Message-Id: <35F87E76.E19C7EDB@bbnplanet.com>

> Does anyone know where I could find
> gateways to SPSS scripted in PERL ?

Having been in academia for a while and painfully aware of SPSS I would
beg the question what you mean by 'gateway'? Loathsome, yet useful, an
application. I did a lot of tricks with it. Please post or mail more
detail.

e.


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

Date: Thu, 10 Sep 1998 19:40:00 -0700
From: Murali Chari <mchari@cisco.com>
Subject: Thanks for your responses to my CGI/Fork Question..
Message-Id: <35F88D80.D7854D34@cisco.com>

All,

I am sorry I couldn't reply to everybody who provided a solution.
One of the answers put me on the right track. And my program
works like a charm now. :-)

I am presenting my original question followed by what worked for me.

My original question was:

>
> Hi,
>
> I desparately need help with this procedure. The goal of the script is

> to execute a script in the background (since
> this script takes 5 hours to finish) and return control to the
browser.
> (I am using a Netscape 4.x brwser, An Apache
> server, Perl 5.004, Solaris 2.6 Platform)
>
> This is the script I am trying to execute.
>
> #!/usr/local/bin/perl5 -T
>
> if ($pid=fork)
> {
>     print <<EOF;
> Content-type: text/plain
>
> This job will take 5 hours to get done.  you will be notified through
> mail once it is done.
>
> }
> else {
>                exec("somescript.pl 2>&1 > logfile")
>                exit(0);
> }
>
> exit(0);
>
> What's happening is the browser just hangs. The script though is
getting
> executed in the background
> and running smoothly. It finishes its job and sends a mail saying the
> job is done and all that.
>
> What should I do in the above case to return control to the browser
from
> the parent process?

What worked for me was

 #!/usr/local/bin/perl5 -T

 if ($pid=fork)
 {
  print <<EOF;
 Content-type: text/plain

 This job will take 5 hours to get done.  you will be notified through

mail once it is done.
 EOF
close(STDOUT);
 }
 else {
                close(STDOUT);
                exec("somescript.pl 2>&1 > logfile")
}

 exit(0);

Basically both the pipes to STDOUT need to be closed.

Thanks Everybody.

Murali



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

Date: Thu, 10 Sep 1998 22:50:38 -0400
From: Greg Marton <gremio@Glue.umd.edu>
Subject: turning perlpod into man documentation
Message-Id: <Pine.GSO.3.95q.980910224338.7663A-100000@latte.eng.umd.edu>

I have a little perl utility I wrote, and I wrote some pod to go along
with it.  When I do "pod2man myscript | nroff -man | more" I get a roughly
man-like and fairly decent documentation.  I have two questions: 

1) how do I go about making it so that I can type "man myscript" and this 
   documentation would come up?  (likewise, how would I go about
   distributing the script with this man documentation?)

2) how do you underline your key words, like parameters, so they stand
   out, as in other man pages?

Please reply by mail.  I will post a digest to the group.

Thanks tons in advance,
Gremio

--
p   |\      _,,,---,,_       Gregory A. Marton    Santirix Gremionis
u   /,`.-'`'    -.  ;-;;,_   http://www.glue.umd.edu/~gremio  
r  |,4-  ) )-,_..;\ (  `'-'  Take thyself, ne'er thy craft, lightly!
r '---''(_/--'  `-'\_)       Not representing Info Tech or U of MD.



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

Date: Fri, 11 Sep 1998 01:41:20 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: What is Robot in Perl?
Message-Id: <35F87D62.4D554BF@bbnplanet.com>

James Bond 098 wrote:
> 
> "Robot", i've encountered this word many time in Perl, what does it's
> means. etc. Robot Rules .... something like that!

print "Danger Will Robinson, Danger! Danger!\n";

Think of something more useful to use Perl with. There is a reason the
irc admins bounce people with 'Bots'. They are usually automated little
annoying programs that do nothing but add to the wasteland of irc
bandwidth. I nuke little co-ed engineering jerky-boys with glee when I
see 'bots'. Why not write your own irc client with Perl or something
challenging? 

e.


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

Date: Thu, 10 Sep 1998 23:03:49 -0600
From: Matt Hughes <mhughe@acs.ucalgary.ca>
Subject: While loop with regex as condition?
Message-Id: <6tab3s$sp2@ds2.acs.ucalgary.ca>

Can you use a regular expression as the condition for a while loop?

Code Snip:
  while (/((\S+)\((\S+)\))/) {
      $str = $1;
      $page = $2;
      $sec = $3;
      $page =~ s/\S\010//g;
      $sec =~ s/\S\010//g;
      s/\Q$str/<A
HREF="$script\?manpage=$page&section=$sec">$page($sec)<\/A>/g;
  }

    This snippet is from a man  page to HTML converter on a linux box.
The input is formatted by nroff, and most of the script converts it to
html. This looks for words that are imediatly followed by parentesis
with a number indicating the section the man page is in. Ex. gcc(1). It
converts this to a hyperlink. If the while is replaced with an if, only
the first such pattern is matched and made into a hyperlink, but it does
work. The while produced no output at all. Note that the line is printed
a little later in the program.

    Thanks in advance for the help!

Matt Hughes
mhughe@ucalgary.ca


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

Date: Thu, 10 Sep 1998 22:35:35 -0600
From: Matt Hughes <mhughe@acs.ucalgary.ca>
Subject: While loop with regex as condition?
Message-Id: <6tab2u$sp2@ds2.acs.ucalgary.ca>



    Can you use a regular expression as the condition for a while loop?

Code Snip:
  while (/((\S+)\((\S+)\))/) {
      $str = $1;
      $page = $2;
      $sec = $3;
      $page =~ s/\S\010//g;
      $sec =~ s/\S\010//g;
      s/\Q$str/<A
HREF="$script\?manpage=$page&section=$sec">$page($sec)<\/A>/g;
  }

    This snippet is from a man  page to HTML converter on a linux box.
The input is formatted by nroff, and most of the script converts it to
html. This looks for words that are imediatly followed by parentesis
with a number indicating the section the man page is in. Ex. gcc(1). It
converts this to a hyperlink. If the while is replaced with an if, only
the first such pattern is matched and made into a hyperlink, but it does
work. The while produced no output at all. Note that the line is printed
a little later in the program.

    Thanks in advance for the help!

Matt Hughes
mhughe@ucalgary.ca





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

Date: Thu, 10 Sep 1998 21:28:09 -0400
From: "Mark E. Crane" <mecran01@homer.louisville.edu>
Subject: wtb: Perl 5 for dummies (used)
Message-Id: <Pine.HPP.3.95.980910212729.27947A-100000@homer.louisville.edu>

Anyone outgrown their copy and would like to sell it?

thanks,

Mark Crane


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

Never let anything go to waste.  Be prudent, save everything, and what you
get more than you can take care of yourselves, ask your neighbors to help
you consume.  --Brigham Young (DBY 292).



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

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

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