[18833] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1001 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 28 03:05:37 2001

Date: Mon, 28 May 2001 00:05:09 -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: <991033508-v10-i1001@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 28 May 2001     Volume: 10 Number: 1001

Today's topics:
    Re: ? The best Perl book ? <pne-news-20010528@newton.digitalspace.net>
    Re: ? The best Perl book ? (Randal L. Schwartz)
        ANNOUNCE: Inline 0.40 Major Release <BrianI@ActiveState.com>
    Re: GD::Graph, CGI  (Martien Verbruggen)
        Generating WML content? <steffi@shell8.ba.best.com>
    Re: hash array nobull@mail.com
    Re: How would have solved this problem? <godzilla@stomp.stomp.tokyo>
    Re: Is there such as thing as an array of structures in <slams@penguin.rutgers.edu>
    Re: Is there such as thing as an array of structures in (Eric Bohlman)
    Re: Locking files in CGI fails (or not?) (Alan Barclay)
    Re: PDF Files <jason@uklinux.net>
        Perl 5.6.1 install 'make depend' loop problem... <tim@gmi2.com>
    Re: Perl Compilers <pne-news-20010528@newton.digitalspace.net>
    Re: Permuting days of the week <c_clarkson@hotmail.com>
        Problems With Form Sending Ted@iheath.co.uk
    Re: Question on the "use strict" pragma <comdog@panix.com>
    Re: Search and Replace <goldbb2@earthlink.net>
    Re: search keywords for text analysis tools (Guy Worthington)
    Re: search keywords for text analysis tools <brad.morrison@mincom.com>
    Re: search keywords for text analysis tools (Eric Bohlman)
        Searching Flat Text File <newwave@ACMEmail.net>
    Re: Searching Flat Text File <krahnj@acm.org>
    Re: Searching Flat Text File <comdog@panix.com>
    Re: typeglob nobull@mail.com
    Re: use Time::localtime; inside require packages nobull@mail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 28 May 2001 07:16:36 +0200
From: Philip Newton <pne-news-20010528@newton.digitalspace.net>
Subject: Re: ? The best Perl book ?
Message-Id: <rgk3htk16h73d3qtsrh3ap2j38qs78jgq9@4ax.com>

On Sun, 27 May 2001 16:05:56 -0400, tadmc@augustmail.com (Tad McClellan)
wrote:

> Chris <chrisl_ak@hotmail.com> wrote:
> >
> >the _Effective Perl
> >Programming_ book whose author escapes me.
>                          ^^^^^^
> 
> Joseph Hall

"with Randal L. Schwartz"

(whatever "with", as opposed to "and", means)

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: 27 May 2001 23:31:28 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ? The best Perl book ?
Message-Id: <m1lmnit267.fsf@halfdome.holdit.com>

>>>>> "Philip" == Philip Newton <pne-news-20010528@newton.digitalspace.net> writes:

>> Chris <chrisl_ak@hotmail.com> wrote:
>> >
>> >the _Effective Perl
>> >Programming_ book whose author escapes me.
>> ^^^^^^
>> 
>> Joseph Hall

Philip> "with Randal L. Schwartz"

Philip> (whatever "with", as opposed to "and", means)

It means I did darn little, except for helping Joseph get his start as
a published writer, including initial organization and negotiations
with the publisher, and I tech-edited the draft a few times.  The
writing is mostly Joseph's, with my literal contributions being
limited to the discussion of the Schwartzian Transform and the printf
appendix, as well as the few paragraph foreword to introduce Joseph to
you all.

print "Just another Perl hacker,"
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 28 May 2001 06:25:52 GMT
From: Brian Ingerson <BrianI@ActiveState.com>
Subject: ANNOUNCE: Inline 0.40 Major Release
Message-Id: <th3sd4auj2g42f@corp.supernews.com>

I am pleased to announce the release of Inline-0.40.

This is a major release for Inline. Possibly the most important one to
date. That's because you can now create CPAN extension modules that look
and behave just like ones written in XS. In prior versions of Inline,
writing extension modules was possible, but problematic. The official
word on the Inline mailing list was "wait for version 0.40". The wait is
over.

The new features of Inline-0.40 include:

1) Inline::MakeMaker. This is a drop-in replacement for
ExtUtils::MakeMaker. It actually loads the ExtUtils counterpart, but
grabs control long enough to make sure that the generated Makefile is
"Inline aware".
2) Short file names for objects. For instance a typical module in 0.34
might have produced an object called:


auto/Foo_C_3cee729d1d942c6792ca5a741dc21879/Foo_C_3cee729d1d942c6792ca5a741dc21879.so

with 0.40 it would be:

     auto/Foo/Foo.so

3) An object validation file. For the object above you'd get:

     auto/Foo/Foo.inl

which might contain:

     md5 : 3cee729d1d942c6792ca5a741dc21879
     name : Foo
     version : ""
     language : C
     language_id : C
     installed : 0
     date_compiled : Sun May 27 18:52:27 2001
     inline_version : 0.40
     ILSM : %
         module : Inline::C
         suffix : so
         type : compiled
     Config : %
         apiversion : 5.6.1
         archname : i686-linux-thread-multi
         cc : gcc
         ccflags : -D_REENTRANT ...
         ld : gcc
         osname : linux
         osvers : 2.2.17
         so : so
         version : 5.6.1

4) Support for creating binary distributions. Even ones without the C
source.
5) Support for Damian Conway's new module: Inline::Files.

The net effect of all this is that you can now create a C-based
extension module for CPAN called Math::Simple and it would look like:

