[9015] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2632 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 18 18:08:29 1998

Date: Mon, 18 May 98 15:00:31 -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           Mon, 18 May 1998     Volume: 8 Number: 2632

Today's topics:
    Re: Authentication?? (brian d foy)
    Re: can't find uninitialized value after while block, c <suthsc@ncs.com>
    Re: can't find uninitialized value after while block, c <rootbeer@teleport.com>
    Re: CGI-Publishing-Scripts (brian d foy)
        CGI::Apache Problems (Joonas Timo Taavetti Kekoni)
        DBD:Oracle: Bad free() ignored during global destructio (Todd Hivnor)
    Re: Does Perl have a IDE?I don't like command line. (Clinton Pierce)
    Re: Does Perl have a IDE?I don't like command line. (Abigail)
    Re: Does Perl have a IDE?I don't like command line. (Abigail)
        Embeding Perl into a VC++ V5.0 <TFL@Panduit.com>
    Re: file size with perl and win NT <jim_lawhon@pagenet.com>
    Re: How do I get STDOUT back? (Mark666769)
        I can't store a reference in a key of hash! <david.x.corcoran@boeing.com>
    Re: I can't store a reference in a key of hash! <rbskipper@wimberley-tx.com>
    Re: I can't store a reference in a key of hash! <rootbeer@teleport.com>
    Re: I can't store a reference in a key of hash! <Jan@McCann.cz>
    Re: Is if ($a="something") a bad style? (John Moreno)
    Re: Perl/Wall lingo question (Wayne C. McCullough)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 18 May 1998 16:09:14 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Authentication??
Message-Id: <comdog-ya02408000R1805981609140001@news.panix.com>
Keywords: from just another new york perl hacker

[followups set]

In article <35608B06.6C6C474D@Compuserve.com>, Mark Sage <Mark_Sage@Compuserve.com> posted:

>I am trying to get a PERL program to display a user/password dialog, and
>then process the input.  I can make the dialog display by sending a
>"HTTP/1.0 404 Not Authorized", but no matter what I do I cannot get
>anything returned.
>
>Is this possible, can I do it with PERL, does anyone have an example?

it's a protocal thingy, not a Perl thingy, so further discussion 
belongs somewhere else.

you want

    HTTP/1.0 401 Not Authorized

see the HTTP specification for details.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>


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

Date: 18 May 1998 14:54:47 -0500
From: Scott Sutherland <suthsc@ncs.com>
Subject: Re: can't find uninitialized value after while block, causing warning
Message-Id: <uu36n1hiw.fsf@ncs.com>

Tom Phoenix <rootbeer@teleport.com> writes:

> On 18 May 1998, Scott Sutherland wrote:
> 
> Okay; either there's no key of '_debug' in that hash, or there is a key,
> but the value is undef.

The odd thing is that the warning moves to the next line after the
while regardless of what the line is... how about the following?

--- begin ---
D:\usr\src\Gbes>perl -d extract.pl -a app1 -U <username> -P <password> -S <server>

Loading DB routines from perl5db.pl version 1.01
Emacs support available.

