[31855] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3118 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 6 00:09:26 2010

Date: Sun, 5 Sep 2010 21:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 5 Sep 2010     Volume: 11 Number: 3118

Today's topics:
        Accessing and printing LoL fields in a loop? <tuxedo@mailinator.com>
    Re: Accessing and printing LoL fields in a loop? <uri@StemSystems.com>
    Re: Accessing and printing LoL fields in a loop? <jurgenex@hotmail.com>
    Re: FAQ 1.9 How does Perl compare with other languages  <brian.d.foy@gmail.com>
    Re: Ideal data structure for nested list format? <ben@morrow.me.uk>
    Re: Ideal data structure for nested list format? <uri@StemSystems.com>
    Re: Multidimensional array <paul@pstech-inc.com>
    Re: Multidimensional array <paul@pstech-inc.com>
    Re: Multidimensional array <tadmc@seesig.invalid>
    Re: Multidimensional array <paul@pstech-inc.com>
    Re: Multidimensional array <ben@morrow.me.uk>
    Re: Multidimensional array <paul@pstech-inc.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 5 Sep 2010 23:06:12 +0200
From: Tuxedo <tuxedo@mailinator.com>
Subject: Accessing and printing LoL fields in a loop?
Message-Id: <i610o4$hk9$03$1@news.t-online.com>

Given this data structure:

my @lol = ('level 1.1',
                  ['level 2.1', 
                   'level 2.2',
                              ['level 3.1',
                               'level 3.2'],
                   'level 2.3']);

How can I print the LoL with a loop, in the same basic structure, as 
follows:

<ul><li>level 1.1
      <ul><li>level 2.1</li>
             <li>level 2.2
                   <ul><li>level 3.1</li>
                         <li>level 3.2</li>
                  </ul>
             </li>
             <li>level 2.3</li>
       </ul>
   </li>
</ul>

And how can I access/print separate level records, such as all in the first 
level of the LoL, the second level or the third? Again by a loop. For 
example, the output of printing all items in the first level would return:

level 1.1

or in the second level:

level 2.1, level 2.2, level 2.3

or the third level:

level 3.1, level 3.2

I guess a simple way to do this exists? However, I cannot find any similar 
examples anywhere.

Many thanks for any tips.

Tuxedo


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

Date: Sun, 05 Sep 2010 17:22:47 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Accessing and printing LoL fields in a loop?
Message-Id: <87bp8b6g2g.fsf@quad.sysarch.com>

>>>>> "T" == Tuxedo  <tuxedo@mailinator.com> writes:

  T> Given this data structure:
  T> my @lol = ('level 1.1',
  T>                   ['level 2.1', 
  T>                    'level 2.2',
  T>                               ['level 3.1',
  T>                                'level 3.2'],
  T>                    'level 2.3']);

  T> How can I print the LoL with a loop, in the same basic structure, as 
  T> follows:

have you read perldoc perllol? it directly answers your question.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sun, 05 Sep 2010 14:45:52 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Accessing and printing LoL fields in a loop?
Message-Id: <bj288696bhts8dn6150k991cpb5eqnceig@4ax.com>

Tuxedo <tuxedo@mailinator.com> wrote:
>Given this data structure:
>
>my @lol = ('level 1.1',
>                  ['level 2.1', 
>                   'level 2.2',
>                              ['level 3.1',
>                               'level 3.2'],
>                   'level 2.3']);
>
>How can I print the LoL with a loop,

You cannot. At least not withouth building your own data stack to
simulate recursion. Which can be done but why would you want to?

> in the same basic structure, as follows:
>
><ul><li>level 1.1
>      <ul><li>level 2.1</li>
>             <li>level 2.2
>                   <ul><li>level 3.1</li>
>                         <li>level 3.2</li>
>                  </ul>
>             </li>
>             <li>level 2.3</li>
>       </ul>
>   </li>
></ul>

Recursion is your friend:
(untested, algorithmic sketch only):