---8<--- (Simple.pm)
package Math::Simple;
use strict;
require Exporter;
@Math::Simple::ISA = qw(Exporter);
@Math::Simple::EXPORT = qw(add subtract);
$Math::Simple::VERSION = '1.23';

use Inline (C => DATA =>
             NAME => 'Math::Simple',
             VERSION => '1.23',
            );
1;
__DATA__
__C__
int add (int x, int y) {
     return x + y;
}
int subtract (int x, int y) {
     return x - y;
}
---8<---

And the Makefile.PL would look like:

---8<---
use Inline::MakeMaker;

WriteMakefile( NAME => 'Math::Simple',
                VERSION_FROM => 'Simple.pm',
              );
---8<---

And that's it. Just add a MANIFEST, a README, a test harness (test.pl)
and some POD doc. Run 'make dist', and ship it.

Now please don't actually *do* that with Math::Simple or I'll be hearing
about it for the rest of time.

NOTE: For your convenience I've included all the Math::Simple files in
the distribution, just in case you want to play with them.

---

This release has been in a pre-release test cycle for the past two
weeks. It has undergone 9 revisions. Many thanks to the members of
inline@perl.org who helped me iron out the wrinkles.

Also please note that this release breaks compatability with all of the
other Inline::* modules (like Inline::Java for instance). The authors of
these modules are all aware of this and will submit upgrades to their
software within the next couple days. If you use any of these modules,
please wait for the upgrades before installing Inline-0.40.

Finally, be assured that the public interface has not changed. Your
existing code should work fine with this release.

The README follows.

Enjoy, Brian Ingerson

--------------------------------------------------------------------
INTRODUCTION:

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

Inline lets you write Perl subroutines in other programming languages
like C, C++, Java, Python, Tcl and even Assembly. 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::Files;
     use Inline C;
     print JAxH('Inline'), "\n";

     __C__
     SV* JAxH(char* x) {
         return newSVpvf ("Just Another %s Hacker",x);
     }

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.40 is a major upgrade. It includes:
+ Inline::MakeMaker
   + Rock solid support for writing CPAN extension modules
+ Short file names.
   + No more
_Inline/lib/auto/Foo_C_3cee729d1d942c6792ca5a741dc21879/Foo_C_3cee729d1d942c6792ca5a741dc21879.so
   + Now it's _Inline/lib/auto/Foo/Foo.so
+ Support for creating binary distributions.
   + Can even do it without shipping C source code.
+ Support for Damian Conway's Inline::Files
   + No more __END__ markers.
+ Safe new config and caching format.
   + Similar to Data::Denter format
+ New Inline-FAQ.pod.

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: Mon, 28 May 2001 04:06:21 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: GD::Graph, CGI 
Message-Id: <slrn9h3jlt.div.mgjv@verbruggen.comdyn.com.au>

On Fri, 25 May 2001 11:23:42 -0600,
	John Lien <jlien@friedwire.com> wrote:
> 
> Hi.
> 
> I'm trying to use GD::Graph in a CGI script.  I've used both modules
> separately successfully, but I've had no luck using them together.  I
> know I'm very close to having this working.  The script and versions are
> below.
> 
> The goal is to call the script in an IMG tag like this:
><img src="cgi-bin/test.pl">
> 
> The problem is I just get a broken or not found image symbol.

Any error messages in the web server logs?