Enter h or `h h' for help.

main::(extract.pl:9):   require 5.004;
  DB<1> b GBES::Physical::Database::new
  DB<2> b GBES::Physical::Database::execProcedure
  DB<3> c

[Mon May 18 14:14:09 1998][main][191]: starting extract
GBES::Physical::Database::new(GBES/Physical/Database.pm:53):
53:       my $proto = shift;
  DB<3> n
GBES::Physical::Database::new(GBES/Physical/Database.pm:54):
54:       my %parms = @_;
  DB<3>
GBES::Physical::Database::new(GBES/Physical/Database.pm:55):
55:       my $class = ref($proto) || $proto;
  DB<3>
GBES::Physical::Database::new(GBES/Physical/Database.pm:56):
56:       my $self = undef;
  DB<3>
GBES::Physical::Database::new(GBES/Physical/Database.pm:58):
58:       $self = $proto->SUPER::instance();
  DB<3>
GBES::Physical::Database::new(GBES/Physical/Database.pm:60):
60:       $self->{'_debug'} = $parms{'debug'} || 0;
  DB<3> x \$self
0  SCALAR(0xc5735c)
   -> GBES::Physical::Database=HASH(0xcabb60)
        empty hash
  DB<4>
GBES::Physical::Database::new(GBES/Physical/Database.pm:61):
61:       $self->{'_database'} = $parms{'database'} || 'Imagedb';
  DB<4> x \$self
0  SCALAR(0xc5735c)
   -> GBES::Physical::Database=HASH(0xcabb60)
      '_debug' => 0
  DB<5> c
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:250):
250:      my $self = shift;
  DB<5> n
[variable initialization deleted]
[database open deleted]
[ct_command deleted]
[ct_param deleted]
  DB<5>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:333):
333:      $rc = $dbh->ct_send;
  DB<5>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:334):
334:      if ($rc != CS_SUCCEED) {
  DB<5>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:368):
368:      main::message('Database', 'this is crazy!');
  DB<5>
Use of uninitialized value at d:\win32app\perl5.004\lib/perl5db.pl line 1134,
        <IN> chunk 38 (#1)

    (W) An undefined value was used as if it were already defined.  It was
    interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
    warning assign an initial value to your variables.

Use of uninitialized value at d:\win32app\perl5.004\lib/perl5db.pl line 1134, <I
N> chunk 38.
        diagnostics::warn_trap('Use of uninitialized value at d:\win32app\perl5.
004\lib/perl5db....') called at d:\win32app\perl5.004\lib/perl5db.pl line 1134
        GBES::Physical::Database::execProcedure('GBES::Physical::Database=HASH(0
xcabb60)', 'sp_GetAppInformation', 'HASH(0xcaa6c0)') called at GBES/Physical/Dat
abase.pm line 484
        GBES::Physical::Database::execGetAppInfo('GBES::Physical::Database=HASH(
0xcabb60)', 1) called at GBES/Physical/App.pm line 138
        GBES::Physical::App::Read('GBES::Physical::App=HASH(0xcab834)', 1) calle
d at GBES/Logical/App.pm line 167
        GBES::Logical::App::_read('GBES::Logical::App=HASH(0xcaa7dc)') called at
 GBES/ViewFactory.pm line 177
        GBES::ViewFactory::_generate_app('GBES::ViewFactory=HASH(0xcaa5a0)', 'Ap
pID', 'app1', 'debug', 0) called at GBES/ViewFactory.pm line 109
        GBES::ViewFactory::createView('GBES::ViewFactory=HASH(0xcaa5a0)', 'Key',
 'app1', 'debug', 0) called at extract.pl line 123
        main::main() called at (eval 12) line 1
        Benchmark::__ANON__ called at d:\win32app\perl5.004\lib/Benchmark.pm lin
e 306
        Benchmark::runloop(1, '&main()') called at d:\win32app\perl5.004\lib/Ben
chmark.pm line 328
        Benchmark::timeit(1, '&main()') called at extract.pl line 43
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:340):
340:            if ($self->{'_debug'}) {
  DB<5>
--- end ---

IMH(umble)O, the problem seems to be with the while call condition...

  while ($dbh->ct_results($restype) == CS_SUCCEED) {
           ^       ^         ^             ^
           |       |         |             +-- a const function
           |       |         |                 (autoloaded, i think)
           |       |         +-- first use, set to undef when defined
           |       |             and the call to ct_results sets this
           |       +-- Sybperl function call which gets the type of
           |           the result set to be fetched.
           +-- a valid Sybase::CTlib object... 

I would really like this warning to go away... it shows up in a
results window of a GUI app and will not be easy to explain...

In attempting to figure out what is going on, I created the following
test condition:

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

use strict;
use diagnostics;

print main();

sub main {
  my $stuff = [
			   {
				'first' => 1,
				'second' => 2
			   },
			   {
				'third' => 3,
				'fourth' => 4
			   }
			  ];
  
  my $var = undef;
  
  while (@$stuff) {
	my $hashref = pop(@$stuff);
	foreach (keys(%$hashref)) {
	  print "$_ : " . $hashref->{$_} . "\n";
	}
	$var = 10;
  }
  
  if ($var) {
	print "This is crazy\n";
  }
  return $var;
}

__END__
--- end ---

it reports no error, although the execution follows the same pattern
(in the debuger) of looking at the line after the while before
execution of the while block... 

any further help ESPECIALLY appriciated =)

Scott

-- 
Scott Sutherland                          National Computer Systems
(319) 354-9200                        Measurement Services Division
<mailto:sut92199@ncs.com>                             Iowa City, Ia
#include "standard-disclaimer.h"


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

Date: Mon, 18 May 1998 21:17:19 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Scott Sutherland <suthsc@ncs.com>
Subject: Re: can't find uninitialized value after while block, causing warning
Message-Id: <Pine.GSO.3.96.980518141400.28732j-100000@user2.teleport.com>

On 18 May 1998, Scott Sutherland wrote:

> The odd thing is that the warning moves to the next line after the
> while regardless of what the line is... 

That's not so odd as all that. :-)  It's normal for the debugger to tell
you that the "next" line to execute is not what you or I would think is
the next line. This does not cause the uninitialized value you're seeing
in any way.

Hope this helps!

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



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

Date: Mon, 18 May 1998 16:12:09 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: CGI-Publishing-Scripts
Message-Id: <comdog-ya02408000R1805981612090001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6jpdqc$3vp$1@nnrp1.dejanews.com>, guelkev@de.polygram.com posted:

>I'm looking for Perl-CGI-Scripts which give the user simple and easy to use
>serverbased Web-Publishing-Tool. I should be easy and serverbased, so that the
>Client didn't need Java. A way to upload, download, delete, copy and move
>should be enough.

sounds like FTP.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>


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

Date: 18 May 1998 21:29:51 GMT
From: jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni)
Subject: CGI::Apache Problems
Message-Id: <6jq98f$cm9$1@hiekkalaatikko.cs.hut.fi>

What do i Need to have to use CGI::Apache?

CGI::Apache 
	fails on line 2 of Apache.pm
	where the computer tries
use Apache();
	I don't have any Apache.pl, (or is it something else??)
	Where can I get one? 

	Has CGI::Apache been replaced by some other module?

	I have tried to install Apache's mod_perl, 
	but lacking apache source code that doen't
	install. Do i need install IT or something totally different?

	Can i download separate source code(like the source rpm), 
	or do i need to install Apache from source? 

	Previous attepmts to get apache compiled and working have 
	Failed.

	The man page doesn't talk about dependencies. Only reference
	is man 3 Apache , that i also doent have.

	Do i need some special version on Apache? I currently have 1.2.4(-4)
	(-4 is the verion of rpm build)
	Is 1.3 required?

	Does the script become much faster using CGI::Apache compared
	to CGI.pm or no lib at all?

	Is it possible to make script that check's the existance
	of Apache and uses apache's native api, if one is present
	and CGI otherwise.

*****************************
test using perl -d

DB<1> use CGI::Apache;
Can't locate Apache.pm in @INC (@INC contains:
/usr/lib/perl5/i386-linux/5.00401 /usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at
/usr/lib/perl5/CGI/Apache.pm line 2, <IN> chunk 2.
BEGIN failed--compilation aborted at /usr/lib/perl5/CGI/Apache.pm line 2,
<IN> chunk 2.
BEGIN failed--compilation aborted at (eval 5) line 2, <IN> chunk 2.
DB<2> use CGI::Apache;
	#(doen't complain anymore)
******************

[jkekoni@aurora mod_perl-1.11]$ rpm -qi apache
Name        : apache                      Distribution: Hurricane
Version     : 1.2.4                             Vendor: Red Hat Software
Release     : 4                             Build Date: Thu Nov  6 16:20:06
1997
Install date: Fri Dec  5 08:50:10 1997   Build Host: porky.redhat.com
Group       : Networking/Daemons            Source RPM:
apache-1.2.4-4.src.rpm
Size        : 1102925
Packager    : Red Hat Software <bugs@redhat.com>
Summary     : Leading World Wide Web server
Description :
Apache is a full featured web server that is freely available, and also
happens to be the most widely used.
******************************
My computer in Redhat Linux 5.0
with 2.0.33 kernel 
***********files in current apache install::
[jkekoni@aurora perl]$ rpm -ql apache 
/etc/httpd/conf/access.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/srm.conf
/etc/logrotate.d/apache
/etc/rc.d/init.d/httpd
/etc/rc.d/rc0.d/K15httpd
/etc/rc.d/rc1.d/K15httpd
/etc/rc.d/rc2.d/K15httpd
/etc/rc.d/rc3.d/S85httpd
/etc/rc.d/rc5.d/S85httpd
/etc/rc.d/rc6.d/K15httpd
/home/httpd
/home/httpd/cgi-bin
/home/httpd/html
/home/httpd/html/apache_pb.gif
/home/httpd/html/index.html
/home/httpd/html/manual
/home/httpd/html/manual/LICENSE
/home/httpd/html/manual/TODO
/home/httpd/html/manual/bind.html
/home/httpd/html/manual/cgi_path.html
/home/httpd/html/manual/content-negotiation.html
/home/httpd/html/manual/custom-error.html
/home/httpd/html/manual/dns-caveats.html
/home/httpd/html/manual/env.html
/home/httpd/html/manual/footer.html
/home/httpd/html/manual/handler.html
/home/httpd/html/manual/header.html
/home/httpd/html/manual/host.html
/home/httpd/html/manual/images
/home/httpd/html/manual/images/home.gif
/home/httpd/html/manual/images/index.gif
/home/httpd/html/manual/images/sub.gif
/home/httpd/html/manual/index.html
/home/httpd/html/manual/install.html
/home/httpd/html/manual/install_1_1.html
/home/httpd/html/manual/invoking.html
/home/httpd/html/manual/keepalive.html
/home/httpd/html/manual/location.html
/home/httpd/html/manual/man-template.html
/home/httpd/html/manual/misc
/home/httpd/html/manual/misc/API.html
/home/httpd/html/manual/misc/FAQ.html
/home/httpd/html/manual/misc/client_block_api.html
/home/httpd/html/manual/misc/compat_notes.html
/home/httpd/html/manual/misc/descriptors.html
/home/httpd/html/manual/misc/fin_wait_2.html
/home/httpd/html/manual/misc/footer.html
/home/httpd/html/manual/misc/header.html
/home/httpd/html/manual/misc/howto.html
/home/httpd/html/manual/misc/index.html
/home/httpd/html/manual/misc/known_bugs.html
/home/httpd/html/manual/misc/known_client_problems.html
/home/httpd/html/manual/misc/nopgp.html
/home/httpd/html/manual/misc/perf-bsd44.html
/home/httpd/html/manual/misc/perf-dec.html
/home/httpd/html/manual/misc/perf.html
/home/httpd/html/manual/misc/security_tips.html
/home/httpd/html/manual/misc/vif-info.html
/home/httpd/html/manual/misc/windoz_keepalive.html
/home/httpd/html/manual/mod
/home/httpd/html/manual/mod/core.html
/home/httpd/html/manual/mod/directives.html
/home/httpd/html/manual/mod/footer.html
/home/httpd/html/manual/mod/header.html
/home/httpd/html/manual/mod/index.html
/home/httpd/html/manual/mod/mod_access.html
/home/httpd/html/manual/mod/mod_actions.html
/home/httpd/html/manual/mod/mod_alias.html
/home/httpd/html/manual/mod/mod_asis.html
/home/httpd/html/manual/mod/mod_auth.html
/home/httpd/html/manual/mod/mod_auth_anon.html
/home/httpd/html/manual/mod/mod_auth_db.html
/home/httpd/html/manual/mod/mod_auth_dbm.html
/home/httpd/html/manual/mod/mod_auth_msql.html
/home/httpd/html/manual/mod/mod_browser.html
/home/httpd/html/manual/mod/mod_cern_meta.html
/home/httpd/html/manual/mod/mod_cgi.html
/home/httpd/html/manual/mod/mod_cookies.html
/home/httpd/html/manual/mod/mod_digest.html
/home/httpd/html/manual/mod/mod_dir.html
/home/httpd/html/manual/mod/mod_dld.html
/home/httpd/html/manual/mod/mod_env.html
/home/httpd/html/manual/mod/mod_example.html
/home/httpd/html/manual/mod/mod_expires.html
/home/httpd/html/manual/mod/mod_headers.html
/home/httpd/html/manual/mod/mod_imap.html
/home/httpd/html/manual/mod/mod_include.html
/home/httpd/html/manual/mod/mod_info.html
/home/httpd/html/manual/mod/mod_log_agent.html
/home/httpd/html/manual/mod/mod_log_common.html
/home/httpd/html/manual/mod/mod_log_config.html
/home/httpd/html/manual/mod/mod_log_referer.html
/home/httpd/html/manual/mod/mod_mime.html
/home/httpd/html/manual/mod/mod_negotiation.html
/home/httpd/html/manual/mod/mod_proxy.html
/home/httpd/html/manual/mod/mod_rewrite.html
/home/httpd/html/manual/mod/mod_status.html
/home/httpd/html/manual/mod/mod_userdir.html
/home/httpd/html/manual/mod/mod_usertrack.html
/home/httpd/html/manual/multilogs.html
/home/httpd/html/manual/new_features_1_0.html
/home/httpd/html/manual/new_features_1_1.html
/home/httpd/html/manual/new_features_1_2.html
/home/httpd/html/manual/process-model.html
/home/httpd/html/manual/stopping.html
/home/httpd/html/manual/suexec.html
/home/httpd/html/manual/unixware.html
/home/httpd/html/manual/vhosts-in-depth.html
/home/httpd/html/manual/virtual-host.html
/home/httpd/html/poweredby.gif
/home/httpd/icons
/home/httpd/icons/README
/home/httpd/icons/a.gif
#icons deleted to make list shorter
/home/httpd/icons/world2.gif
/usr/man/man8/httpd.8
/usr/sbin/dbmmanage
/usr/sbin/htdigest
/usr/sbin/htpasswd
/usr/sbin/httpd
/var/log/httpd
[jkekoni@aurora perl]$ 


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

Date: 18 May 1998 17:26:54 -0400
From: hivnor@shore.net (Todd Hivnor)
Subject: DBD:Oracle: Bad free() ignored during global destruction
Message-Id: <6jq92u$258@shell2.shore.net>

  I'm trying to connect to Oracle 7.3 via Perl on Solaris. 

  Versions are: Perl 5.003, SunOS 5.5.1, Oracle WG73, DBI 0.84, 
DBD:Oracle 1.45.

I always get the following error:

  Database handle destroyed without explicit disconnect.
  Bad free() ignored during global destruction. 

I searched the through old comp.lang.perl articles, 
and found several mentions of this error. It apparently
has something to do with a malloc() bug in Oracle. 

But the messages weren't too helpful. Someone recommended:

"With modern Perl's you can define the env var PERL_BADFREE to 0 to
silence the warning", 

so I tried:

$ENV{PERL_BADFREE} = 0;  

but this didn't help. They also recommended:
"reconfigure to not use perl's malloc"

I'm not sure how to do this, I'm guessing I'd need to 
recompile Perl with some flag or other. But in my
case, my Perl is hosted at a commercial ISP, so it
is non-trivial to get Perl recompiled. 

 * Can I just ignore the warning? Simple queries seem to work fine. 
  I'm worried that I'm somehow thrashing my memory.

 * Is there are way to fix this problem without recompiling Perl?

 * If I do need to recompile Perl, what is the process?

 * Is there some documentation somewhere, that I can point 
my ISP to, to document the problem and why it requires a 
recompile?


Todd Hivnor
hivnor . shore . net





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

Date: 18 May 1998 20:09:16 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jq4hc$2503@eccws1.dearborn.ford.com>

In article <356089D8.994B7F09@gamespot.com>,
	Jon Drukman <jsd@gamespot.com> writes:
>Abigail wrote:
>> ++ there are prebuilt packages you can download.  your original statement:
>> ++ "if you want one [c compiler], you have to pay" is false.
>> 
>> That is ``[native c compiler]''. And that's still true.
>
>why is the distinction between c compiler and native c compiler useful
>or important?  in what way will downloading gcc limit you on solaris vs
>what you would be able to do if you bought SUNpro?

Because I can ship production software to plants and not incur the wrath
of Ford Management if it's compiled under the Native C Compiler.  If people
die because the C-Compiler screwed up, it's hard to sue GNU--Sun 
Microsystems is another matter.

-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: 18 May 1998 21:26:29 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jq925$lp7$2@client2.news.psi.net>

Jon Drukman (jsd@gamespot.com) wrote on MDCCXXI September MCMXCIII in
<URL: news:356089D8.994B7F09@gamespot.com>:
++ Abigail wrote:
++ > ++ there are prebuilt packages you can download.  your original statement:
++ > ++ "if you want one [c compiler], you have to pay" is false.
++ > 
++ > That is ``[native c compiler]''. And that's still true.
++ 
++ why is the distinction between c compiler and native c compiler useful
++ or important? 


I don't know. *I* didn't bring it up. People were argueing that NT was
bad because it didn't came with a free native compiler.  All I did was
pointing out that at least one Unix has the same problem.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: 18 May 1998 21:38:40 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jq9p0$bh3$1@client3.news.psi.net>

Leslie Mikesell (les@MCS.COM) wrote on MDCCXXI September MCMXCIII in
<URL: news:6jpv3j$qfn$1@Mars.mcs.net>:
++ In article <6jpivg$4gb$1@client3.news.psi.net>,
++ Abigail <abigail@fnx.com> wrote:
++ >
++ >The packages itself are important. Not the fact that they are
++ >commercial. Do you have a non-commercial alternative for a
++ >thing like Oracle or Sybase? X-runner? Neuron Data? 
++ >The company I work for would be very interested, as it doesn't
++ >like to pay the sometimes expensive licenses.
++ 
++ Postgresql is a nice free nearly-complete (lacks HAVING and a
++ few other things) SQL database: http://www.postgresql.org.  It
++ is actively supported and has a recently updated ODBC driver
++ that allows access from MS-windows.


That's a nice toy, but in a different league then sometimes is required.
Yes, I'm aware of all the nice free things. Some of them are wonderful.
I've nothing against free software, in fact, I'm pro-free software.
But just because Sybase and Postgresql are both RDBSs doesn't mean
one can replace the other.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: Mon, 18 May 1998 15:47:13 -0500
From: "Thomas F. Lukareski" <TFL@Panduit.com>
Subject: Embeding Perl into a VC++ V5.0
Message-Id: <35609d0d.0@news1.ibm.net>

I am trying to call scripts from Visual C++ Version 5.0 and have been unable
to succeed by using the documentation found on the perl.com web site.  If
anyone has been successful with this procedure, please let me know how or if
it is even possible with the Visual C++ Compiler.

Thanks-
Thomas F. Lukareski
TFL@Panduit.Com





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

Date: Mon, 18 May 1998 15:48:11 -0500
From: "CompuServe" <jim_lawhon@pagenet.com>
Subject: Re: file size with perl and win NT
Message-Id: <O6PDf2pg9GA.98@nih2naac.prod2.compuserve.com>

Regarding the file sizes...  Are the files that reported the incorrect size
4GB?  I've seen some apps/tools fail to report the correct file-size on
files over 4GB.  They would usually report the difference between 4GB and
the actual file size or nothing at all.  I was told by one person this was a
bug with a Microsoft API.  Something about not using a large enough integer
to represent files over 4GB...
I have not confirmed this however.

-Jim

piet wrote in message <355C4968.6A0DB340@activ-consult.de>...
>hello.
>
>i am trying to get the size of several files in perl under windows NT.
>i tried
>    $size  = -s $filename;
>and
>    @info = stat ($filename);
>    $size = $info[7];
>
>my problem is, that both ways seem to work for some files but not for
>others...
>can anybody help me?
>
>thanks in advance,
>Gerhard Weber
>
>
>p.s. another problem is that for one file the size differs from the
>actual size.







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

Date: 18 May 1998 21:19:31 GMT
From: mark666769@aol.com (Mark666769)
Subject: Re: How do I get STDOUT back?
Message-Id: <1998051821193100.RAA16657@ladder03.news.aol.com>

Hi,

Thanks!

In the immortal words of Mr. Simpson, "DOH!!!"

(I guess I can get rid of the 'undef' too...)


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

Date: Mon, 18 May 1998 19:51:52 GMT
From: David Corcoran <david.x.corcoran@boeing.com>
Subject: I can't store a reference in a key of hash!
Message-Id: <35609158.25E3@boeing.com>

# I can't store a reference in a key of hash!
    # BTW how much does a key of hash go for these days?

# I'm runnig perl for win32. If anyone could test this on a UNIX I'd
# be much obliged.



    # define a ref to an array
    $x = [1,2,3,4];

    # store as value
    $y{1} = $x;

    # store as key
    $z{$x} = 1; # I've tried quoting $x - no difference in behavior

    # note that if I extract it from the hash as a value it works
    # if I extract it from the hash as a key it doesn't

    # Is this expected behavior?

    # this works
    for $i (values %y) {
        printf "%s as value: %s\n",$i,ref($i);
    }

    # this doesn't
    for $i (keys %z) {
        printf "%s as key: %s\n",$i,ref($i);
    }


# Specifics: NT 4.0
#
#       Win32 port Copyright (c) 1995-1996 Microsoft Corporation.
#           All rights reserved.
#       Developed by ActiveWare Internet Corp.,
http://www.ActiveWare.com
#
#   Perl for Win32 Build 313 - Built 13:30:50 Nov  4 1997
#
#   This is perl, version 5.003_07
#
#   Copyright 1987-1996, Larry Wall
#
#       + suidperl security patch
#   Perl may be copied only under the terms of either the Artistic
License or the


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

Date: Mon, 18 May 1998 16:18:28 -0500
From: Robert Boyd Skipper <rbskipper@wimberley-tx.com>
To: david.x.corcoran@boeing.com
Subject: Re: I can't store a reference in a key of hash!
Message-Id: <3560A5A3.42A109E8@wimberley-tx.com>

Dear David:

I've enjoyed your contributions to Activestate's list.  Now's my chance
to help.
At the very bottom of Perlref.html, there is a lovely passage:


WARNING

You may not (usefully) use a reference as the key to a hash. It will be
converted into a string:

    $x{ \$a } = $a;


If you try to dereference the key, it won't do a hard dereference, and
you won't accomplish what
you're attempting. You might want to do something more like

    $r = \@a;
    $x{ $r } = $r;


And then at least you can use the values(), which will be real refs,
instead of the keys(), which
won't.

I hope this helps.


Skipper


David Corcoran wrote:

> # I can't store a reference in a key of hash!
>     # BTW how much does a key of hash go for these days?
>





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

Date: Mon, 18 May 1998 21:19:51 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: David Corcoran <david.x.corcoran@boeing.com>
Subject: Re: I can't store a reference in a key of hash!
Message-Id: <Pine.GSO.3.96.980518141741.28732k-100000@user2.teleport.com>

On Mon, 18 May 1998, David Corcoran wrote:

> Subject: I can't store a reference in a key of hash!

Yes you can. But hash keys are always turned into strings, so you can't
get the reference back out and use it as a reference. One way to work
around this is to use a module; another is to make a hash whose keys are
the (stringified) references, while the values are the actual references.
Hope this helps! 

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




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

Date: Mon, 18 May 1998 23:16:06 -0700
From: Jan Krynicky <Jan@McCann.cz>
Subject: Re: I can't store a reference in a key of hash!
Message-Id: <356123A6.7A4@McCann.cz>

David Corcoran wrote:
> 
> # I can't store a reference in a key of hash!
<snipped>
>     # Is this expected behavior?

Yes, the key for a hash MUST be a string, so if you pass anything else,
it gets "stringized" - converted to string. That is the key to the hash 
is not a reference, but a string that looks 
something like "ARRAY(0x89A456)".

AFAIK there is no way from such a string back to the reference 
(and the referenced data). 

Unless of course you have stored the mapping in a hash as :
 $references{$ref} = $ref;

Jenda


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

Date: Mon, 18 May 1998 20:22:03 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: Is if ($a="something") a bad style?
Message-Id: <1d98dgo.adku9c27cvgeN@roxboro0-013.dyn.interpath.net>

Randal Schwartz <merlyn@stonehenge.com> wrote:

> >>>>> "John" == John Moreno <phenix@interpath.com> writes:
> 
> John> Mark-Jason Dominus <mjd@op.net> wrote:
> >> if ((n = xpchk(z, i+k)) == 0) {
> >> ...
> >> }
> 
> John> A easy way to make stuff like that clear, write it like this:
> 
> John>     if (0==(n = xpchk(z, i+k))) {
> John>       ...
> John>     }
>
> John> Do your comparisons with a constant first - then if you make a mistake
> John> the compiler will flag it for you.
> 
> Oddly enough, you just reversed the sense of the test.  I don't know
> if you did that intentionally, but that shows the *flaw* of this
> method -- it's too easy to get backwards.

Hm? I'm not sure what you mean by "sense" - it's certainly not the same
as the original question, but unless I'm missing something it's the same
(or rather has the same effect) as Mark-Jason's example.

-- 
John Moreno


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

Date: 18 May 1998 21:02:16 GMT
From: wayne@Glue.umd.edu (Wayne C. McCullough)
Subject: Re: Perl/Wall lingo question
Message-Id: <6jq7ko$7vq$2@hecate.umd.edu>

Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
: So my vote is for computer science as a branch of Engineering, which is
: based on anything deemed to be useful.

Theoretical Computer Science is Math.  

Applied Computer Science is engineering.  

The two paths diverged years ago and have less in common then
"Modern Literature" and "Solid State Physics".  Which is ironic
because math an engineering folks at least admit that there is
something in common between the two fields.



(remembering a (theoretical) Comp Sci grad student who was estatic
that she never had to use a computer again now that she was studying
computer science.)

W


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

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

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