[18629] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 797 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 30 00:05:46 2001

Date: Sun, 29 Apr 2001 21:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <988603507-v10-i797@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 29 Apr 2001     Volume: 10 Number: 797

Today's topics:
    Re: Advice req. on Timing Out STDIN (Shawn Smith)
        ANNOUNCE:  DDL::Oracle v1.09 <rvsutherland@yahoo.com>
        ANNOUNCE: Attribute::Handlers 0.50 (Damian Conway)
        ANNOUNCE: Inline 0.33 <BrianI@ActiveState.com>
        ANNOUNCE: Inline::Filters 0.10 <BrianI@ActiveState.com>
        ANNOUNCE: Inline::Java 0.20 <BrianI@ActiveState.com>
    Re: Appending to files and flock. <johnlin@chttl.com.tw>
    Re: Boole's tools (was Things I'm just not getting in P <mischief@velma.motion.net>
    Re: BUG? => Cannot delete file which has more than 19 c <chrisw+usenet@dynamite.com.au>
        COMM Port/ Modem Access <cbbenefit@hotmail.com>
    Re: How to write a multi process program with perl ? <uri@sysarch.com>
    Re: pretty-printing perl? <persicom@acedsl.com>
        problem compiling perl on hpux 10.01 <roberthartley@mediaone.net>
    Re: Removing Lines... how's this? (BUCK NAKED1)
        sendmail <gasper@cis.ohio-state.edu>
    Re: Simple newbie performance question <godzilla@stomp.stomp.tokyo>
    Re: Simple newbie performance question (Charles M. Kozierok)
    Re: Simple newbie performance question <godzilla@stomp.stomp.tokyo>
        TEST <mrp@hafatel.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 30 Apr 2001 03:01:27 GMT
From: SPAMloginprompt@yahoo.com (Shawn Smith)
Subject: Re: Advice req. on Timing Out STDIN
Message-Id: <3aecd38d.27343103@netnews.worldnet.att.net>

On Sun, 29 Apr 2001 22:41:30 GMT, garry@ifr.zvolve.net (Garry
Williams) wrote:

>On Sun, 29 Apr 2001 20:53:56 GMT, Shawn Smith
><SPAMloginprompt@yahoo.com> wrote:
>
>> I have this snippet in a daemon. It checks if the user types "quit" to
>> stop the script. I have been asked to add the check for the existance
>> of a file named "quit".
>> 
>>   ###################################
>> 
>> while (1) {
>>     eval {
>>         local $SIG{ALRM} = sub {$alarm = 1};
>>         alarm 300;
>>         $cmd = <stdin>;
>>         alarm 0;
>>     };
>>     if ($alarm) {
>>         $alarm = 0;
>>     }
>> 
>>   # check other condtions, such as existance of a file
>> } # end while loop
>>  ####################################
>
>I don't see how this `checks if the user types "quit"', 

Yes, I left that part out. A check is performed outside of the eval
block to see if cmd =~ /quit/

>but your time
>out problem is solved by using the method recommended in the perlipc
>manual page: 
>
>         eval {
>             local $SIG{ALRM} = sub { die "alarm clock restart" };

I had noticed that the die was missing form examples I had seen
before, but I thought that the die would make the script die. After
going to perlipc (thanks for pointing me to the right doc!) I see that
die just puts me out of the eval block.


>             alarm 300;
>             $cmd = <stdin>;	# File handles should be all uppercase

I inherited that, but will fix it :)

Gary, thanks a ton.



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

Date: Sun, 29 Apr 2001 07:14:39 -0400
From: "Richard Sutherland" <rvsutherland@yahoo.com>
Subject: ANNOUNCE:  DDL::Oracle v1.09
Message-Id: <tepfdtj6pr6t0e@corp.supernews.com>

===========================================================================
                   Release of DDL::Oracle, Version 1.09
===========================================================================

CHANGES

Added type 'schema', which generates the DDL for a named schema(s) for
the following object types in the sequence listed:

  TYPE
  TABLE
  INDEX
  CONSTRAINT
  SEQUENCE
  TRIGGER
  VIEW
  SNAPSHOT LOG
  SNAPSHOT
  SYNONYM
  DATABASE LINK
  FUNCTION
  PROCEDURE
  PACKAGE
  PACKAGE BODY

Upgraded CREATE SNAPSHOT to work properly on Oracle versions pre-8i.