> o I've tried every path I can think of in the SRC tag.  I've tested the
> absolute url in the browser itself (http://mysite.com/cgi-bin/test.pl)
> and the script executes by nothing is retured.

nothing? Or an empty page? What's the message, if any?

> 
> print STDOUT header("image/jpeg");
> binmode STDOUT;

For correctness sake, you should probably reverse these two lines.
binmode should be called on a file handle before any output is done.
On your platform it probably makes no difference, but the
documentation is still specific about this.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd.   | bundled with your Microsoft product.
NSW, Australia                  | 


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

Date: Mon, 28 May 2001 06:26:24 GMT
From: Robert Nicholson <steffi@shell8.ba.best.com>
Subject: Generating WML content?
Message-Id: <yl3r8xam1kf.fsf@shell8.ba.best.com>

OK, I'm forced to split my cards across multiple decks becuase of the
phone limitations so since I'm generating dynamic data I'm asking what
approach do people use when they have to generate .wml files from dynamic
content to deliver to the browser?

Specifically how to clean up your generated files and are you just using
the process ID and including that in the url's to the documents?

What's the typical way to handle contention issues for generated content?


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

Date: 27 May 2001 15:53:50 +0100
From: nobull@mail.com
Subject: Re: hash array
Message-Id: <u9vgmmetc1.fsf@wcl-l.bham.ac.uk>

Philip Newton <pne-news-20010526@newton.digitalspace.net> writes:

> On Sat, 26 May 2001 05:10:05 GMT, Gisle Aas <gisle@ActiveState.com>
> wrote:
> 
> > You can also get that number with code like this:
> > 
> >   $size = do { local $hash{x} = 1; (split "/", %hash)[1] };
> 
> Unless the hash happened to be "full", and your addition of the key 'x'
> caused it to double its buckets?

Since it is a given that the hash is empty it is unlikely to also be
full (unless it has always been empty).

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sun, 27 May 2001 23:01:13 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: How would have solved this problem?
Message-Id: <3B11E9A9.781BD413@stomp.stomp.tokyo>

Robert Nicholson wrote:
 
> I managed to get done what I wanted but I'm very interested to learn
> about other ways to solve this problem. 

(snipped)

Below my signature you will find a method which uses
only one module and only one array along with a single
parsing loop. You will discover this method is very
quick, very efficient and very easy to maintain. This
is especially true when my method is compared to other
methods which employ multiple modules, multiple arrays,
multiple hashes, multiple sub-routines and so forth.

My loop substitutions could be optimized a bit but
this is of no concern to me being an example. I have
added a few html tags to show how you could add your
table tags. I always caution against use of table
tags. A number of years back, both Microsoft and
Mozilla issued warnings about excessive use of
table tags crashing systems with thirty-two megabytes
or RAM or less. Table tags significantly slow loading
of a web page and impose an unwarranted burden on
personal computer RAM needs. Avoid table tags when
you can or use them lightly.

I didn't bother with adding a date stamp for my print.
This is very easy to do and doesn't need exemplification.

For testing, I downloaded the document source for this
page you reference and named it "cinema.htm" for use.
I use my Fetch sub-routine to simulate a LWP get request.

Remove these lines completely:

&Fetch;

sub Fetch
 {
  local ($/);
  open (CINEMA, "cinema.htm");
  $input = <CINEMA>;
  close (CINEMA);
 }

 ...and uncomment my two LWP calls for internet use.


Godzilla!
--


#!perl

print "Content-type: text/plain\n\n";

## use LWP::Simple;

&Fetch;

sub Fetch
 {
  local ($/);
  open (CINEMA, "cinema.htm");
  $input = <CINEMA>;
  close (CINEMA);
 }

## $input = get ("http://www.majorcineplex.com/showtimes/index.php3");

substr ($input, 0, index ($input, "pin1"), "");

$pin1 = substr ($input, 0, index ($input, "suk1"), "");
$suk1 = substr ($input, 0, index ($input, "rat1"), "");
$rat1 = substr ($input, 0, index ($input, "ram1"), "");
$ram1 = substr ($input, 0, index ($input, "wor1"), "");
$wor1 = substr ($input, 0, index ($input, "chiangmai2"), "");

$pin1 = "Pinklao¦$pin1";
$suk1 = "Sukhumvit Ekkamai¦$suk1";
$rat1 = "Ratchayothin¦$rat1";
$ram1 = "Ramkhamhaeng¦$ram1";
$wor1 = "World Trade Center¦$wor1";
$chiangmai2 = "Airport Plaza Chaing Mai¦$input";


@Cinema = ($pin1, $suk1, $rat1, $ram1, $wor1, $chiangmai2);

foreach $cinema (@Cinema)
 {
  ($movie_center, $cinema_name) = split (/¦/, $cinema);
  $cinema_name =~ s/<[^<]*>//g;
  $cinema_name =~ s/[\n\s]+/ /g;
  substr ($cinema_name, 0, index ($cinema_name, ">") + 1, "");
  $cinema_name = substr ($cinema_name, 0, rindex ($cinema_name, "&nbsp;"));
  $cinema_name =~ s/[^a-z0-9:\- ]//gi;
  $cinema_name =~ s/nbsp+//g;
  substr ($cinema_name, 0, index ($cinema_name, "1") + 1, "1");
  $cinema_name =~ s/1\s+//;
  $cinema_name =~ s/([\d]+) ([A-Z])/<BR>\nCinema $1:<BR>\n Movie: $2/g;
  $cinema_name =~ s/([A-Z]) (\d)/$1 Time: $2/g;
  print "$movie_center<P>\n\n$cinema_name\n\n\n";
 }

exit;


PRINTED RESULTS:
________________

Pinklao<P>

<BR>
Cinema 1:<BR>
 Movie: DRIVEN Time: 11:20 13:50 16:20 18:50 21:20 <BR>
Cinema 2:<BR>
 Movie: SWEET NOVEMBER Time: 11:50 14:20 16:50 19:20 21:50 <BR>
Cinema 3:<BR>
 Movie: FAUST Time: 11:40 13:45 15:50 17:55 20:00 22:05 <BR>
Cinema 4:<BR>
 Movie: ANTI - TRUST Time: 13:55 18:00 20:15 22:35 <BR>
Cinema 4:<BR>
 Movie: SPY KIDS Time: 12:00 16:10 <BR>
Cinema 5:<BR>
 Movie: GET OVER IT Time: 11:00 12:55 14:50 16:45 18:40 20:35 22:30 <BR>
Cinema 6:<BR>
 Movie: SPY KIDS Time: 11:20 13:15 15:10 17:05 19:00 21:00 <BR>
Cinema 7:<BR>
 Movie: DRT AND THE WOMEN Time: 11:10 13:35 16:00 18:25 20:50 <BR>
Cinema 8:<BR>
 Movie: DRIVEN Time: 12:10 14:40 17:15 19:45 22:15 


Sukhumvit Ekkamai<P>

<BR>
Cinema 1:<BR>
 Movie: SPY KIDS Time: 11:30 13:25 15:20 17:15 19:10 21:05 <BR>
Cinema 2:<BR>
 Movie: ALONG CAME A SPIDER Time: 11:50 13:55 17:55 21:55 <BR>
Cinema 2:<BR>
 Movie: SPY KIDS Time: 16:00 20:00 <BR>
Cinema 3:<BR>
 Movie: ANTI - TRUST Time: 14:15 16:40 21:00 <BR>
Cinema 3:<BR>
 Movie: FAUST Time: 12:10 18:55 <BR>
Cinema 4:<BR>
 Movie: DRIVEN Time: 12:00 14:30 17:00 19:30 22:10 <BR>
Cinema 5:<BR>
 Movie: GET OVER IT Time: 11:00 12:50 14:40 16:30 18:20 20:10 22:00 <BR>
Cinema 6:<BR>
 Movie: DRIVEN Time: 11:10 13:40 16:10 18:40 21:10 <BR>
Cinema 7:<BR>
 Movie: SWEET NOVEMBER Time: 11:40 14:10 16:50 19:20 21:50 <BR>
Cinema 8:<BR>
 Movie: DRT AND THE WOMEN Time: 11:20 13:50 16:20 18:50 21:20 


Ratchayothin<P>

<BR>
Cinema 1:<BR>
 Movie: GET OVER IT Time: 11:40 13:35 15:30 17:25 19:20 21:15 <BR>
Cinema 2:<BR>
 Movie: THE GIFT Time: 11:50 14:05 16:20 18:35 20:50 <BR>
Cinema 3:<BR>
 Movie: DRIVEN Time: 11:00 13:30 16:00 18:30 21:00 <BR>
Cinema 4:<BR>
 Movie: SPY KIDS Time: 11:30 13:25 15:20 17:15 19:10 21:05 <BR>
Cinema 5:<BR>
 Movie: DRIVEN Time: 12:40 15:10 17:40 20:10 22:40 <BR>
Cinema 6:<BR>
 Movie: ANTI - TRUST Time: 11:20 13:35 15:50 18:05 20:20 22:35 <BR>
Cinema 7:<BR>
 Movie: DRIVEN Time: 11:50 14:20 16:50 19:20 21:50 <BR>
Cinema 8:<BR>
 Movie: FAUST Time: 11:10 13:30 15:25 17:30 19:35 21:40 <BR>
Cinema 9:<BR>
 Movie: SPY KIDS Time: 12:10 14:05 16:00 17:55 19:50 21:45 <BR>
Cinema 10:<BR>
 Movie: ENEMY AT THE GATE Time: 18:20 <BR>
Cinema 10:<BR>
 Movie: EXIT WOUNDS Time: 16:15 <BR>
Cinema 10:<BR>
 Movie: GTO Time: 11:40 14:00 20:55 <BR>
Cinema 11:<BR>
 Movie: ALONG CAME A SPIDER Time: 12:10 14:30 16:40 19:00 21:30 <BR>
Cinema 12:<BR>
 Movie: DRT AND THE WOMEN Time: 11:20 13:50 16:20 18:50 21:20 <BR>
Cinema 14:<BR>
 Movie: SWEET NOVEMBER Time: 11:10 13:40 16:10 18:40 21:10 


Ramkhamhaeng<P>

<BR>
Cinema 1:<BR>
 Movie: GET OVER IT Time: 11:10 13:00 14:50 16:40 18:30 20:20 22:10 <BR>
Cinema 2:<BR>
 Movie: DRT AND THE WOMEN Time: 11:30 13:55 16:20 18:45 21:10 <BR>
Cinema 3:<BR>
 Movie: DRIVEN Time: 12:30 15:00 17:30 20:00 22:30 <BR>
Cinema 4:<BR>
 Movie: SPY KIDS Time: 11:20 13:15 15:10 17:05 19:00 20:55 22:50 <BR>
Cinema 5:<BR>
 Movie: SWEET NOVEMBER Time: 11:00 13:25 15:50 18:15 20:40 23:05 <BR>
Cinema 6:<BR>
 Movie: DRIVEN Time: 11:40 14:10 16:40 19:10 21:40 <BR>
Cinema 7:<BR>
 Movie: ANTI - TRUST Time: 11:50 16:10 20:30 22:45 <BR>
Cinema 7:<BR>
 Movie: FAUST Time: 14:05 18:25 


World Trade Center<P>

<BR>
Cinema 1:<BR>
 Movie: DRT AND THE WOMEN Time: 11:10 13:35 16:00 18:25 20:50 <BR>
Cinema 2:<BR>
 Movie: SWEET NOVEMBER Time: 11:30 14:00 16:40 19:10 21:40 <BR>
Cinema 3:<BR>
 Movie: DRIVEN Time: 11:50 14:20 16:50 19:20 21:50 <BR>
Cinema 4:<BR>
 Movie: SPY KIDS Time: 11:20 13:15 15:10 17:05 19:00 21:00 <BR>
Cinema 5:<BR>
 Movie: GET OVER IT Time: 11:00 12:50 14:40 16:30 18:20 20:10 22:00 <BR>
Cinema 6:<BR>
 Movie: ALONG CAME A SPIDER Time: 20:20 <BR>
Cinema 6:<BR>
 Movie: ANTI - TRUST Time: 11:40 15:55 22:25 <BR>
Cinema 6:<BR>
 Movie: FAUST Time: 13:55 18:10 


Airport Plaza Chaing Mai<P>

<BR>
Cinema 1:<BR>
 Movie: SPY KIDS Time: 11:50 13:40 15:30 17:20 19:20 21:10 <BR>
Cinema 2:<BR>
 Movie: ANTI - TRUST Time: 14:10 18:25 20:40 <BR>
Cinema 2:<BR>
 Movie: FAUST Time: 12:10 16:25 <BR>
Cinema 3:<BR>
 Movie: GET OVER IT Time: 11:40 13:30 15:20 17:10 19:10 21:00 <BR>
Cinema 4:<BR>
 Movie: DRT AND THE WOMEN Time: 12:00 14:20 16:40 19:00 21:30 <BR>
Cinema 5:<BR>
 Movie: DRIVEN Time: 11:30 13:50 16:10 18:30 20:50 <BR>
Cinema 6:<BR>
 Movie: SWEET NOVEMBER Time: 11:50 14:10 16:30 18:50 21:20 <BR>
Cinema 7:<BR>
 Movie: DRIVEN Time: 12:20 14:40 17:00 19:30


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

Date: Sun, 27 May 2001 23:15:07 -0400
From: "Alistair Y. Lewars" <slams@penguin.rutgers.edu>
To: Chris Newman <chris_newman@bigpond.com>
Subject: Re: Is there such as thing as an array of structures in Perl?
Message-Id: <Pine.LNX.4.33.0105272250020.16625-100000@penguin.rutgers.edu>

On Mon, 28 May 2001, Chris Newman wrote:

> I come from using C++ where I use these regularly but have not seen a
> mention of these in any of the books I have read for example Learning Perl.
> Perl 5 by example
>
>

Yup.  I recommend getting _Programming Perl_ by O'Reilly. Or,
read the man pages: perldsc.

-- 
Alistair Y. Lewars
slams@penguin.rutgers.edu



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

Date: 28 May 2001 06:15:36 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Is there such as thing as an array of structures in Perl?
Message-Id: <9esqe8$1k5$7@bob.news.rcn.net>

Chris Newman <chris_newman@bigpond.com> wrote:
> I come from using C++ where I use these regularly but have not seen a
> mention of these in any of the books I have read for example Learning Perl.
> Perl 5 by example

The Perl construct analogous to (but not implemented the same as) a C or
C++ array of structs is what's commonly called a "list of hashes" (LoH),
though it's really an array of references to hashes.  Such a thing is
discussed at length in perlreftut, perlref, perllol (the "lol" stands for
"list of lists"), and perldsc.



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

Date: 28 May 2001 02:38:23 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: Locking files in CGI fails (or not?)
Message-Id: <991017544.245648@elaine.furryape.com>

In article <slrn9h1uai.8jk.tadmc@tadmc26.august.net>,
Tad McClellan <tadmc@augustmail.com> wrote:
>Klax <galileoweb@hotmail.com> wrote:
>>  while (-e $lockfile && time < $endtime) 
>>   {
>>    # Do Nothing                                    
>>   }                                                   
>>   open(LOCK_FILE, ">$lockfile");                     
>
>
>   open(LOCK_FILE, ">$lockfile") or die "could not open '$lockfile'  $!";
>
>
>>}
>
>
>That code does *not* ensure that the program with the lock has
>finished before this copy of the program gets the lock.
>
>The program with the lock gets 60 seconds, then it loses its lock
>whether it is finished or not.

