[7702] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1328 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 17 08:17:54 1997

Date: Mon, 17 Nov 97 05:00:48 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 17 Nov 1997     Volume: 8 Number: 1328

Today's topics:
     Re: Can't build Wais-2.304  with freeWAIS-sf-2.2.10, pe (David Condon)
     Re: Connecting to Oracle <mchase@ix.netcom.com>
     DB_File and CGIs...extra load? <codestorm@mailcity.com>
     Re: DB_File and CGIs...extra load? <zenin@best.com>
     Re: Easily using databases - am I reinventing a wheel? (Paul Marquess)
     Error 500 on server??? (HSTUDIOSNY)
     function parameters <jimmy.oh@icommerce.com.sg>
     Re: function parameters (Jeremy D. Zawodny)
     Help: Problem About SendMail <thada@chuosenko.th.com>
     HELP: Problem about sendmail <thada@chuosenko.th.com>
     Help: problem about sendmail <thada@chuosenko.th.com>
     how can i read a program from the internet <rtt@ii-okinawa.ne.jp>
     Re: How To Test if number is ODD or EVEN? <jwilson@ic.ac.uk>
     HTTP header? <miran.sepic4@mss.tel.hr>
     Re: HTTP header? (Jeremy D. Zawodny)
     Re: Intermediate Message <usenet_post@bradfitz.com>
     Re: need script to strip html tags from file <sbekman@iil.intel.com>
     Re: Newbie Question (Bart Lateur)
     Re: odd difference between C and Perl <dehon_olivier@jpmorgan.com>
     Re: odd difference between C and Perl (Michael Rubenstein)
     OLE Problem (Gilles Maire)
     Re: ora_open <mchase@ix.netcom.com>
     Re: perl bug? (Jeremy D. Zawodny)
     Re: Problem with telnet module <jamesr@aethos.co.uk>
     shoving STDOUT into a scalar <usenet_post@bradfitz.com>
     Re: shoving STDOUT into a scalar <zenin@best.com>
     Re: Strange errors with a "}" (Casper K. Clausen)
     Re: The importance of binaries and installation (was: P <mchase@ix.netcom.com>
     Re: The importance of binaries and installation (was: P (Cameron Laird)
     Re: Tracking people leaving a website <zenin@best.com>
     Re: what's wrong in my simple module? <zenin@best.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 17 Nov 97 01:16:25 GMT
From: dcondon@cmnh.org (David Condon)
Subject: Re: Can't build Wais-2.304  with freeWAIS-sf-2.2.10, perl5.004_04
Message-Id: <64o9fn$28q$1@neelix.cmnh.org>

OK, updating my previous message, some progress has been made. I
discovered the new mkinc script in the freeWAIS-sf-2.2.10
distribution in the lib directory and after some other tries invoked
it as

perl /usr/local/freeWAIS-sf-2.2.10/lib/mkinc -I. -Iir ui.h cutil.h
irext.h irfiles.h irsearch.h irtfiles.h weight.h docid.h > wais.h

With the wais.h file thus produced installed under /usr/local/include
I go to the perl5.004_04/ext/Wais directory and do "make waisperl".
The result:

gcc -L/usr/X11/lib -L/usr/local/lib -o waisperl -O2 ./perlmain.o  
 ./../libperl.a /usr/local/perl5.004_04/lib/auto/Socket/Socket.a 
/usr/local/perl5.004_04/lib/auto/Pg/Pg.a 
/usr/local/perl5.004_04/lib/auto/IO/IO.a
/usr/local/perl5.004_04/lib/auto/GDBM_File/GDBM_File.a 
/usr/local/perl5.004_04/lib/auto/GD/GD.a 
/usr/local/perl5.004_04/lib/auto/Fcntl/Fcntl.a 
/usr/local/perl5.004_04/lib/auto/DynaLoader/DynaLoader.a 
/usr/local/perl5.004_04/lib/auto/DB_File/DB_File.a 
/blib/arch/auto/Wais/Wais.a `cat ./blib/arch/auto/Wais/extralibs.all` -lrpc 
-lcurses -ltermcap -lXpm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lgdbm -lgd 
-lpq -ldb -ldld -lm -lc -lwais
Wais.xs:70: Undefined symbol _my_perl_inited referenced from text segment
make[1]: *** [waisperl] Error 1
make[1]: Leaving directory `/usr/local/perl5.004_04/ext/Wais'
make: *** [waisperl] Error 2

I edited Wais.xs so that instead of

! #ifndef HAS_GRUNDFORM               /* freeWAIS-sf >= 2.1.1 */
!   int my_perl_inited;
! #else
!   extern int my_perl_inited;
! #endif

it simply says

int my_perl_inited;

With this change waisperl compiles without further problems
and passes all tests.


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

Date: Sun, 16 Nov 1997 19:19:31 -0800
From: "Michael A. Chase" <mchase@ix.netcom.com>
Subject: Re: Connecting to Oracle
Message-Id: <64pc1m$4cd@sjx-ixn2.ix.netcom.com>

You can find the latest DBD-Oracle at
http://www.perl.com/CPAN/modules/authors/Tim_Bunce/DBD/.  I  just
finished installing DBI and DBD-Oracle this weekend and it is working
fine so far.  Be sure to read the README files thoroughly before you
build and install the module.

--
Mac :})   mchase@ix.netcom.com


Kamal Gautam wrote in message <346E32D6.32FA@bremer-inc.com>...
>I'm brand new to Perl, and I'm trying to connect to an Oracle database.
>I've installed Gurusamy Sarathy's win32 binary port on  my machine,
>along with the DBI dll, but I can't seem to get beyond that.  I can't
>find the Oracle DBM for Win32 (the link from Hermetica seems to be
>broken).  Anyone know where I can find this?  And anyone have step by
>step instructions on how to proceed from there?





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

Date: Mon, 17 Nov 1997 02:02:57 -0600
From: Arup Kanjilal <codestorm@mailcity.com>
Subject: DB_File and CGIs...extra load?
Message-Id: <879753548.8594@dejanews.com>

Just wondering... how much of an extra load can be caused by using
DB_File in my CGIs? Need to use it since it make life a lot simple for
handling datafiles (I don't want to shift to an rdbms). The CGI in
question will be facing a lot of high volume traffic - about a million
hits a day, so is it a major increase in server load if I use the
library? My httpd is Apache.

TIA

Arup Kanjilal
Webmaster, Thematech India
codestorm@mailcity.com

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 17 Nov 1997 09:44:51 GMT
From: Zenin <zenin@best.com>
Subject: Re: DB_File and CGIs...extra load?
Message-Id: <879760049.662615@thrush.omix.com>

[ posted & mailed ]
Arup Kanjilal <codestorm@mailcity.com> wrote:
: Just wondering... how much of an extra load can be caused by using
: DB_File in my CGIs?
	It depends how you're running it.

: Need to use it since it make life a lot simple for
: handling datafiles (I don't want to shift to an rdbms).
	Good choice.  You are locking your databases, right? :)

: The CGI in
: question will be facing a lot of high volume traffic - about a million
: hits a day, so is it a major increase in server load if I use the
: library? My httpd is Apache.
	You're running Apache, again good choice.  Get the mod_perl module
	and check out the Registry CGI docs.

	This will allow you to not only keep perl in memory, but also the
	compiled CGI scripts and all modules they use.  With about 3-5 hours
	of work (downloading, installing, and reading the docs) you'll get
	a 10 fold speed increase in your perl CGI.  It's all vary simple
	actually, and you'll be amazed at the performance increase.  It
	also has other good side effects such as the ability to write your
	own server modules completely in perl, and use other modules such
	as the EmbedPerl module that lets you use perl code directly in
	HTML documents.

	If you don't have access to the server however, forget all of this,
	but still keep using DB_File.  While it does add overhead, it's
	probably a lot less then trying to reinvent the wheel with flat
	files.
-- 
-Zenin
 zenin@best.com


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

Date: 17 Nov 1997 09:24:07 GMT
From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
Subject: Re: Easily using databases - am I reinventing a wheel?
Message-Id: <64p2fn$3o6$1@pheidippides.axion.bt.co.uk>

[Posted & Mailed]

Zenin (zenin@best.com) wrote:

: Peter J. Schoenster <pschon@baste.magibox.net> wrote:

: : From all I have read there is no guarantee of real LOCKING.

: 	Well, there is.  It's just system dependent.  Perl does a nice
: 	job of masking most, but not all of these system dependences.
: 	The use of .lock files however, is not the way to lock files
: 	safely.  When using DB_File (Berkeley DBM files), you can get
: 	access to the real file descriptor and lock it safely.  I think
: 	DB v2.0 also has some more advanced features that might allow
: 	row locking, but I'm not sure. -And I don't think the perl
: 	DB_File module has them implemented yet...


DB 2.x has page locking, which is almost as good. It also handles the
gory details of locking behind the scenes, which is even better.

I've recently released an alpha of the rewrite for DB_File that
supports the new functionality available in Berkeley DB 2.x to CPAN.

  file: $CPAN/authors/id/PMQS/BerkeleyDB-0.02.tar.gz
  size: 24692 bytes
   md5: 48b3e83cccc21885d8ad9a0d13ebb497

Some of the new features:
 
   * Support for Locking
   * Transactions
   * Partial record retrieval
   * duplicates in the Hash format

If you do decide to have a play with the module, please remember it is
alpha quality code.

Paul


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

Date: 17 Nov 1997 09:36:00 GMT
From: hstudiosny@aol.com (HSTUDIOSNY)
Subject: Error 500 on server???
Message-Id: <19971117093600.EAA06289@ladder02.news.aol.com>


I recently learned perl for my website and tested it with the DOS version.  I
 put the script on the website, changed the mode to executable and when I went
 to netscape and ran the script I got Error 500, Internal error.  

The path for the perl interpreter is correct:

#!/usr/lib/perl

Any other suggestions on what is causing this error?

- Jon



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

Date: Mon, 17 Nov 1997 11:06:53 +0800
From: Jimmy Oh <jimmy.oh@icommerce.com.sg>
Subject: function parameters
Message-Id: <346FB4CD.1A12@icommerce.com.sg>

Hi,
	I have a question regarding function parameters.  Here is the scenario:

Suppose I have a string, $str.  The amount of stuff contains in $str is
huge, say 1 Meg.  My question is, is there a difference in doing either
of these:

foo($str); or foo(\$str);

Is there a performance issue here if we were to compare the 2 statements
above?  Which is the prefer way, if $str is huge or samll?

Also for returning value, whether it is %hash, @arr, or $str, which is
the preferred way(in terms of performance)?

return(%hash); or return(\%hash);
return(@arr); or return(\@arr);
return($str) or return(\$str);

	I hope I did explain myself clearly.  Any comments is appreciated. 
Thanx.

Jimmy


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

Date: Mon, 17 Nov 1997 11:54:19 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: function parameters
Message-Id: <34723001.114552357@woody.wcnet.org>

[original author automagically cc'd via e-mail]

On Mon, 17 Nov 1997 11:06:53 +0800, Jimmy Oh
<jimmy.oh@icommerce.com.sg> wrote:

>Hi,
>	I have a question regarding function parameters.  Here is the scenario:
>
>Suppose I have a string, $str.  The amount of stuff contains in $str is
>huge, say 1 Meg.  My question is, is there a difference in doing either
>of these:
>
>foo($str); or foo(\$str);

Yes, a big one. One passes a few bytes (the later), while the other
makes a 1MB copy of the data and passes it (the former).

>Is there a performance issue here if we were to compare the 2 statements
>above?  Which is the prefer way, if $str is huge or samll?

Use the later. It's faster and uses much less memory.

>Also for returning value, whether it is %hash, @arr, or $str, which is
>the preferred way(in terms of performance)?
>
>return(%hash); or return(\%hash);
>return(@arr); or return(\@arr);
>return($str) or return(\$str);
>
>	I hope I did explain myself clearly.  Any comments is appreciated. 

The later in either of those 3 examples is fastest. As for which of
the three, it just depends on how you'd like the data. Do you want a
hash, list, or scalar? They're roughly the same at that point, since
you're using references.

Jeremy
-- 
Jeremy D. Zawodny                 jzawodn@wcnet.org
Web Server Administrator          www@wcnet.org
Wood County Free Net (Ohio)       http://www.wcnet.org/


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

Date: Mon, 17 Nov 1997 17:26:18 +0700
From: "ChuoSenko" <thada@chuosenko.th.com>
Subject: Help: Problem About SendMail
Message-Id: <64p6dh$quu$2@news.ksc.co.th>

I write perl the follow this

#!/usr/local/perl
open(SENDMAIL, "|/usr/lib/sendmail -t") ;
print SENDMAIL <<EOF;
From: user@domain1.com
To: Me@domain2.com
Subject: Daily status message
Message
EOF
close(SENDMAIL)
If i submit from html, the result has nothing.
If i run on unix , i can get e-mail
What is problem?





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

Date: Mon, 17 Nov 1997 17:28:36 +0700
From: "ChuoSenko" <thada@chuosenko.th.com>
Subject: HELP: Problem about sendmail
Message-Id: <64p6hr$r63$1@news.ksc.co.th>

I write perl the follow this
#!/usr/local/perl
open(SENDMAIL, "|/usr/lib/sendmail -t") ;
print SENDMAIL <<EOF;
From: user@domain1.com
To: Me@domain2.com
Subject: Daily status message
Message
EOF
close(SENDMAIL)
If i submit from html, the result has nothing.
If i run on unix , i can get e-mail
What is problem?





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

Date: Mon, 17 Nov 1997 17:31:51 +0700
From: "ChuoSenko" <thada@chuosenko.th.com>
Subject: Help: problem about sendmail
Message-Id: <64p6nt$r68$1@news.ksc.co.th>

I write perl the follow this
#!/usr/local/perl
open(SENDMAIL, "|/usr/lib/sendmail -t") ;
print SENDMAIL <<EOF;
From: user@domain1.com
To: thada@chuosenko.th.com
Subject: Daily status message
Message
EOF
close(SENDMAIL)
If i submit from html, the result has nothing.
If i run on unix , i can get e-mail
What is problem?

Please send me e-mail, I will thank a lot.
thada@chuosenko.th.com




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

Date: 17 Nov 1997 12:14:37 GMT
From: "Rafael Tokashiki" <rtt@ii-okinawa.ne.jp>
Subject: how can i read a program from the internet
Message-Id: <01bcf353$436ec7e0$19a4e8ca@univac-ii>

How cain i read a perl program that is on the cgi bin directory?
thsnks in advance



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

Date: 17 Nov 1997 10:32:43 GMT
From: "Jeff Wilson" <jwilson@ic.ac.uk>
Subject: Re: How To Test if number is ODD or EVEN?
Message-Id: <01bcf344$23351ba0$d53ec69b@leicester>

Try if ($variable%2) { ........} else { ............}
-- 

                                Jeff Wilson
                                London - UK

Jay Dixon <jay@dixonssurgical.co.uk> wrote in article
<346c1e03.4298330@news.dixonssurgical.co.uk>...
> I am slowly coming to grips with perl.  I can usually make a half
> decent job of hacking existing scripts but I have got myself stumped.
> 
> I want to test if a variable is Odd (or Even) - i.e. I only want to
> run a bit of code every other pass.  I have never come across this as
> a bit of code.
> 
> if $counter == [????] print "stuff"; # as far as I can get!
> 
> Any suggestions will be much appreciated.
> 
> Thanks
> Jay
> 
> ---------
> Jay Dixon - Dixons Surgical Ltd - Wickford - Essex - England
> jay@dixonssurgical.co.uk  -  http://www.dixonssurgical.co.uk
> 


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

Date: 17 Nov 1997 09:04:16 GMT
From: "Miran Sepic" <miran.sepic4@mss.tel.hr>
Subject: HTTP header?
Message-Id: <01bcf337$c50c9be0$7a02a8c0@pc_miran>

Any ideas how to hide username and password in following header:

Location: ftp://username:password@www.someserver.com

Is it possible?


Miran


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

Date: Mon, 17 Nov 1997 11:50:37 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: HTTP header?
Message-Id: <34702f04.114299183@woody.wcnet.org>

[original author automagically cc'd via e-mail]

On 17 Nov 1997 09:04:16 GMT, "Miran Sepic" <miran.sepic4@mss.tel.hr>
wrote:

>Any ideas how to hide username and password in following header:
>
>Location: ftp://username:password@www.someserver.com
>
>Is it possible?

To "hide them in the header" is not possible. First of all, what
you've posted isn't a "header", it's a URL. Since it's not an HTTP or
HTTPS URL, it doesn't have the "header" that folks traditionally
associate with web traffic.

I don't know of a good way to do that.

Can you leave out the password and get the browser to prompt for it?
Maybe. Would that solve your problem.?

But none of this has *anything* to do with Perl, so you may want to
take it to a more appropriate newsgroup.

Jeremy
-- 
Jeremy D. Zawodny                 jzawodn@wcnet.org
Web Server Administrator          www@wcnet.org
Wood County Free Net (Ohio)       http://www.wcnet.org/


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

Date: Mon, 17 Nov 1997 01:15:49 -0800
From: "Brad Fitzpatrick" <usenet_post@bradfitz.com>
Subject: Re: Intermediate Message
Message-Id: <64p1vl$qo8$1@glisan.hevanet.com>

>>  a way to display an intermediate message that would come up on the
>> screen once a CGI FORM has been submitted and before its results come
>> back.
>>
>> Something like
>>
>> "One Moment Please"
>>
>
>Just print it out before you start processing, be sure to have
>$|=1; before it in your code so it comes out right away.



Consider also that different web servers will behave differently.  Apache is
nice and will spit out data from the cgi script as it gets it.  Other do
not, necessarily.





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

Date: Mon, 17 Nov 1997 10:26:01 +0200
From: Bekman Stanislav <sbekman@iil.intel.com>
To: g@world.std.com
Subject: Re: need script to strip html tags from file
Message-Id: <346FFF99.31DF@iil.intel.com>

g@world.std.com wrote:
> 
> Can anyone help a beginner out there?  I'm looking for a script that will strip
> html tags from a file. Note: the tags might cross lines.
> 
> Thanks,
> Gary Jutras

http://www.eprotect.com/stas/TULARC
[My Perl Scripts Section] ->tagstrip.pl
-- 


______________________________________________________________________
Stas Bekman     mailto:sbekman@iil.intel.com [just another webmaster]
Home Page:      http://www.eprotect.com/stas
A must visit: 	http://www.eprotect.com/stas/TULARC (Java,CGI,PC,Linux)
Linux-il Home:  http://www.linux.org.il/


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

Date: Mon, 17 Nov 1997 12:09:08 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Newbie Question
Message-Id: <34742fcd.4952587@news.tornado.be>

comdog@computerdog.com (brian d foy) wrote:

>>I'm trying to format a number field that looks like 999,999,999.00
>>and would like the output to strip out the commas and decimal
>>places so it would look like : 999999999.  BTW I'm using perl 5.
>
>$number =~ tr/,//;    #get rid of commas
>
>$number =~ s/\..*//;  #chop of the fractional part

Ah. This is "dangerous" if the number isn't an integer value: it will
round down.

You could try
	
	$number += 0;

wich will convert it to a "number", thus removing any unnecessary
trailing zero's,while ONLY doing that.

I'm not sure at what threshold you'll start getting roundoff errors
because of the limited resolution of floating point.

HTH,
Bart.


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

Date: 17 Nov 1997 10:35:53 +0100
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: odd difference between C and Perl
Message-Id: <njzzpn3ooau.fsf@jpmorgan.com>

John Davis <jd@mukh.asc.ox.ac.uk> writes:

> I've written a routine to convert Islamic
> dates to Gregorian ones. For internal reasons,
> I've done a version in C and another in Perl.
> 
> At one stage you have to multiply the Islamic
> year by 0.970224 and add 622.54.
> 
> Given the Islamic year 1367
> 
> the C code 
> 
> 	x = (Hy * 0.970224) + 622.540000;
> 
> produces 1948.836182 (x is declared as a float)
> 
> whereas the Perl code
> 
> 	 $x = ($Hy * 0.970224) + 622.540000;
> 
> 
> produces 1948.836208
> 
> The second of these is confirmed by my HPCalculator.
> which at 9 decimal places gives 1948.836208000.
> 
> I haven't yet discovered an input for which this
> makes a difference to the final result, but it may
> exist (you have to do further calculations with the
> fractional result, to calculate the month and day).
> 
> But it would be interesting to know why the difference
> occurs.

In C, 0.970224 and 622.540000 are of type float, whereas
Perl treats them as doubles, hence the difference in
precision.

Try 0.970224L and 622.540000L to get constants of type
double in C.

Hope this helps.

Olivier Dehon


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

Date: Mon, 17 Nov 1997 10:48:11 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: odd difference between C and Perl
Message-Id: <34702051.64895074@nntp.ix.netcom.com>

On 17 Nov 1997 10:35:53 +0100, Olivier Dehon
<dehon_olivier@jpmorgan.com> wrote:

>John Davis <jd@mukh.asc.ox.ac.uk> writes:
>
>> I've written a routine to convert Islamic
>> dates to Gregorian ones. For internal reasons,
>> I've done a version in C and another in Perl.
>> 
>> At one stage you have to multiply the Islamic
>> year by 0.970224 and add 622.54.
>> 
>> Given the Islamic year 1367
>> 
>> the C code 
>> 
>> 	x = (Hy * 0.970224) + 622.540000;
>> 
>> produces 1948.836182 (x is declared as a float)
>> 
>> whereas the Perl code
>> 
>> 	 $x = ($Hy * 0.970224) + 622.540000;
>> 
>> 
>> produces 1948.836208
>> 
>> The second of these is confirmed by my HPCalculator.
>> which at 9 decimal places gives 1948.836208000.
>> 
>> I haven't yet discovered an input for which this
>> makes a difference to the final result, but it may
>> exist (you have to do further calculations with the
>> fractional result, to calculate the month and day).
>> 
>> But it would be interesting to know why the difference
>> occurs.
>
>In C, 0.970224 and 622.540000 are of type float, whereas
>Perl treats them as doubles, hence the difference in
>precision.
>
>Try 0.970224L and 622.540000L to get constants of type
>double in C.
>
>Hope this helps.

It's very unlikely that an incorrect answer will help.  In C, 0.970224
and 622.540000 are fo type double, not float.  0.970224L and
622.540000L are of type long double.

Michael M Rubenstein


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

Date: Mon, 17 Nov 1997 10:06:57 GMT
From: Gilles.Maire@ungi.com (Gilles Maire)
Subject: OLE Problem
Message-Id: <3470163d.3543466@news.imaginet.fr>

Hello, 

I use a small program to open many Excel file in Perl and the problem
crash after 10 files because the Excel program doesn't end fine and
stay in memory.

I have 10 excel files loaded. 

Any suggestions ?

My program is  : 

use OLE;
     $dir1="c:/dir1/";
     $dir2="c:\\dir2\\" ;

     opendir ( DIR , $dir1 );
     while ( $file=readdir (DIR) )  
     {         
     if ( $file=~/.xls$/ )
      {
       $excel = CreateObject OLE 'Excel.Application' or warn "Couldn't
create new instance of Excel App!!";

       print "$file : " ;
       $file=$dir2 . $file ;

       $excel->Workbooks->open("$file");

$count=$excel->Workbooks(1)->Worksheets('Shet1')->Cells(43,5)->{Value}

        print "$count\n";
        $excel->quit (); 

     }
}


     }







     print "$total F H.T.\n" ;



     close (DIR);



    

















































































Amicalement

          Gilles.Maire@ungi.com
|||||||||||||||||||||||||||||| - UNGI - ||||||||||||||||||||||||||||||
          http://www.ungi.com


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

Date: Sun, 16 Nov 1997 19:57:12 -0800
From: "Michael A. Chase" <mchase@ix.netcom.com>
Subject: Re: ora_open
Message-Id: <64pc1o$4cd@sjx-ixn2.ix.netcom.com>

Describe is a SQL*Plus command, not SQL.  I'm not familiar with oraperl,
but you can get the same information by querying the all_tables table.

--
Mac :})   mchase@ix.netcom.com


Pallotta Marco wrote in message <346C776C.167E@unipg.it>...
>Hi.
>
>Why the oracle command "desc TABLE_NAME" inserted in the oraperl command
>ora_open doesn't work??????
>
>Which oraperl command I must use to do this (executing the "describe",
>or "desc", coomand) ????





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

Date: Mon, 17 Nov 1997 11:51:58 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: perl bug?
Message-Id: <34712fcf.114502646@woody.wcnet.org>

[original author automagically cc'd via e-mail]

On Sun, 16 Nov 1997 23:14:34 -0500, "Zisha Weinstock"
<sysop@diamonds.com> wrote:

>Try this:
>
>#!/usr/bin/perl
>sub FOO { print "foo!\n"; }
>
>open FOO or die;
>
>On my system (SCO OpenServer 5 perl version 5.003), this prints out "foo"
>and then
>dies. Why? Is it confusing a filehandle with a function call or is this by
>design?

Use the "-w" flag. It is your friend.

Jeremy
-- 
Jeremy D. Zawodny                 jzawodn@wcnet.org
Web Server Administrator          www@wcnet.org
Wood County Free Net (Ohio)       http://www.wcnet.org/


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

Date: 17 Nov 1997 10:56:47 GMT
From: "James Richardson" <jamesr@aethos.co.uk>
Subject: Re: Problem with telnet module
Message-Id: <01bcf347$99c84dc0$26c0a4c1@kitkat.aethos.co.uk>


-- Received via email

"James Richardson" <jamesr@aethos.co.uk> writes:

> How about making a directory $HOME/lib/perl5, then install the module in
> there.. (i.e. as $HOME/lib/perl5/Net/Telnet.pm )
> 
> Then in your script...
> 
> #!/usr/local/bin/perl5
> 
> BEGIN {
> 	push (@INC, "/home/yourlogin/lib/perl5")
> }
> 
> use Net::Telnet;
> 

Thanks.  That did the trick.  I didn't think that telnet needed to be
referenced through Net:: if it was just installed separately, but I
guess it does.

------

Just for info:

Its because it defines the package as Net::Telnet.... if you wanted to hack
about with it you could remove the Net bit from the package name....and it
would work as you expected (as long as you remove any explicit references
to the Net:: bit in the rest of the module).

I dont recommend actually doing this tho', cos all scripts that relied on
Net::Telnet would break..

James Richardson



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

Date: Mon, 17 Nov 1997 00:42:23 -0800
From: "Brad Fitzpatrick" <usenet_post@bradfitz.com>
Subject: shoving STDOUT into a scalar
Message-Id: <64p00s$pj9$1@glisan.hevanet.com>

To the point: what I'd like to do is capture everything printed to STDOUT
for a portion of my script and concatenate it all together in one scalar.

For example:

    #!/usr/bin/perl

    $stdout_snarf = "";
    print "This dumps out...\n";

    # start capturing STDOUT
    # open >+& / untie / tie / something / i don't know

        print "This doesn't print out. ";
        print "Neither does this.";

    # end capturing STDOUT
    # open >+& / untie / tie / something / i don't know

    print "And this dumps out again.";
    __END__

Now $stdout_snarf should equal "This doesn't print out. Neither does this."

Any ideas?  I have a feeling that I need to do something with tieing STDOUT
to a class that somehow munched it or implements something with SCALAR.  As
you can tell, I'm lost.


Thanks in advance,
Brad

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"If I had something witty to say it would go here." - me
 Brad Fitzpatrick
http://www.bradfitz.com/




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

Date: 17 Nov 1997 09:54:52 GMT
From: Zenin <zenin@best.com>
Subject: Re: shoving STDOUT into a scalar
Message-Id: <879760650.613135@thrush.omix.com>

Brad Fitzpatrick <usenet_post@bradfitz.com> wrote:
: Any ideas?  I have a feeling that I need to do something with tieing STDOUT
: to a class that somehow munched it or implements something with SCALAR.  As
: you can tell, I'm lost.

	Yes, and it will take at least v5.004 to do as the lesser versions
	don't support tied filehandles.

	(untested, off the top of my head, use at your own risk, etc)

	package Tie::Stdout;
	sub TIEHANDLE {
		my $class = shift;
		my $self = '';
		return \$self, $class;
	}

	sub PRINT {
		my $self = shift;
		${ $self } .= join '', @_;
	}

	sub PRINTF {
		my $self   = shift;
		${ $self } .= sprintf @_;
	}

	sub READLINE {
		my $self = shift;
		return ${ $self };
	}
	1;
	__END__

-- 
-Zenin
 zenin@best.com


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

Date: 17 Nov 1997 08:33:48 +0100
From: ckc@hobbes.ejoper.dmi.min.dk (Casper K. Clausen)
Subject: Re: Strange errors with a "}"
Message-Id: <wvphg9c5603.fsf@hobbes.ejoper.dmi.min.dk>

"John Dubchak" <jdubchak@sprint.ca> writes:


> I am trying to run the following simple program example but cannot get it to
> work.
> 
> #!/usr/bin/perl
> 
> print("New dir name? ");
> chomp($where = <STDIN>);
> If (mkdir $where, 0777) {
  ^
Most built-ins are all lowercase.

if (mkdir $where, 0777) {

would work.

Regards,
Kvan.

-- 
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- |  unattempted is impossible.'
           Lokal  544            |   
I do not speak for DMI, just me. |        - Lord Mhoram, Son of Variol.      


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

Date: Sun, 16 Nov 1997 19:29:35 -0800
From: "Michael A. Chase" <mchase@ix.netcom.com>
Subject: Re: The importance of binaries and installation (was: Python is a mini C?)
Message-Id: <64pc1n$4cd@sjx-ixn2.ix.netcom.com>

One problem is that you didn't download the Win32 Perl installation file,
you got the PerlScript file.  Try Pw32i313.exe instead.
Perlw32-install.bat is in the bin/ directory.

--
Mac :})   mchase@ix.netcom.com


Cameron Laird wrote in message <64knjg$230$1@Starbase.NeoSoft.COM>...
>In article <64isrd$plv$1@csnews.cs.colorado.edu>,
>Tom Christiansen  <tchrist@mox.perl.com> chides me:
>> [courtesy cc of this posting sent to cited author via email]
>>
>>In comp.lang.python,
>>    claird@Starbase.NeoSoft.COM (Cameron Laird) writes:
>>:1.  Anyone can install Python on a Win* or
>>:    MacOS machine.
>>
>>I guess you've never looked at http://www.perl.com/CPAN/ports/
>>for the mac/ and win32/ subdirectories.
> .
> .
> .
>I have (surely you know that about me, Tom; you've read the article
>where I called CPAN "the model for other languages").  I couldn't
>figure it out.
>
>More precisely, I picked up such binaries as <URL:
>http://www.perl.com/CPAN-local/ports/winNT/ActiveState/Release/Pw32s312.
exe>
>and <URL:
>http://www.perl.com/CPAN-local/ports/winNT/Perl5/Release/Pw32s312.zip>,
>and installed them uneventfully.  I didn't have problems.  I *was*
>puzzled, though, because I never did notice the install.bat and
>install.txt promised by <URL:
>http://www.perl.com/CPAN-local/ports/winNT/FAQ/PerlFaq.html>.
>That's what I was expressing in the post from which you excerpted
>the sentence above:  Python and Tcl have installers that I propose
>feel more familiar and less threatening to the Win* crowd.
>
>Maybe I missed something obvious, 'cause I already know how I want
>my WinNT box set up.  Maybe the FAQ needs a couple of words changed.
>Maybe I just happened to check during a glitch, and caught CPAN with
>its installations or documentation muddled.  Maybe the only people
>confused by two missing files are the members of my own family.  Maybe
>using InstallShield doesn't really matter, anyway.  In any case, thanks
>for affording me the opportunity to elaborate on a point I clearly
>didn't communicate adequately on my first pass.





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

Date: 17 Nov 1997 06:43:50 -0600
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: The importance of binaries and installation (was: Python is a mini C?)
Message-Id: <64pe66$bs4$1@Starbase.NeoSoft.COM>

In article <64knjg$230$1@Starbase.NeoSoft.COM>,
Cameron Laird <claird@Starbase.NeoSoft.COM> wrote:
>In article <64isrd$plv$1@csnews.cs.colorado.edu>,
>Tom Christiansen  <tchrist@mox.perl.com> chides me:
>> [courtesy cc of this posting sent to cited author via email]
>>
>>In comp.lang.python, 
>>    claird@Starbase.NeoSoft.COM (Cameron Laird) writes:
>>:1.  Anyone can install Python on a Win* or
>>:    MacOS machine.  
>>
>>I guess you've never looked at http://www.perl.com/CPAN/ports/
>>for the mac/ and win32/ subdirectories.
>			.
>			.
>			.
>I have (surely you know that about me, Tom; you've read the article
>where I called CPAN "the model for other languages").  I couldn't
>figure it out.
>
>More precisely, I picked up such binaries as <URL:
>http://www.perl.com/CPAN-local/ports/winNT/ActiveState/Release/Pw32s312.exe>
			.
			.
			.
>Maybe I missed something obvious, 'cause I already know how I want
>my WinNT box set up.  Maybe the FAQ needs a couple of words changed.
			.
			.
			.
Door number one:  I missed something obvious.  The INSTALLATION
package (pw32i313, for example) *does* install as advertised.
I was picking up both PerlScript and the latest Perl, and got
myself into a state that was entirely my own responsibility.
Apologies all around, and thanks to Michael A. Chase for cour-
teously straightening me out.

I retract my earlier conclusion, of course:  there's no substan-
tive installation difference in the difficulty for a beginner
starting with Perl or Python under Win*.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 713 996 8546 FAX


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

Date: 17 Nov 1997 09:35:13 GMT
From: Zenin <zenin@best.com>
Subject: Re: Tracking people leaving a website
Message-Id: <879759472.311694@thrush.omix.com>

Peter Schoon <alex1@#nospam#.usa.net> wrote:
: Does anybody know of the existence of a perl script that tracks users
: leaving a webpage and where they are going ie.
: http://www.whatever.com/redirect?url=www.yahoo.com
: Call me lazy and I know it's a small programming job but I just don't
: want to go and do it and then find out somebody else has done it and
: is just giving it away.

	Untested and off the top of my head, but here ya go:

	Listing of "redirect" cgi:

	#!/usr/local/bin/perl -w
	use strict;
	print "Location: http://$ARGV/\n\n";

	You can then track the exits by reading your standard log files
	as they will show the full request string,
	"http://www.whatever.com/redirect?url=www.yahoo.com".

	Parsing the logs nicely is left up to the reader.

	Hope this helps!

-- 
-Zenin
 zenin@best.com


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

Date: 17 Nov 1997 09:24:00 GMT
From: Zenin <zenin@best.com>
Subject: Re: what's wrong in my simple module?
Message-Id: <879758798.727569@thrush.omix.com>

Jason Gloudon <jgloudon@bbn.remove.com> wrote:
: Trudno zhit' v derevne bez nagana. (alex@kawo2.rwth-aachen.de) wrote:
: : @EXPORT = qw (eed_header, eed_abstract, eed_footer);
:  qw looks for whitespace as the separator. Remove the commas.

	Yes, which would have been caught (although, in advertently) if
	"use strict" had been used in the program code. :-)

	The -w flag, and the use strict pragma should _always_ be your
	starting point when tracking down funky errors.

-- 
-Zenin
 zenin@best.com


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

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

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