Fixed bug #414510 submitted by Henrik Johnson wherein the CREATE TABLE
for IOT's was missing the sometime-required OVERFLOW clause.  THANKS,
Henrik!

Fixed defrag.pl to work on Windows [I think].

SYNOPSIS

 use DBI;
 use DDL::Oracle;

 my $dbh = DBI->connect(
                         "dbi:Oracle:dbname",
                         "username",
                         "password",
                         {
                           PrintError => 0,
                           RaiseError => 1,
                         }
                       );

 # Use default resize and schema options.
 # query default DBA_xxx tables (could use USER_xxx for non-DBA types)

::Oracle->configure( 
                         dbh    => $dbh,
                       );

 # Create a list of one or more objects
 my $sth = $dbh->prepare(
        "SELECT
                owner
              , table_name
         FROM
                dba_tables
         WHERE
                tablespace_name = 'MY_TBLSP'    -- your mileage may vary
        "
     );

 $sth->execute;
 my $list = $sth->fetchall_arrayref;

 my $obj = DDL::Oracle->new(
                             type  => 'table',
                             list  => $list,                          );
                           );

 my $ddl = $obj->create;      # or $obj->resize;  or $obj->drop;  etc.

 print $ddl;    # Use STDOUT so user can redirect to d
esired file.

 # Here's another example, this time for type 'components'.  This type
 # differs from the norm, because it has no owner and no name.

 my $obj = DDL::Oracle->new(
                             type => 'components',
                             list => [[ 'no owner','no name' ]]
                           );

 my $ddl = $obj->create;

 print $ddl;


AUTHOR

Richard V. Sutherland
rvsutherland@yahoo.com

COPYRIGHT

Copyright (c) 2000, 2001 Richard V. Sutherland.  All rights reserved.
This module is free software.  It may be used, redistributed, and/or
modified under the same terms as Perl itself.  See:

    http://www.perl.com/perl/misc/Artistic.html

===========================================================================
                       AVAILABILITY
===========================================================================

DDL::Oracle is available from the CPAN, and from:

    http://sourceforge.net/projects/ddl-oracle/







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

Date: 30 Apr 2001 00:55:10 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: ANNOUNCE: Attribute::Handlers 0.50
Message-Id: <tepfdnlrbk5cf4@corp.supernews.com>
Keywords: perl, module, release

==============================================================================
                Release of version 0.50 of Attribute::Handlers
==============================================================================


NAME
    Attribute::Handlers - Simpler definition of attribute handlers

VERSION
    This document describes version 0.50 of Attribute::Handlers, released
    April 30, 2001.