Also, even if this was fixed, there is a race condition.  Inbetween the
-e test and the open(), it's possible for another program to create a
lock file.

If you wish to use files as a locking method, then the test & the
creation must be an atomic operation.


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

Date: Sun, 27 May 2001 14:36:38 +0100
From: Jason Clifford <jason@uklinux.net>
Subject: Re: PDF Files
Message-Id: <Pine.LNX.4.30.0105271434440.6441-100000@s1.uklinux.net>

On Sat, 26 May 2001, Bernhard Sept, BHS Schulungen wrote:

> I have to create pdf files on the Server side - I will / have to use PERL as
> language.
> Are there any tool out there to help me on that subject?

CPAN (http://search.cpan.org/) is your friend. The PDF package/module can
be used to manipulate and create PDF files.

Jason Clifford
Linux Consultants Ltd



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

Date: Mon, 28 May 2001 02:08:01 GMT
From: "Tim Lambertus" <tim@gmi2.com>
Subject: Perl 5.6.1 install 'make depend' loop problem...
Message-Id: <5qiQ6.80562$eK2.16868775@news4.rdc1.on.home.com>

I've tried installing Perl 5.6.1 on FreeBSD 4.3 numerous times now, and i
keep getting a looping problem when it gets to make depend.  Many 'make'
processes are spawned until they eat up all the system resources.  Any
suggestions would be greatly appreciated.  Here's what happens:

/bin/sh Makefile.SH
Extracting Makefile (with variable substitutions)
sh ./makedepend.SH
Extracting makedepend (with variable substitutions)
make depend MAKEDEPEND=
sh ./makedepend.SH
Extracting makedepend (with variable substitutions)
sh ./makedepend MAKE=make
/bin/sh Makefile.SH
Extracting Makefile (with variable substitutions)
sh ./makedepend.SH
Extracting makedepend (with variable substitutions)
make depend MAKEDEPEND=
sh ./makedepend.SH
Extracting makedepend (with variable substitutions)
sh ./makedepend MAKE=make


etc. etc.

-- tim




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

Date: Mon, 28 May 2001 07:16:35 +0200
From: Philip Newton <pne-news-20010528@newton.digitalspace.net>
Subject: Re: Perl Compilers
Message-Id: <aak3ht8c8a2mfmr368tcrt72fjrb81ksoc@4ax.com>

On 27 May 2001 10:39:46 -0700, merlyn@stonehenge.com (Randal L.
Schwartz) wrote:

> >>>>> "Philip" == Philip Newton <pne-news-20010527@newton.digitalspace.net> writes:
> Philip> From what I hear, they're also good for turning a Perl script into a
> Philip> stand-alone file: one that you can give to someone without a Perl
> Philip> interpreter.
> 
> But you're also giving them the Perl interpreter, except that it can
> be used only with that one program!  It'd be better to simply use
> the free install of Perl, and give them the Perl program, than
                                                           ^
                                        and all the modules they need,

> to bundle the entire Perl distribution with each and every program
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> you want to hand around.  That's ludicrous.

I believe perl2exe and perlapp and whatever is around do *not* bundle
the entire Perl distribution; only the modules that are needed. So if
the script doesn't use Tie::Scalar or IO::Socket or Data::Dumper or
Devel::Peek or whatever, those don't get bundled. On the other hand, if
the script *does* use Obscure::CPAN::Module, then that should get
bundled -- saving some newbie who "just wants to use it" the trouble of
understanding `perl -MCPAN -e install O::C::M` or `ppm install O-C-M`
(possibly multiple times: once for every Obscure::CPAN::Module).

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: Mon, 28 May 2001 00:40:55 -0500
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: Permuting days of the week
Message-Id: <C19E6775B8104E94.CF718925CA7FA760.C185D8DB18CC56C4@lp.airnews.net>

James Weisberg <chadbour@wwa.com> wrote
: Randal L. Schwartz <merlyn@stonehenge.com> wrote:
: >>>>>> "James" == James Weisberg <chadbour@wwa.com> writes:
: >James>    Given the days of the week: Sun, Mon, Tue, Wed,
: >James> Thu, Fri, Sat
: >James> I would like to take various permuations and
: >James> sequences of those strings and fill the days in
: >James> between. Examples:
: >
: >James> Sun-Sat = "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
: >James> Mon-Sun = "Mon,Tue,Wed,Thu,Fri,Sat,Sun"
: >James> Wed-Tue = "Wed,Thu,Fri,Sat,Sun,Mon,Tue"
: >James> etc, and sub-sequences:
: >James> Sun-Tue = "Sun,Mon,Tue"
: >James> Fri-Sun = "Fri,Sat,Sun"
: >James> etc.
: >James>    So a function like fill($from, $to) would fill
: >James> up to seven days $from - $to and $from != $to so
: >James> Mon-Mon, for example, is invalid.
:
: [...]
: > If it's not a homework problem, you'll need to provide
: > a little more context.
:
:    Not a homework problem, but without context I phrased
: it as a simple challenge to the group. Obviously there's
: a straightfoward way to program this, I just wanted to
: see what tricks you hackers might employ.
:    With context, there's not much to it. I have
: command-line arguments to a program which pulls records
: out of databases on disk and I want to be able to include
: or exclude certain ranges of days/dates. I've handled the
: dates, now I considering days of the week. I want to
: support a simple range syntax like Fri-Sun, for instance.
: I could ask the same question for months of the year as
: well (e.g. Mar-Nov).

    Maybe 2 subs, one for generic lists and one to
specialize:

sub sub_list {
 my ($first, $last) = split /-/, shift;
 my $list = shift;
 my %list;
 @list{@$list} = (0 .. $#$list);
 return unless exists $list{$first} && exists $list{$last};
 ($first, $last) = @list{$first, $last};
 $last += @$list if $last < $first;
 return [(@$list, @$list)[$first .. $last]];
}

sub day_list {
 return @{sub_list shift, [qw(Sun Mon Tue Wed Thu Fri Sat)]};
}

sub month_list {
 return @{sub_list shift,
   [qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)]};
}

sub week_of_year_list {
 return @{sub_list shift, [1 .. 52]};
}

print join ', ', day_list 'Fri-Thu';
print "\n";
print join ', ', month_list 'Oct-May';
print "\n";
print join ', ', month_list 'May-Oct';
print "\n";
print join ', ', week_of_year_list '48-6';


HTH,
Charles K. Clarkson


Language is the dress of thought. - Samuel Johnson





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

Date: Mon, 28 May 2001 06:07:57 GMT
From: Ted@iheath.co.uk
Subject: Problems With Form Sending
Message-Id: <3b11e9f5.2389163@news.freeserve.net>

I have recently changed my site host from a UNIX to Windows server. I
am now having serious problems getting any of my feedback forms to
work anymore. The path to perl, I have been told, is the root
directory where I have my htm files and was told by the new web hosts
that my old cgi forms should be working. The problem is that none of
my forms are E-mailed to me any more although to the user they appear
to be working properly. Can anyone please send me a script that I can
use on the Windows server that a total idiot... like me, could use to
replace the sendmail forms that I was using?

Many thanks! 


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

Date: Sun, 27 May 2001 21:27:45 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Question on the "use strict" pragma
Message-Id: <comdog-56F2B1.21274527052001@news.panix.com>

In article <3b119b89$1@news.iprimus.com.au>, "Andrew Hamm" 
<ahamm.NO$PAM@sanderson.NO$PAM.net.au> wrote:

> Mark Jason Dominus wrote in message <3b0e8f49.1eaa$3b2@news.op.net>...

> >I don't understand why people keep saying this, because 'strict refs'
> >is obviously a run-time check.  Have you run a benchmark?  Do you know
> >that the time is negligible?


> But, without calling anyone a monkey, can you prove that strict barewords
> and strict vars is runtime too? They're an important part of the three-piece
> set.
> 
> barewords: if a bare identifier is seen and it's not a known subroutine -
> failure. Sounds like a compiler job to me.
> 
> vars: if a $var (or %var or @VAR) is seen and it's not a my or declared by
> use vars - failure. Sounds like a compiler job to me.
> 
> Now who's a monkey?

well, you are.  mjd never said anything about those two checks being
runtime.

furthermore, it doesn't matter what it sounds like to you - it
matters what it is.  when it comes to those matters you should do
your homework before going up against mjd.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Sun, 27 May 2001 23:08:33 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Search and Replace
Message-Id: <3B11C130.45A56336@earthlink.net>

[crossposted to comp.lang.perl.misc, as this has nothing to do with any
modules.  Please remove c.l.p.modules from any replys]

felan wrote:
> 
> I have the following program that prompts for a file name and searches
> and replaces strings in a given filen:

#! perl -w
use strict;

> print "Input file name: ";
> chop($infilename = <STDIN>);

Why are you using chop, not chomp?

> print "Output file name: ";
> chop($outfilename = <STDIN>);

And here.

> open(IN,$infilename) ||
>         die "cannot open $infilename for reading: $!";

You should be more carefuly when opening files based on user input. 
What happens if someone passes something like ">blah" as the infile?

	open( IN, "<", $infilename ) or ...

	open( IN, "< $infilename" ) or ...

	use Fcntl; # this near the top of your program
	sysopen( IN, $infilename, O_RDWR );

> die "will not overwrite $outfilename" if -e $outfilename;
> open (OUT,">$outfilename") ||
>         die "cannot create $outfilename: $!";

If the $outfilename from the user starts with ">", can be made to append
to an existing file, rather than creating an new file.

	open( OUT, "> $outfilename") || ...

	open( OUT, ">", $outfilename ) || ...

	use Fcntl; # this line near the top of your program
	sysopen( OUT, $outfilename, O_RDWR|O_CREAT|O_EXCL );

Note that by adding the O_CREAT and O_EXCL flags to sysopen, you can
eliminate need for the line "will not overwrite..."

> while (<IN>) {  # read a line from file IN into $_
>         s/Mother:/Father:/gi;

The /g indicates to replace all instances of "Mother:" in your string...
is this really what you want, or would you prefer to replace only the
first instance?  The /i means to ignore case when searching, so it will
match all of mother: MOTHER: mOtHeR: etc, is this really what you want?

If you only want to match Mother: at the beginning of the line, add the
zero-width-assertion ^ which matches at the beginning of a string or
just after a \n.

>         s/Children: <BR>/ : ÚClÛqp¾ ÖDÛ<BR>/gi;

Again, you may want to eliminate the /g and /i, and add a ^ anchor.
Also, you REALLY ought to change the garbage-looking string ÚClÛqp¾ ÖDÛ,
which has high-bits set.  Instead, use \x or \N to give the sequences in
hex or by name.

>         print OUT $_; # print that line to file OUT
> }
> close(IN);
> close(OUT);
> 
> Now I have two problems:
> 
> 1) I would like to search the text:
> 
> Father
> and Mother
> 
> and replace it with
> 
> Parents