sub print_list {
	print_list_begin();
	for my $elem (@_){
		if (ref($elem) { # we got a sublist to process
			print_list @{$elem};
		} else { # we got a single element
			print_item($elem};
		}
	}
	print_list_end()	
}

>And how can I access/print separate level records, such as all in the first 
>level of the LoL, the second level or the third? Again by a loop. 

Again, you cannot unless you implement recursion yourself.

However if you don't insist on that loop then just pass an additional
parameter "$level" to print_list() which you decrement for each
recursive call and the actual print()s are only executed if $level ==0;

sub print_list {
	my $level = shift;
	print_list_begin() if $level ==0;;
	for my $elem (@_){
		if (ref($elem) { # we got a sublist to process
			print_list ($level -1, @{$elem});
		} else { # we got a single element
			print_item($elem} if $level ==0;;
		}
	}
	print_list_end() if $level ==0;	
}


>I guess a simple way to do this exists? 

No. Implementing general recursive algorightm using loops is rather
difficult except in the case of tail recursion which is trivial but
doesn't apply here.
For general recursion you need to maintain some sort of data or
call-back stack manually, otherwise the loop would not know how to
proceed after returning from processing a sub list.

jue


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

Date: Sun, 05 Sep 2010 18:18:10 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 1.9 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
Message-Id: <050920101818104474%brian.d.foy@gmail.com>

In article <q4r5l7-5v02.ln1@osiris.mauzo.dyndns.org>, Ben Morrow
<ben@morrow.me.uk> wrote:

> Quoth PerlFAQ Server <brian@theperlreview.com>:
> > 
> >     Some comparison documents can be found at
> >     http://www.perl.com/doc/FMTEYEWTK/versus/ if you really can't stop
> >     yourself.
> 
> Dead link (or rather, it redirect to perldoc.perl.org).

They recently migrated perl.com to new servers and they're figuring out
some of the things that dind't make it.


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

Date: Sun, 5 Sep 2010 22:51:58 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Ideal data structure for nested list format?
Message-Id: <u0gdl7-to11.ln1@osiris.mauzo.dyndns.org>


Quoth Tuxedo <tuxedo@mailinator.com>:
> Uri Guttman wrote:
> 
> > >>>>> "T" == Tuxedo  <tuxedo@mailinator.com> writes:
> > 
> >   T> Thanks for the tip, I've not tried Template::Simple before so I'm
> >   T> not sure how it works yet. I need to install and test it as well as
> >   T> delve into the manual, which looks a little less than simple at
> >   T> first sight...
> > 
> > it has 4 markups. 150 lines of total code. simple is as simple codes!
> 
> I installed Template::Simple as stand-alone module, after installing 
> File::Slurp and setting a use lib 'external_modules/lib/perl5/site_perl'  
> call in the Makefile.PL script within the Template-Simple-0.02 directory.

Why did you do that? You shouldn't be editing the Makefile.PL at all.
Put external_module/.../site_perl in PERL5LIB in the environment,
instead.

> The 'make test' stage of the installation failed with many errors (too many 
> to list here). Some were 'Can't locate File/Slurp.pm'. Perhaps this was the 
> cause of all consecutive errors, because of the external module location 
> and so File::Slurp could not be found by this installation step. Maybe this 
> is not important? Aftrer all, the other steps: perl Makefile.PL 
> PREFIX=/mypath/external_modules/, make and make install worked fine, so I 
> think the module should now be fully functional.

If you haven't run the tests you have no reason for thinking that.

> > the docs are fairly clear (as clear as i can write them!). can you ask
> > specific questions?
> 
> Can someone here place the list example in an working working script? Are 
> separate parts meant to exist in separate files? Alternatively, I think I 
> need an 'hello, I'm a template' equivalent 'hello world'... Anyone? 

    my $T   = Template::Simple->new;
    my $ref = $T->render(<<T, { world => "I'm a template" });
    Hello, [% world %]!
    T
    print $$ref;

> The $current_page is a variable output when a page access matches one that 
> exists in an array field, being the filename portion of the current URL. 
> The $current_page is known to any perl process while run through a CGI 
> process, which is importing the link list onto otherwise static HTML pages. 
> To clarify by an example, if you are at a page (one you happen to know) 
> such as http://bestfriendscocoa.com/recipes.html then 'Tasty Recipes' in 
> the header would not show as what may appear to some people as a link to a 
> different page, but would instead be printed in plain text.

Using T::S you would need to go through and insert class => "..."
entries in your main data structure. There isn't any way to use a
subsidiary hash the way I was suggesting. (This is one of the things I
find slightly irritating about T::S, though I've yet to find a better
alternative for basic (i.e., 'don't want TT2') stuff.)

Ben



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

Date: Sun, 05 Sep 2010 23:49:15 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Ideal data structure for nested list format?
Message-Id: <87occbzg3o.fsf@quad.sysarch.com>

>>>>> "BM" == Ben Morrow <ben@morrow.me.uk> writes:

  BM> Using T::S you would need to go through and insert class => "..."
  BM> entries in your main data structure. There isn't any way to use a
  BM> subsidiary hash the way I was suggesting. (This is one of the things I
  BM> find slightly irritating about T::S, though I've yet to find a better
  BM> alternative for basic (i.e., 'don't want TT2') stuff.)

how would you modify T::S to accomodate your idea? remember, my goal was
a very simple and fast templater. you can do very fancy stuff with code refs
in the data tree. the first public version was 37 lines of code. that
morphed into 150 lines when i made it OO and a proper module. that is
the definition of simple! :)

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sun, 5 Sep 2010 14:11:36 -0400
From: "Paul E. Schoen" <paul@pstech-inc.com>
Subject: Re: Multidimensional array
Message-Id: <z3Rgo.7469$EV4.7204@newsfe16.iad>


"Ben Morrow" <ben@morrow.me.uk> wrote in message 
news:kdacl7-75t.ln1@osiris.mauzo.dyndns.org...
>
> CGI.pm is working just fine, or would be if your script didn't exit due
> to that error before it got anywhere.

Yes, it seems fine now. I don't know why I was getting  the incorrect 
parameter. Probably cranial flatus :)

Paul 



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

Date: Sun, 5 Sep 2010 18:02:46 -0400
From: "Paul E. Schoen" <paul@pstech-inc.com>
Subject: Re: Multidimensional array
Message-Id: <hsUgo.56793$co1.24625@newsfe11.iad>


"Ben Morrow" <ben@morrow.me.uk> wrote in message 
news:t8v6l7-gla2.ln1@osiris.mauzo.dyndns.org...
>
> Quoth "Paul E. Schoen" <paul@pstech-inc.com>:

>>   my $dbfile = "events.db";
>>   my $db = DBI->connect(          # connect to your database, create if
>> needed
>>     "dbi:SQLite:dbname=$dbfile", # DSN: dbi, driver, database file
>>     "",                          # no user
>>     "",                          # no password
>>     { RaiseError => 1, AutoCommit => 1 }  # complain if something goes 
>> wrong
>>   ) or die $DBI::errstr;
>>
>>   unless (-e $dbfile) {    #check for exist
>
> DON'T DO THAT. You have a race condition between the check and the
> create. Just create the table beforehand (either with perl or with the
> sqlite command-line tool).

I've changed it to this, which works. It didn't work previously because the 
Connect created a blank file. But I agree that it's best to create the table 
outside the script.

BTW, I need different paths for the two servers. I can do it this way, but 
for other places where I need to do something different depending on where 
the script is located, is there some sort of conditional compile so I don't 
get errors on unused code as I did when I used goto to skip over it?

  my $dbfile = "../SCGBG/events.db"; #for Dreamhost
  #my $dbfile="/home/jail.root/home/pstech/www/SCGBG/events.db"; #for 
SmartNet

  print fErrors "Connecting to $dbfile\n";

  my $db = DBI->connect(          # connect to your database, create if 
needed
    "dbi:SQLite:dbname=$dbfile", # DSN: dbi, driver, database file
    "",                          # no user
    "",                          # no password
    { RaiseError => 1, AutoCommit => 1 }  # complain if something goes wrong
  ) or die $DBI::errstr;

  #newly created file has size zero
  if ((-e $dbfile) and not (-s $dbfile)) {    #check for zero size
    print fErrors "Creating table\n";
    $db->do("CREATE TABLE tEvents (dt DATETIME KEY, tl TEXT, de TEXT)");
    }
  $db->do("PRAGMA foreign_keys = OFF");
  $db->do("INSERT INTO tEvents (dt,tl,de) VALUES ('$E_DT', '$E_Title', 
'$E_Descr')");

  print fErrors "Generating query\n";
  my $all = $db->selectall_arrayref("SELECT * FROM tEvents ORDER BY dt");

  print fErrors "Printing events to $errorfile\n";
  foreach my $row (@$all) {
    ($E_DT, $E_Title, $E_Descr) = @$row;
    my @dt = split('T',$E_DT);
    my $d = $dt[0];
    my $t = $dt[1];
    print fErrors "$E_Title\n$d  $t\n$E_Descr\n";
    }

Thanks,

Paul 



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

Date: Sun, 05 Sep 2010 18:34:33 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Multidimensional array
Message-Id: <slrni889q0.e6s.tadmc@tadbox.sbcglobal.net>

Paul E. Schoen <paul@pstech-inc.com> wrote:

> BTW, I need different paths for the two servers. 


How can you detect which server your code is on?

Can you test the hostname?

    my $dbfile = qx/hostname/ =~ /dreamhost/i 
               ? '../SCGBG/events.db' 
               : '/home/jail.root/home/pstech/www/SCGBG/events.db';


I suggest always using single quotes unless you _need_ one of
the two extra things that double quotes gives you (backslash
escapes or variable interpolation).


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


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

Date: Sun, 5 Sep 2010 20:44:20 -0400
From: "Paul E. Schoen" <paul@pstech-inc.com>
Subject: Re: Multidimensional array
Message-Id: <XPWgo.20628$IH1.12290@newsfe18.iad>

"Tad McClellan" <tadmc@seesig.invalid> wrote in message 
news:slrni889q0.e6s.tadmc@tadbox.sbcglobal.net...
> Paul E. Schoen <paul@pstech-inc.com> wrote:
>
>> BTW, I need different paths for the two servers.
>
>
> How can you detect which server your code is on?
>
> Can you test the hostname?
>
>    my $dbfile = qx/hostname/ =~ /dreamhost/i
>               ? '../SCGBG/events.db'
>               : '/home/jail.root/home/pstech/www/SCGBG/events.db';
>
>
> I suggest always using single quotes unless you _need_ one of
> the two extra things that double quotes gives you (backslash
> escapes or variable interpolation).

Thanks for the tip. Much of this is starting to make sense now. I could try 
your suggestion about testing for the hostname, but if it only involves 
changing some comments it may not be worth it. I also thought about putting 
the file paths and other host-specific items in an "include" or "uses" file 
(module) which could be customized for each installation.

But this was mostly for the case where I run the script on my local machine 
where the environment is much different. For instance, the problem where I 
got an error on:

  open(MAIL, "|-", $mailprog, $recipient)

I tried using a goto to jump over the offending code, but it still produced 
a compile error even though the interpreter would never see it. Maybe I 
could set up a real localhost with the Apache server and make it very 
similar to the remote host where I have set up my web page and CGI scripts. 
But that's not an easy task, and so far it's been OK using the live server 
for testing.

Would it be possible (and advisable) to make my own Perl module with code 
that is proven to work on the server but not locally, such as the emailing 
procedure from open(MAIL... to close(MAIL)? Perhaps make it a subroutine and 
optionally call it from my main script? That way I could have a full 
featured sendmail function in the modules I include on the servers, and a 
dummy function in the one for testing on the local machine?

Just throwing some ideas. I can probably make something work, but my method 
may not be the "right" way to do it. I want to avoid bad habits before they 
become a problem.

Thanks,

Paul 



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

Date: Mon, 6 Sep 2010 00:24:09 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Multidimensional array
Message-Id: <pdldl7-7m21.ln1@osiris.mauzo.dyndns.org>


Quoth "Paul E. Schoen" <paul@pstech-inc.com>:
> "Ben Morrow" <ben@morrow.me.uk> wrote in message 
> news:t8v6l7-gla2.ln1@osiris.mauzo.dyndns.org...
> > Quoth "Paul E. Schoen" <paul@pstech-inc.com>:
> 
> >>   unless (-e $dbfile) {    #check for exist
> >
> > DON'T DO THAT. You have a race condition between the check and the
> > create. Just create the table beforehand (either with perl or with the
> > sqlite command-line tool).
> 
> I've changed it to this, which works. It didn't work previously because the 
> Connect created a blank file. But I agree that it's best to create the table 
> outside the script.

So why aren't you doing that?

> BTW, I need different paths for the two servers. I can do it this way, but 
> for other places where I need to do something different depending on where 
> the script is located, is there some sort of conditional compile so I don't 
> get errors on unused code as I did when I used goto to skip over it?

No, there isn't (well, you can fake up conditional compile with eval,
but it's rarely a good idea). You don't need to, though: an ordinary
runtime 'if' will do just fine. You can use the Sys::Hostname module to
get the current hostname to key off.

>   my $dbfile = "../SCGBG/events.db"; #for Dreamhost
>   #my $dbfile="/home/jail.root/home/pstech/www/SCGBG/events.db"; #for 
> SmartNet
> 
>   print fErrors "Connecting to $dbfile\n";
> 
>   my $db = DBI->connect(          # connect to your database, create if 
> needed
>     "dbi:SQLite:dbname=$dbfile", # DSN: dbi, driver, database file
>     "",                          # no user
>     "",                          # no password
>     { RaiseError => 1, AutoCommit => 1 }  # complain if something goes wrong
>   ) or die $DBI::errstr;
> 
>   #newly created file has size zero
>   if ((-e $dbfile) and not (-s $dbfile)) {    #check for zero size
>     print fErrors "Creating table\n";
>     $db->do("CREATE TABLE tEvents (dt DATETIME KEY, tl TEXT, de TEXT)");

You're still not getting it. Say you start with a nonexistent file, and
then two requests come in very close together. They will (or, at least,
they might) execute like this:

    FIRST REQUEST                   SECOND REQUEST

    -s $dbfile      # false
                                    -s $dbfile      # also false
    $db->do("CREATE TABLE");
                                    $db->do("CREATE TABLE");

Now you've got the second request trying to create a table which the
first request has already created. This will fail, and give you a fatal
error (since you asked for RaiseError => 1). You need to either put a
lock around the test-and-create, or find a form of create that will do
nothing quietly if the table already exists (and forget about the test),
or create the table beforehand and just have the script assume it's
already there.

Ben



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

Date: Mon, 6 Sep 2010 00:07:43 -0400
From: "Paul E. Schoen" <paul@pstech-inc.com>
Subject: Re: Multidimensional array
Message-Id: <uOZgo.23264$rC7.15373@newsfe10.iad>


"Ben Morrow" <ben@morrow.me.uk> wrote in message 
news:pdldl7-7m21.ln1@osiris.mauzo.dyndns.org...
>
> Quoth "Paul E. Schoen" <paul@pstech-inc.com>:
>> "Ben Morrow" <ben@morrow.me.uk> wrote in message
>> news:t8v6l7-gla2.ln1@osiris.mauzo.dyndns.org...
>> > Quoth "Paul E. Schoen" <paul@pstech-inc.com>:
>>
>> >>   unless (-e $dbfile) {    #check for exist
>> >
>> > DON'T DO THAT. You have a race condition between the check and the
>> > create. Just create the table beforehand (either with perl or with the
>> > sqlite command-line tool).
>>
>> I've changed it to this, which works. It didn't work previously because 
>> the
>> Connect created a blank file. But I agree that it's best to create the 
>> table
>> outside the script.
>
> So why aren't you doing that?

It's just a matter of convenience while I am developing this system. If I 
want to change the structure of the table I just delete the $dbfile and run 
the new script. And I'm not familiar with the SQlite command line tool. This 
way, also, the script is self-documenting by having the database structure 
in the table create code.


>> BTW, I need different paths for the two servers. I can do it this way, 
>> but
>> for other places where I need to do something different depending on 
>> where
>> the script is located, is there some sort of conditional compile so I 
>> don't
>> get errors on unused code as I did when I used goto to skip over it?
>
> No, there isn't (well, you can fake up conditional compile with eval,
> but it's rarely a good idea). You don't need to, though: an ordinary
> runtime 'if' will do just fine. You can use the Sys::Hostname module to
> get the current hostname to key off.
>
>>   my $dbfile = "../SCGBG/events.db"; #for Dreamhost
>>   #my $dbfile="/home/jail.root/home/pstech/www/SCGBG/events.db"; #for
>> SmartNet
>>
>>   print fErrors "Connecting to $dbfile\n";
>>
>>   my $db = DBI->connect(          # connect to your database, create if
>> needed
>>     "dbi:SQLite:dbname=$dbfile", # DSN: dbi, driver, database file
>>     "",                          # no user
>>     "",                          # no password
>>     { RaiseError => 1, AutoCommit => 1 }  # complain if something goes 
>> wrong
>>   ) or die $DBI::errstr;
>>
>>   #newly created file has size zero
>>   if ((-e $dbfile) and not (-s $dbfile)) {    #check for zero size
>>     print fErrors "Creating table\n";
>>     $db->do("CREATE TABLE tEvents (dt DATETIME KEY, tl TEXT, de TEXT)");
>
> You're still not getting it. Say you start with a nonexistent file, and
> then two requests come in very close together. They will (or, at least,
> they might) execute like this:
>
>    FIRST REQUEST                   SECOND REQUEST
>
>    -s $dbfile      # false
>                                    -s $dbfile      # also false
>    $db->do("CREATE TABLE");
>                                    $db->do("CREATE TABLE");
>
> Now you've got the second request trying to create a table which the
> first request has already created. This will fail, and give you a fatal
> error (since you asked for RaiseError => 1). You need to either put a
> lock around the test-and-create, or find a form of create that will do
> nothing quietly if the table already exists (and forget about the test),
> or create the table beforehand and just have the script assume it's
> already there.

This is probably due to my lack of experience with networked applications 
where multiple users may run the script simultaneously. At least, that is 
how I picture your scenario, and I can understand your concern if there was 
any likelihood of heavy usage. But I would expect that this script would run 
only several times a week, so there is little chance of such a conflict. But 
I appreciate the heads up for good programming practice.

I have thought about possible problems if two requests came in at about the 
same time, after the database and table have already been created. If the 
second Connect request came while the database was already connected, I 
would assume that it would simply ignore the request or perhaps connect with 
a different user identity. But the problem might be when the first 
Disconnect request was made, while the second user was still accessing the 
database. If each database connection was uniquely identified, then both 
processes might run concurrently. But I really don't know, and I think the 
chances are minimal.

I have implemented a form of lock on the script at the start where I put the 
10 second delay. I was going to put this lock around the entire script, but 
it would fail if there were an error and the HTMLdie or other error exit 
occurred. I don't know if there is anything like an "OnExit" event that 
could be handled by unlocking the script. I am creating and deleting a 
"lock.txt" file and checking for existence and displaying a "Busy, try again 
later" message if a request is received while the first request was being 
processed (mostly sleeping).

I appreciate the advice, and I'd like to learn all the correct ways to 
program for this environment, but I think these concerns are not critical in 
this situation. Please correct me if there is any major issue with what I am 
doing. Thanks!

Paul 



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

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:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 V11 Issue 3118
***************************************


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