DESCRIPTION
    This module, when inherited by a package, allows that package's class to
    define attribute handler subroutines for specific attributes. Variables
    and subroutines subsequently defined in that package, or in packages
    derived from that package may be given attributes with the same names as
    the attribute handler subroutines, which will then be called at the end
    of the compilation phase (i.e. in a `CHECK' block).

EXAMPLE

	package UNIVERSAL;
	use Attribute::Handlers;

	my %name;
	sub name { return $name{$_[2]}||*{$_[1]}{NAME} }

	sub Name    :ATTR { $name{$_[2]} = $_[4] }

	sub Purpose :ATTR { print STDERR "Purpose of ", &name, " is $_[4]\n" }

	sub Unit    :ATTR { print STDERR &name, " measured in $_[4]\n" }


	package main;

	my $capacity : Name(capacity)
		     : Purpose(to store max storage capacity for files)
		     : Unit(Gb);

	package Other;

	sub foo : Purpose(to foo all data before barring it) { }


AUTHOR
    Damian Conway (damian@conway.org)

COPYRIGHT
             Copyright (c) 2001, Damian Conway. All Rights Reserved.
           This module is free software. It may be used, redistributed
          and/or modified under the terms of the Perl Artistic License
                (see http://www.perl.com/perl/misc/Artistic.html)


==============================================================================

CHANGES IN VERSION 0.50

	No changes (first release)

==============================================================================

AVAILABILITY

Attribute::Handlers has been uploaded to the CPAN
and is also available from:

	http://www.csse.monash.edu.au/~damian/CPAN/Attribute-Handlers.tar.gz

==============================================================================




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

Date: Sun, 29 Apr 2001 08:38:11 GMT
From: Brian Ingerson <BrianI@ActiveState.com>
Subject: ANNOUNCE: Inline 0.33
Message-Id: <tepfempeoiibbe@corp.supernews.com>

INTRODUCTION:

Inline.pm - Write Perl subroutines in other programming languages.

Inline lets you write Perl subroutines in other programming languages
like C.
You don't need to compile anything. All the details are handled
transparently
so you can just run your Perl script like normal.

Example:

     use Inline C => <<'END';
     SV* JAxH(char* x) {
         return newSVpvf ("Just Another %s Hacker",x);
     }
     END

     print JAxH('Inline'), "\n";

When run, this complete program prints:

     Just Another Inline Hacker

The one line version is:

     perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf("Just
Another %s Hacker",x);}};print JAxH+Inline'

-------------------------------------------------------------------------------
FEATURES:

Inline version 0.33 is a minor upgrade with the following changes:

+ Support for Inline::Struct and Inline::Filters
+ Added ENABLE and DISABLE configuration modifiers.
+ C installation is optional
+ Test harness reworked. Faster testing.
+ Fixed all reported (and some unreported) bugs.
+ Documentation enhancements.

Inline version 0.32 is a minor upgrade with the following changes:

+ Addition of UNTAINT, SAFEMODE, GLOBAL_LOAD, MAKE, and LDDLFLAGS
   configuration options.
+ Fixed all reported (and some unreported) bugs.
+ Documentation enhancements.

Inline version 0.31 is a minor upgrade with the following changes:

+ "use Inline C;" is now a synonym for "use Inline C => DATA;"
+ Default build/install directory changed from "blib_I/" to ".Inline/"
+ Build/Install directory structure simplified.
   + Short install paths.
   + Build areas in ".Inline/build/" subdirectory.
+ Added 'CC', 'CCFLAGS', 'LD', and 'LDFLAGS' config options to C.
+ More recipes in Cookbook.

Inline version 0.30 is a major upgrade from previous verions. It
includes:

+ Integrated support for typemap files in C.
   + All the recognized types now come *only* from typemaps.
   + The default types come from the default typemap installed with core
Perl.
   + Typemaps are used to modify the Parse::RecDescent grammar for
parsing C.
   + This means you can easily use your existing typemaps.
+ Language support completely separated from base Inline code.
   + Beta supoort for C (Inline::C, included)
   + Alpha support for C++ (Inline::CPP, available separately)
   + Alpha support for Python (Inline::Python, available separately)
   + Support for 'embedding' Perl in C with my new programming language,
CPR.
     (Inline::CPR, available separately) This one may warp your mind :^)
   + Simple API for adding your own language support.
     + Write your own Inline::Foo
     + Write your own implementation of Inline::C, or just modify
       Inline::C::grammar.
   + Support for interpreted languages in addition to compiled ones.
+ Autodetection of new Inline language modules.
+ Much easier and more powerful configuration syntax.
   + More XS and MakeMaker features exposed for configuration (for C and
C++).
+ Flexible new syntax for specifying source code.
   + Use DATA section for AutoLoader, Inline, and POD simultaneously.
+ Support for using Inline 'with' other modules.
   + "use Inline with 'Event';" lets Event.pm pass config info to
Inline.pm.
   + Event.pm 0.80 has built in support for Inline.pm 0.30 and higher.
     + Write Event callbacks in C with extreme ease.
+ More documentation
   + perldoc Inline
   + perldoc Inline-FAQ
   + perldoc Inline-API
   + perldoc Inline::C
   + perldoc Inline::C-Cookbook
+ Better error messages and easier debugging.
+ Mailing list: inline@perl.org

Other features of Inline.pm include:

= Automatically compiles your source code and caches the shared object.
= Automatically DynaLoads the shared object and binds it to Perl.
= Recompiles only when the C code changes.
= Changing the Perl code will not cause a recompile of the C code.
= Support for writing extension modules, suitable for distributing to
the CPAN.
= Support for generating and binding Inline subs at run time. <bind()>
= Works on all Unix and MS Windows configurations.

-------------------------------------------------------------------------------
INSTALLATION:

This module requires the Digest::MD5 and Parse::RecDescent modules. It
also
requires the appropriate C compiler. (Where appropriate means the one
referred
to in your Config.pm)

To install Inline do this:

perl Makefile.PL
make
make test
make install

On ActivePerl for MSWin32, use nmake instead of make. Or just use:
     ppm install Inline

For convenience, Inline::C is packaged with Inline, and will be
automatically
installed as well.

-------------------------------------------------------------------------------
INFORMATION:

= For more information on Inline, see 'perldoc Inline' and 'perldoc
Inline-FAQ'
= For information about Inline::, see 'perldoc Inline::C' and
   'perldoc Inline::C-Cookbook'
= For information on writing your own Inline extension see 'perldoc
Inline-API'
= For information about the Perl5 internal C API, see 'perldoc perlapi'
or
   try http://www.perldoc.com/perl5.6/pod/perlapi.html
= The Fall 2000 edition of The Perl Journal has an article about Inline

The Inline.pm mailing list is inline@perl.org. Send email to
inline-subscribe@perl.org to subscribe.

Please send questions and comments to "Brian Ingerson" <INGY@cpan.org>

Copyright (c) 2001, Brian Ingerson. All Rights Reserved.





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

Date: Sun, 29 Apr 2001 08:40:31 GMT
From: Brian Ingerson <BrianI@ActiveState.com>
Subject: ANNOUNCE: Inline::Filters 0.10
Message-Id: <tepfeflm4v1j8c@corp.supernews.com>

Hi all,

I have just released Inline::Filters to the CPAN. This module contains
common source filters you can use with Inline::C and Inline::CPP. For
example, it contains 'Strip_POD', a filter which strips POD embedded in
your Inline C or C++ code.

You can get Inline::Filters from the following address:

   http://search.cpan.org/search?dist=Inline-Filters

Later,
Neil

 >From the README:

----8<----
INTRODUCTION:

Inline::Filters -- Common source code filters for Inline Modules.

Inline::Filters provides common source code filters to Inline Language
Modules like Inline::C and Inline::CPP.

Example:

    use Inline C => DATA => FILTERS => [Strip_POD => Preprocess];

    print "5 + 7 = ", add(5, 7);

    __END__
    __C__

    =head1 add

    Returns the sum of two integers x and y

    =cut

    #ifdef USE_LONG
    long
    #else
    int
    #endif
    add (int x, int y) { return x + y; }

When run, this complete program prints:

    5 + 7 = 12

-----------------------------------------------------------------------------
FEATURES:

This is the first release of Inline::Filters. It includes these filters:

+ Strip_POD
   + All languages
+ Strip_Comments
   + C
   + C++
   + Java
   + Python
+ Preprocess
   + C
   + C++

-----------------------------------------------------------------------------
INSTALLATION:

This module requires Inline.pm version 0.33 or higher to be installed.

To install Inline::Filters do this:

perl Makefile.PL
make
make test
make install

(On ActivePerl for MSWin32, use nmake instead of make.)

You have to 'make install' before you can run it successfully.

-----------------------------------------------------------------------------
INFORMATION:

- For more information on Inline::Filters see 'perldoc Inline::Filters'.
- For information about Inline.pm, see 'perldoc Inline'.
- For information on using Perl with C see 'perldoc Inline::C'.

The Inline mailing list is inline@perl.org. Send mail to
inline-subscribe@perl.org to subscribe.

Please send questions and comments to "Neil Watkiss" <NEILW@cpan.org>

Copyright (c) 2000, Neil Watkiss. All Rights Reserved.
---->8----





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

Date: Sun, 29 Apr 2001 08:42:28 GMT
From: Brian Ingerson <BrianI@ActiveState.com>
Subject: ANNOUNCE: Inline::Java 0.20
Message-Id: <tepfe6eedri047@corp.supernews.com>

I've just released Inline::Java 0.20 to CPAN

Have fun!

Patrick
-------------------------------------------------------------------------------
INTRODUCTION:

Inline::Java - Write Perl classes in Java.

Inline::Java lets you write Perl classes in Java.

Example:

     use Inline Java => <<'END',
             class JAxH {
                         public JAxH(String x){
                                 System.out.println("Just Another " + x + "
Hacker") ;
                         }
             }
         END

     new JAxH('Inline') ;

When run, this complete program prints:

     Just Another Inline Hacker


-------------------------------------------------------------------------------
JNI (JAVA NATIVE INTERFACE) EXTENSION:

Inline::Java now provides a JNI extension that allows you to load the Java
virtual machine as shared object instead of running it as a separate
process.
This extension works without problems on MSWin32 systems, but requires
rebuilding Perl on Solaris (and possibly in Linux as well) because of
threading issues.

See README.JNI for more information on building the JNI extension.


-------------------------------------------------------------------------------
INSTALLATION:

- This module requires Inline version 0.31 or higher to be installed.
- It also requires a version of the Java SDK 1.2 or higher to be
   installed. You can get the latest Java SDK from Sun Microsystems
   at http://java.sun.com. Follow the provided instructions in order
   to install the Java SDK properly.

To install Inline::Java do this:

perl Makefile.PL
make             (see Note 2)
make test        (see Note 3, 4)
make install

You have to 'make install' before you can run it successfully.


Note 1: Use nmake on Windows systems. If you are using the COMMAND.COM shell
under Windows, Inline::Java will try to detect it. If it doesn't,
you should set the PERL_INLINE_JAVA_COMMAND_COM environment variable
to a true value. You also will need set this whenever you use the module
later on.

Note 2: On Win95/98/Me, you might get and error when doing 'nmake'. If so,
edit 'Makefile' and go the the indicated line. Remove the '@[' and ']' lines
around the 'subdirs' rule's commands. Rerun 'nmake'.

Note 3: In order for 'make test' to run properly, you should put the
directory to your Java binaries in either your PATH environment variable
or in the PERL_INLINE_JAVA_BIN environment variable. 'make test' will
remind
you
if you don't do this.

Note 4: If you have built the JNI extension and want the test suite to use
it, you will need to set the PERL_INLINE_JAVA_JNI environment variable to 1
BEFORE running 'make test'.


-------------------------------------------------------------------------------
FEATURES:

WARNING: THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable.
          It is also possible that some elements of the interface (API) will
          change in future releases.

Inline::Java version 0.20 includes:
+ All public member variables are now exported to Perl.
+ Arrays can now be passed as method parameters and assigned to
   member variables.
+ Type casting is now available to force the selection of specific
   method signatures.
+ Optional JNI (Java Native Interface) extension improves performance.
+ Increased stability on Win32.

Inline::Java version 0.01 includes:
+ All classes and their public methods are exported to Perl, relative
   to your current package.
+ All objects (except arrays) and primitive Java types are supported as
   method parameters.


-------------------------------------------------------------------------------
INFORMATION:

= For more information on Inline::Java, see 'perldoc Inline::Java'.
= For information about Inline, see 'perldoc Inline'.
= For information on using Java, visit http://java.sun.org

The Inline::Java mailing list is inline@perl.org.
Send email to inline-subscribe@perl.org to subscribe.

Please send questions and comments to "Patrick LeBoutillier" <patl@cpan.org>

Copyright (c) 2001, Patrick LeBoutillier. All Rights Reserved.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





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

Date: Mon, 30 Apr 2001 10:37:10 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: Appending to files and flock.
Message-Id: <9cij15$201@netnews.hinet.net>

<nobull> wrote
> If you know you are only going to use a system that does correctly
> implement appending (i.e. not Win32) then you can omit the seek() from
> the above code.

Do you mean Win32's open ">>" is problematic?
Can you give a sample code for me to experiment?
Thank you.

John Lin





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

Date: Mon, 30 Apr 2001 03:51:12 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Boole's tools (was Things I'm just not getting in Perl)
Message-Id: <tepo9glv4e7q07@corp.supernews.com>

Bart Lateur <bart.lateur@skynet.be> wrote:
> Andrew Lee wrote:

>>> Andrew Lee (andrew_lee@nospamearthlink.net) wrote on MMDCCXCVI September
>>
>>Maybe your problem stems from your misuse of Roman Numerals ... either that or I
>>posted the refered to article 795 years from now.

> The roman numerals are the day of the month. Convert to numbers,
> subtract that number of days from your actual posting date, and see what
> Sepember that is. It turns out to be 1993, which Abigail seems to
> consider "the beginning of the end".

Indeed.

1993, the year September never ended.

Read the Jargon File if you have any questions. If you don't
know what the Jargon File is, find it then read it. If you
can't find it, then you may have proven the above statement
to be correct.

I'll bet Abigail's news reader uses Perl to calculate that
number. 

Chris

-- 
For the pleasure of others, please adhere to the following
rules when visiting your park:
    No swimming.  No fishing.  No flying kites.  No frisbees.
    No audio equipment. Stay off grass.  No pets. No running.



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

Date: Mon, 30 Apr 2001 13:21:34 +1000
From: "Chris W" <chrisw+usenet@dynamite.com.au>
Subject: Re: BUG? => Cannot delete file which has more than 19 character <==
Message-Id: <GU4H6.8$uP.15376@news.interact.net.au>

> When the file name length is 19 characters and less,
> the deletion is OK. But when the file name
> is more than 19 chacters, the deletion will FAIL.

IMHO it seems unlikely to be a Perl limitation.

Have you tried manually FTPing to the machine and deleting the file?
If you can't do it this way then it's the FTP server causing the problem.




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

Date: Sun, 29 Apr 2001 20:33:46 -0500
From: "CharlieB" <cbbenefit@hotmail.com>
Subject: COMM Port/ Modem Access
Message-Id: <3aecbdeb_1@newsa.ev1.net>

Can anyone let me in on the secret? I can't figure out how to connect to my
modem from perl and dial a pager number (used for system admin purposes)
under Win32 environment. For example I would like to open COM1 to init the
modem and dial 555-5555 and place 9090 as the numeric page. NE help would be
greatly appreciated.

Thanx,


CharlieB
email me at cbbenefit@nospamhotmail.com REMOVE THE NOSPAM FIRST OBVIOUSLY!




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

Date: Mon, 30 Apr 2001 03:41:48 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How to write a multi process program with perl ?
Message-Id: <x7oftff3zn.fsf@home.sysarch.com>

>>>>> "GT" == Gregory Toomey <gtoomey@usa.net> writes:

  GT> If you've only got 1 CPU, five processes many not run faster than 1
  GT> process - there is only 1 running process at any instant.

please learn about multiprocessing before you make foolish claims like
that. any of the processes could be blocked on a system call or disk i/o
and the others can then run. ever heard of timesharing? :)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Sun, 29 Apr 2001 22:56:15 -0400
From: "Matthew O. Persico" <persicom@acedsl.com>
Subject: Re: pretty-printing perl?
Message-Id: <3AECD44F.FDB87972@acedsl.com>

ivo welch wrote:
> 
> Is there a pretty-printer for perl?  (Preferably, one that also takes pod
> into account.)
> 
> /iaw

Yes.

Xemacs. :-)

(Ducking....)

--
Matthew O. Persico
    
http://www.acecape.com/dsl
AceDSL:The best ADSL in Verizon area


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

Date: Mon, 30 Apr 2001 02:34:53 GMT
From: "Robert Hartley" <roberthartley@mediaone.net>
Subject: problem compiling perl on hpux 10.01
Message-Id: <hb4H6.2643$9j1.1239812@typhoon.ne.mediaone.net>

I'm having problems compiling on hpux10.01 (pa-risc1.1). The build fails at
pp_sys.c line 35. The line begins with a pre-processor (#export ...) I tried
appling the latest patch for libc - no help. Has anyone run into problems
with this platform?




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

Date: Sun, 29 Apr 2001 22:36:06 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: Removing Lines... how's this?
Message-Id: <13383-3AECDDA6-92@storefull-245.iap.bryant.webtv.net>

Well, now I'm embarrassed. I completely forgot about perl's predefined
variable "$.". I like the way you guys do it in one line. I gotta learn
those some day. There's probably at least 10 different ways to remove 3
lines. That may be good for some people, but perl would be less
confusing to me if there was only one way to do something. The language
would be smaller and perhaps run faster too. Well, I doubt if perl will
change, so I guess I'll have to. :-)

Regards,
--Dennis



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

Date: Sun, 29 Apr 2001 23:37:32 -0400
From: "Keith G" <gasper@cis.ohio-state.edu>
Subject: sendmail
Message-Id: <9cimi7$ire$1@news.cis.ohio-state.edu>

i'm looking for a way to get the sendmail module that will
work with active perl for windows. anyone know of a
site that has it? thanks!
keith




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

Date: Sun, 29 Apr 2001 19:33:39 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Simple newbie performance question
Message-Id: <3AECCF03.C14292BD@stomp.stomp.tokyo>

"Charles M. Kozierok" wrote:

> Godzilla! wrote:
> } "Charles M. Kozierok" wrote:

> } > The application in question will need to handle loading and searching
> } > through some fairly large arrays--possibly 50,000 items. For example,
> } > I might need to load a 50,000 line file into a 2D array of say 50,000x10,
> } > with each set of 10 elements corresponding to 10 pieces of data in one line
> } > in the file.  Then I would need to do some pattern matching...


> } Your approach is less than efficient. You would do better
> } to spend your time creating your database specifically
> } for this task, to be read one line at a time via an
> } efficient while loop. Effective database management
> } is critical to almost all types of programming.
 
> Well, I should have specified that the file would be sorted, or
> if I had to I would sort it first. Given that, a quick binary
> search would seem to make sense. Even without that information,
> however, I find the suggestion of a while loop puzzling; it seems
> to me that reading the data into an associative array would be
> far more efficient than an O(n) while loop... maybe I am missing
> something.


Yes, you are missing something. You are missing a reminder
you are new to Perl as previously stated, by you. I question
if you are in a position to present a logical debate regarding
a comparison and contrast of array looping and while looping.

You will be significantly challenged to present valid support
of array slurping being faster and more efficient than use of
while looping, for these circumstances of a large data read.

As to sorting, it is inappropriate of you to not state clear
and concise parameters, initially. This is not a good practice
pertaining to programming dialog. Computer programming is a
well recognized science and should be treated as such, which
includes following long standing conventions in stating very
precise parameters, before discussion of methodology.

Sorting is irrelevant. A while loop can be used most effectively
to criteria sort during a read of a database.


Godzilla!


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

Date: Mon, 30 Apr 2001 03:07:25 GMT
From: ixlu@PCGuide.com (Charles M. Kozierok)
Subject: Re: Simple newbie performance question
Message-Id: <NF4H6.820$Be3.85134@news.shore.net>

In article <3AECCF03.C14292BD@stomp.stomp.tokyo>,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
} "Charles M. Kozierok" wrote:
} > Well, I should have specified that the file would be sorted, or
} > if I had to I would sort it first. Given that, a quick binary
} > search would seem to make sense. Even without that information,
} > however, I find the suggestion of a while loop puzzling; it seems
} > to me that reading the data into an associative array would be
} > far more efficient than an O(n) while loop... maybe I am missing
} > something.
} 
} Yes, you are missing something. You are missing a reminder
} you are new to Perl as previously stated, by you. I question
} if you are in a position to present a logical debate regarding
} a comparison and contrast of array looping and while looping.

I said that I was new to Perl, but that I was not new to programming.

I don't believe that there is anything particular to Perl that would
make using an O(n) while loop to do multiple searches in a large
file sensible.  There are just too many superior ways to do this,
including using a hash and using a binary search.

At any rate, your tone is quite confrontational and I suspect that
nothing productive is likely to result from taking this any further,
so I will stop with this post. If anyone else has anything to
contribute, I'll be happy to consider it. Meanwhile, I continue
to research the subject offline.

cheers,

-*-
Charles M. Kozierok (mailto:ixl@PCGuide.com)
Webslave, The PC Guide - <http://www.PCGuide.com>
Comprehensive PC Reference, Troubleshooting, Optimization and Buyer's Guides...


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

Date: Sun, 29 Apr 2001 20:18:28 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Simple newbie performance question
Message-Id: <3AECD984.C58A951D@stomp.stomp.tokyo>

"Charles M. Kozierok" wrote:

> Godzilla! wrote:
> } "Charles M. Kozierok" wrote:


(snipped)


> } Yes, you are missing something. You are missing a reminder
> } you are new to Perl as previously stated, by you. I question
> } if you are in a position to present a logical debate regarding
> } a comparison and contrast of array looping and while looping.
 
> I said that I was new to Perl, but that I was not new to programming.

 
Clearly you are not new to posting troll articles, as well.

* demure smile *

Godzilla!


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

Date: Mon, 30 Apr 2001 12:01:37 +1000
From: "Michael R. McPherson" <mrp@hafatel.com>
Subject: TEST
Message-Id: <9cihbe01i5j@enews1.newsguy.com>







##############Þ
print "\n Welcome to NEPP";$Þ=1;while ($Þ){
print "\n$Þ";$Þ++;if ($Þ == 1000) {
print "\n$Þ"."\nWell almost never ending :þ";exit;}}
##############Þ




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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.

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 V10 Issue 797
**************************************


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