Since while(<IN>) stops at newlines, obviously this is not going to
work, since it would come to you as "...Father\n" on one line, and "and
Mother..." on the next.

To do replacements where there are newlines, you will need to do one of
two things: slurp the whole file in, and do replacements on that, or
test if the string ends with "Father\n" and then read and append the
next line to the string.  The first is likely less complicated.

> 
> with another words I would like to get rid of the linebreak. I have
> tried to add the following without success:
> 
> s/Father and Mother/Parents/s;
> 
> I get the following error:
> 
> Substitution pattern not terminated in file
> search-replace.pl at line 42, next char ^>
> parse error in file search-replace.pl at line 42, next 2 tokens
> "s/Father and Mother/Parents/s;"
> Execution of search-replace.pl aborted due to compilation errors.
> 
> so I have problems with the s-modifier

The /s will only cause . to match newlines just as well as any other
character.  It will not cause a space character to match newlines.

For what you want, you would need s/Father\nand Mother/Parents/;

> 2) I would like to run this program for all the files in a given
> directory, so that the search-replace operation can be done on all the
> .html files in a given directory

Read the documentation on opendir and readdir.  Also, read the
documentation on glob.  This is one cases where glob in a scalar context
may be useful:

	while( my $infile = glob "$directory/*.html" ) {
		my $outfile = $infile . ".new";
		....
	}

-- 
#! perl -- This took a heck of a lot of work to make.  I hope it works.
@p{split//,'justaperlhacker'}=map hex,qw(6b 71 83 1c1 43 2 3 5 79d 71db
7835 1ddf07 23a871 72656b63); print map {$e=1;for(split//){$e*=$_};pack
'V',$e} qw(ptk ppppprre pperrrlau ppppphc ppjsa r);


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

Date: 27 May 2001 20:08:27 -0700
From: guyw@multiline.com.au (Guy Worthington)
Subject: Re: search keywords for text analysis tools
Message-Id: <33f78556.0105271908.33bc84ac@posting.google.com>

tadmc@augustmail.com (Tad McClellan) satisfied my requirements for a script
to list and sort alphabetically all the words in a TeX source file.
 
> ---------------------
> #!/usr/bin/perl -w
> use strict;
> 
> my %concord;
> while ( <DATA> ) {
>    foreach my $word ( /(\w+)/g ) {
>       push @{$concord{$word}}, $.;  # record the line number
>    }
> }
> 
> 
> # output the concordance
> foreach my $word ( sort keys %concord ) {
>    print "$word: @{$concord{$word}}\n";
> }
> 
> 
> __DATA__
> word1
> word2 word3 word1
> word word3
> ---------------------

I changed the <DATA> file handle to the diamond operator <> threw 6000 lines
of TeX source code at your script and redirected the STDOUT to a file, and in
the blink of eye it had finished.
 
> The two major issues are choosing a data structure (HoL) 

I'm guessing HoL means hash of lines, this works for me.  Out of curiosity I'll
read the bookmarks you've sent me on structures. 

> and deciding what will be considered a "word".

The output file has all the markup stripped and placed in its own word
category; guess TeX's idea of a word and Perl's idea of a word are
similar.

Thankyou Tad McClellan, for the concordance tool, I think I'll get hours
of fun out it.


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

Date: Mon, 28 May 2001 13:53:56 +1000
From: "bmer" <brad.morrison@mincom.com>
Subject: Re: search keywords for text analysis tools
Message-Id: <9esi2f$554$1@sol.mincom.oz.au>


"Guy Worthington" <guyw@multiline.com.au> wrote in message >

<snip>

> I'm guessing HoL means hash of lines, this works for me.  Out of curiosity
I'll

Actually, Tad referred to Hashes of Lists. See perldsc (Perl data structures
cookbook):

 (75)% perldoc perldsc

Cheers





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

Date: 28 May 2001 06:06:22 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: search keywords for text analysis tools
Message-Id: <9espsu$1k5$6@bob.news.rcn.net>

Tad McClellan <tadmc@augustmail.com> wrote:
> Guy Worthington <guyw@multiline.com.au> wrote:
>>I need my hand held when using "search.cpan.org".  I would like to build
>>a sorted list of all the words, and the lines (or pages) they occur on,
>>from a TeX file source (I think of it as a raw concordance table).  Could I
>>prevail on some of you to give me keyword searches to help me find a tool
>>that constructs a concordance table.


> Such a thing would be so trivial to write anew each time you need
> it that I doubt it would benefit from being put into a module.

A practical tool would have some non-trivial aspects, such as the handling 
of "stop words" (you normally don't want to index words like "the" or "of" 
because they'd account for a disproportionate share of your index entries, 
but would be of no help in distinguishing documents).



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

Date: Mon, 28 May 2001 01:13:54 GMT
From: "RoadRunner" <newwave@ACMEmail.net>
Subject: Searching Flat Text File
Message-Id: <mDhQ6.165174$BB5.2728942@typhoon.columbus.rr.com>

Hello,

I would like to search a text file for any occourances of $keyword. Now, if
a line contains $keyword, then just print it. The file is has 228,000 lines,
so would it make more sense to put everything in a mySQL db? At any rate,
how would I search the file and print out any lines that contain $keyword.
Is it possible to have more than 1 keyword? Please e-mail me back
personally, as my news server access fails often. Thanks!

Cheers-
Austin




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

Date: Mon, 28 May 2001 01:35:11 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Searching Flat Text File
Message-Id: <3B11AB67.827A8FEA@acm.org>

RoadRunner wrote:
> 
> Hello,
> 
> I would like to search a text file for any occourances of $keyword. Now, if
> a line contains $keyword, then just print it. The file is has 228,000 lines,
> so would it make more sense to put everything in a mySQL db?

That depends.

> At any rate,
> how would I search the file and print out any lines that contain $keyword.

open FILE, "< file.txt" or die "Cannot open file.txt: $!";
/$keyword/ and print while <FILE>;

> Is it possible to have more than 1 keyword?

Yes

( /$keyword1/ or /$keyword2/ ) and print while <FILE>;



John
-- 
use Perl;
program
fulfillment


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

Date: Sun, 27 May 2001 21:43:50 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Searching Flat Text File
Message-Id: <comdog-D8E9DF.21435027052001@news.panix.com>

In article <mDhQ6.165174$BB5.2728942@typhoon.columbus.rr.com>, 
"RoadRunner" <newwave@ACMEmail.net> wrote:

> I would like to search a text file for any occourances of $keyword. Now, if
> a line contains $keyword, then just print it. The file is has 228,000 lines,
> so would it make more sense to put everything in a mySQL db? At any rate,
> how would I search the file and print out any lines that contain $keyword.
> Is it possible to have more than 1 keyword? Please e-mail me back
> personally, as my news server access fails often. Thanks!


    % grep keyword file

if you don't have a native grep you can use a Perl version

    http://www.perl.com/pub/language/ppt/src/grep/index.html

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: 27 May 2001 15:41:55 +0100
From: nobull@mail.com
Subject: Re: typeglob
Message-Id: <u91ypag8gc.fsf@wcl-l.bham.ac.uk>

"Public <Anonymous_Account>" <remailer@xganon.com> writes:

> The following program calls a function which returns a list of
> refs to arrays and then prints the arrays.

No it does not. Show us a real program.

>  It seems to work;
> however, the strange thing is that if I simply reverse the order
> of the two print statements (i.e. cut out the first and place it
> after the second) then it no longer works.  

Show us a modified program that doesn't work.  Explain what you
expected it to do and show us what actually happens.

> This message did not originate from the Sender address above.
> It was posted with the use of anonymizing software at 
> http://anon.xg.nu

Huh?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 27 May 2001 15:50:51 +0100
From: nobull@mail.com
Subject: Re: use Time::localtime; inside require packages
Message-Id: <u9y9rieth0.fsf@wcl-l.bham.ac.uk>

"News" <neo@accesscable.net> writes:

> I called use Time::localtime; not in my main script but a script that I
> require "time.cgi".

Using a .cgi name suffix for a file that contains something that is
not a CGI program is obfuscation.

>  For some reason this causes my script to work off and
> on in which it will crash every second or third time I use it.  So instead I
> stuck use Time::localtime; inside the main script and now everythings fine.
> Does anyone understand what is happening here?  Can you not use packages
> inside a script you require?  

You can, it is the converse that causes problems.  You should not have
a module require a Perl4-style library.  Well, you can get away with
one module requiring a library.  But if your program requires multiple
modules and two or more of those modules require the same Perl4 style
library then things will fail.

> Why would it work off and on if at all?

Is this CGI or mod_perl?  Remeber that under mod_perl your "script" is
effectively converted into a module by Apache::Registry.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

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


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