[23717] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5923 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 10 18:17:24 2003

Date: Wed, 10 Dec 2003 15:15:22 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 10 Dec 2003     Volume: 10 Number: 5923

Today's topics:
    Re: Proposal: new module, Array::Each? (Bryan Castillo)
    Re: Querying SQLServer from Perl on Unix <mislam@spamless.uiuc.edu>
    Re: Querying SQLServer from Perl on Unix <jwillmore@remove.adelphia.net>
    Re: Regex and multiples on same line (Anno Siegel)
    Re: Retrieving then deleting elements of a list (refere <apollock11@hotmail.com>
        script writer required <webmaster@missingfriends.net>
    Re: script writer required (Tad McClellan)
    Re: script writer required <webmaster@missingfriends.net>
    Re: script writer required (Randal L. Schwartz)
    Re: script writer required (Sam Holden)
    Re: script writer required <nospam@bigpond.com>
    Re: script writer required <jwillmore@remove.adelphia.net>
    Re: script writer required <abigail@abigail.nl>
        search Forum, BBS script <test@test.com>
    Re: search Forum, BBS script <jwillmore@remove.adelphia.net>
    Re: search Forum, BBS script <technohippie@myway.com>
    Re: Server-side script executed on page load or event,  <jwillmore@remove.adelphia.net>
        Sorting dates...Argument "" isn't numeric <mislam@spamless.uiuc.edu>
    Re: Sorting dates...Argument "" isn't numeric <scorpy@SDF.LONESTAR.ORG>
    Re: Sorting dates...Argument "" isn't numeric (Tad McClellan)
        Static Content Management -- Baking Pages rather than F (Ben B)
    Re: Static Content Management -- Baking Pages rather th <nospam@bigpond.com>
    Re: What is '_' (Sara)
    Re: What is '_' <jwillmore@remove.adelphia.net>
    Re: What is '_' (ko)
    Re: What is the Best Content Management System? <GSM@hotmail.com>
        win32: multi-versions after module update <marks.pryorSHRUB@CHENEYverizon.net>
    Re: windows services <jwillmore@remove.adelphia.net>
    Re: windows services (ko)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 10 Dec 2003 09:42:41 -0800
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: Re: Proposal: new module, Array::Each?
Message-Id: <1bff1830.0312100942.13a81020@posting.google.com>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message news:<br7051$h2a$1@mamenchi.zrz.TU-Berlin.DE>...
> Brad Baxter  <bmb@ginger.libs.uga.edu> wrote in comp.lang.perl.misc:
> > [This stems somewhat from discussions in the thread:
> > Idiom for array index that I'm foreach'ing over?]
> > 
> > I'm considering making a new module with the tentative name Array::Each.
> > 
> > A draft is available here:
> > 
> > http://www.vitabrevis.ws/perl/modules/Array/Each.pm
> > http://www.vitabrevis.ws/perl/modules/Array/Each.pod.html
> > 
> > It's incomplete, but I want to discuss the idea before proceeding further.
> > 
> > 1. Is Array::Each acceptable?  Perhaps Array::Parallel, or
> > Array::Iteration?
> > 
> > 2. Are the subroutine names acceptable?  In particular, I expect negative
> > reactions to each(), since it would clobber each( %hash ), so alternative
> > suggestions are welcome.
> > 
> > 3. Is this a good approach?  Are all those options needed?  Does it matter
> > that it doesn't return lvalues like foreach ( @array )?
> > 
> > 4. Should someone else do this/Has someone else done this?  I did study
> > the CPAN module list and didn't find a close match.  That I missed one
> > would not surprise me.
> > 
> > 5. I imagine sometime adding an OO interface along these lines:
> > 
> >   my $set = Array::Each->new( @x, @y );
> >   my( $i, $x, $y ) = $set->each();
> 
> By all means, go for an OO approach.  This stuff has been shouting
> "object" from the moment we introduced the %i hash with its keys to
> distinguish different iterators.
> 

Isn't there some type of Iterator package for perl?  Why stop at arrays?
If there would be an OO approach, why not have iterators for many things.


Here is a simplified example of what Im thinking about.
It is using closures instead of full objects (for brevity);


package Iterator;
use strict;
use warnings;

# iterator over multiple arrays
sub arrays(;\@\@\@\@\@) {
  my $arrays = [@_];
  my $i = -1;
  my $mi = -1;
  foreach(@_) { $mi = $#{$_} if ($#{$_} > $mi) }
  return sub {
    return () if ($i >= $mi);
    return (++$i, map{$_->[$i]} @{$arrays}); 
  };
}

# iterate over multiple hashes
sub hashes(;\%\%\%\%\%) {
  my $hashes = [@_];
  my %keys;
  map{$keys{$_}=1} keys %{$_} foreach(@_);
  my @keys = keys %keys;
  my $i = -1;
  return sub {
    return () if ($i >= $#keys);
    return ($keys[++$i], map{$_->{$keys[$i]}} @{$hashes});
  };
}

# iterate over 2d array
sub array2d {
  my ($x,$y) = (-1,0);
  my $array = ($#_ == 0 and UNIVERSAL::isa($_[0], 'ARRAY')) ? $_[0] : [@_];
  my $my = $#{$array};
  my $mx = ($my >= 0) ? $#{$array->[0]} : -1;
  return sub {
    if (++$x > $mx) { $y++; $x=0 }
    return () if ($y > $my);
    return ($y,$x,$array->[$y][$x]); 
  };
}

# Find and load dynamic iterator
sub find_iterator {
  my $imod = shift;
  print "imod = $imod\n";
  my $imod_file = "Iterator/$imod";
  $imod_file =~ s/::/\//g;
  $imod_file .= ".pm";
  require $imod_file;
  no strict 'refs';
  my $get_iter = \&{*{"Iterator::${imod}::iterator"}};
  warn "not iterator found for $imod\n" and return unless($get_iter);
  return $get_iter->(@_);
}

package main;
use strict;
use warnings;
no warnings 'uninitialized';

my @a = qw/ 1 2 3 4/;
my @b;
my @c = qw/6 7 8 9/;

my $iter_a = Iterator::arrays(@a,@b,@c);
while (my ($i,$v1,$v2,$v3) = $iter_a->()) {
  print "[$i] ($v1,$v2,$v3)\n";
}

print "-" x 40, "\n";

my %a = (a=>1,b=>2,c=>3);
my %b = (z=>99);
my %c = (xx=>'xx',hash=>\%a);

my $iter_b = Iterator::hashes(%a, %b, %c);
while (my ($k,$v1,$v2,$v3) = $iter_b->()) {
  print "[$k] ($v1,$v2,$v3)\n";
}

print "-" x 40, "\n";

my $array = [
  [1,2,3],
  [4,5,6],
  [7,8,9]
];

my $iter_c = Iterator::array2d($array);
while (my ($y,$x,$value) = $iter_c->()) {
  print "($y,$x) = ($value)\n";
}

print "-" x 40, "\n";

my $iter_d = Iterator::find_iterator('files', "*.pl");
while (my ($i, $file) = $iter_d->()) {
  print "[$i] = $file\n";
}





# Iterator/files.pm
package Iterator::files;
use strict;
use warnings;

sub iterator {
  my @files = sort glob(shift);
  my $i = -1;
  return sub {
    return () if (++$i > $#files); 
    return ($i, $files[$i]);
  };
}

return 1;


> The user will have to create an iterator object (instead of "spontaneously"
> saying "( $i, $x, $y) = each( @x, @y)"), but it will be much clearer
> what's happening.
> 
> > Among other things, this should allow iterating over the same set of
> > arrays using different iterators.  Should I bother?
> 
> That's one of the advantages of explicit iterators.
> 
> > All feedback is appreciated.
> 
> Make each() return the index last (after the array elements) instead
> of first.  That way the first n values correspond to the n arrays, and
> the index is easy to ignore when it isn't needed.
> 
> Anno


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

Date: Wed, 10 Dec 2003 10:39:15 -0600
From: Sharif Islam <mislam@spamless.uiuc.edu>
Subject: Re: Querying SQLServer from Perl on Unix
Message-Id: <br7ikq$bkj$1@news.ks.uiuc.edu>

Yash wrote:
> Hi,
> 
> Is there a way I can access an MS SQL Server2000 database running on a
> Win2000 server, using Perl on HP-Unix? I want to execute plain SELECT
> queries. Any pointers will be of great help.

http://www.freetds.org/

-- 
     )
    ((
   |""|-.
   | :|/'
  -`--'-



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

Date: Wed, 10 Dec 2003 20:14:10 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Querying SQLServer from Perl on Unix
Message-Id: <20031210151409.313b6dc7.jwillmore@remove.adelphia.net>

On 10 Dec 2003 05:56:17 -0800
yashgt@yahoo.com (Yash) wrote:

> Is there a way I can access an MS SQL Server2000 database running on
> a Win2000 server, using Perl on HP-Unix? I want to execute plain
> SELECT queries. Any pointers will be of great help.


You need to use, on the HP box, an OBDC manager.  unixODBC is a good
one, and iODBC is another.  After installing the manager, you can then
use DBI and the DBD::ODBC driver in Perl script running on the HP box.

I have no experience with an HP platform, but this method *should*
work for you.

Another is to use DBD::Proxy.  You would need to install Perl on the
Windows box and set the appropriate ODBC DSN on the Windows box.  So,
you would use DBI on the HP box to connect to the DBD::Proxy running
on the Windows box.

Again, this *should* work for you.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Job Placement, n.:  Telling your boss what he can do with your
job. 


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

Date: 10 Dec 2003 14:35:33 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Regex and multiples on same line
Message-Id: <br7avl$mej$3@mamenchi.zrz.TU-Berlin.DE>

Gary Mayor  <gary@tgpmakers.com> wrote in comp.lang.perl.misc:
> Hi,
> Thanks for everyone in my earlier message. Now i've got a problem with 
> regex. I've got a file with lines like this,
> 
> CATETITLE1 CATETITLE2 CATETITLE3 CATETITLE4
> CATETITLE5 CATETITLE6 CATETITLE7 CATETITLE8
> 
> while(<FILE>) {
>    if ($_=~ /CATETITLE/) {
>       $counter++;
>    }
> }
> 
> if I then run through the file and match each time there is a CATETITLE 
> I only get a count of 2. How do I find out the total amount of CATETITLE?

Lots of ways...  Here's another, based on counting the words in each
line that contain "CATETITLE":

while(<FILE>) {
      $counter += grep /CATETITLE/, split;
   }
}

Anno


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

Date: Wed, 10 Dec 2003 09:47:25 -0800
From: Arvin Portlock <apollock11@hotmail.com>
Subject: Re: Retrieving then deleting elements of a list (references)
Message-Id: <br7m7j$2cuo$1@agate.berkeley.edu>

Oh, that is REALLY excellent! Thank you very much!


> You could store the left-overs in another array.
>
>
> my ( @series, @left_overs );
> push @{ $_->{type} =~ /SERIES/ ? \@series : \@left_overs }, $_ for 
> @{$data->{elements}};
> foreach my $ser ( @series ) {
>     etc...
> }
> my @items
> push @{ $_->{type} =~ /ITEM/ ? \@items : \@left_overs }, $_ for splice 
> @left_overs;
> foreach my $item ( @items ) {
>     etc...
> }
> ## Now process everything that's left over
> foreach my $elt ( @left_overs ) {
>     etc...
> }
>
>
> John




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

Date: Wed, 10 Dec 2003 18:39:04 -0000
From: "Richard" <webmaster@missingfriends.net>
Subject: script writer required
Message-Id: <2HJBb.330$NM2.448295@newsfep1-win.server.ntli.net>

I am looking for a script-writer with an established portfolio
of scripts that may want to tackle an application I have
on the drawing board.
Interested parties should visit:
http://www.missingfriends.net/requirements.htm
for a overview of the web-based application
Regards
Dick Rosser
webmasterone@missingfriends.nospam.net
remove nospam




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

Date: Wed, 10 Dec 2003 13:56:01 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: script writer required
Message-Id: <slrnbteuih.ute.tadmc@magna.augustmail.com>

Richard <webmaster@missingfriends.net> wrote:

> I am looking for a script-writer 


Then post to a newsgroup with "jobs" in its name.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Wed, 10 Dec 2003 21:12:01 -0000
From: "Richard" <webmaster@missingfriends.net>
Subject: Re: script writer required
Message-Id: <b_LBb.399$NM2.594330@newsfep1-win.server.ntli.net>


"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnbteuih.ute.tadmc@magna.augustmail.com...
> Richard <webmaster@missingfriends.net> wrote:
>
> > I am looking for a script-writer
>
>
> Then post to a newsgroup with "jobs" in its name.
>
>
> -- 
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas

Glad you are earning enough to turn down an offer




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

Date: Wed, 10 Dec 2003 21:41:44 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: script writer required
Message-Id: <6ea33465919f1d1b0b4c29254506e588@news.teranews.com>

>>>>> "Richard" == Richard  <webmaster@missingfriends.net> writes:

Richard> webmasterone@missingfriends.nospam.net
Richard> remove nospam

OK.

webmasterone@missingfriends.net

Is that what you wanted me to do?

-- 
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: 10 Dec 2003 21:57:17 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: script writer required
Message-Id: <slrnbtf5lt.sbg.sholden@flexal.cs.usyd.edu.au>

On Wed, 10 Dec 2003 21:12:01 -0000,
	Richard <webmaster@missingfriends.net> wrote:
> 
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnbteuih.ute.tadmc@magna.augustmail.com...
>> Richard <webmaster@missingfriends.net> wrote:
>>
>> > I am looking for a script-writer
>>
>>
>> Then post to a newsgroup with "jobs" in its name.
>>
>>
>> -- 
>>     Tad McClellan                          SGML consulting
>>     tadmc@augustmail.com                   Perl programming
>>     Fort Worth, Texas
> 
> Glad you are earning enough to turn down an offer

Does it take a lot of effort to be as stupid as your are?

-- 
Sam Holden


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

Date: Thu, 11 Dec 2003 08:03:13 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: script writer required
Message-Id: <1764585.oRti3SrMs5@gregs-web-hosting-and-pickle-farming>

It was a dark and stormy night, and Randal L. Schwartz managed to scribble:

>>>>>> "Richard" == Richard  <webmaster@missingfriends.net> writes:
> 
> Richard> webmasterone@missingfriends.nospam.net
> Richard> remove nospam
> 
> OK.
> 
> webmasterone@missingfriends.net
> 
> Is that what you wanted me to do?

LOL Randal - subtle - brilliant.

gtoomey


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

Date: Wed, 10 Dec 2003 22:30:48 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: script writer required
Message-Id: <20031210173048.1380bf42.jwillmore@remove.adelphia.net>

On Wed, 10 Dec 2003 21:12:01 -0000
"Richard" <webmaster@missingfriends.net> wrote:
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnbteuih.ute.tadmc@magna.augustmail.com...
> > Richard <webmaster@missingfriends.net> wrote:
> >
> > > I am looking for a script-writer
> >
> >
> > Then post to a newsgroup with "jobs" in its name.
> Glad you are earning enough to turn down an offer

Glad to see your comprehension of English is as good as your ability
to post something somewhere it's un-welcomed.

Post job listings to http://jobs.perl.org/ -or- as Tad suggested, a
newsgroup that has "jobs" listed in the title.

Good bye!

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Grandpa Charnock's Law:  You never really learn to swear until
you learn to drive. 


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

Date: 10 Dec 2003 22:48:41 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: script writer required
Message-Id: <slrnbtf8m9.les.abigail@alexandra.abigail.nl>

Randal L. Schwartz (merlyn@stonehenge.com) wrote on MMMDCCLIII September
MCMXCIII in <URL:news:6ea33465919f1d1b0b4c29254506e588@news.teranews.com>:
@@ >>>>> "Richard" == Richard  <webmaster@missingfriends.net> writes:
@@  
@@ Richard> webmasterone@missingfriends.nospam.net
@@ Richard> remove nospam
@@  
@@  OK.
@@  
@@  webmasterone@missingfriends.net
@@  
@@  Is that what you wanted me to do?


What happened to the second dot?



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s};;;
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};                # Perl 5.6.0 broke this...
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


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

Date: Wed, 10 Dec 2003 20:21:31 GMT
From: "Liberal" <test@test.com>
Subject: search Forum, BBS script
Message-Id: <ffLBb.429815$0v4.20502093@bgtnsc04-news.ops.worldnet.att.net>

I am looking for the simplest forum, bbs script which has those features?

new messages will be displayed only after the administrator reviewed

allow users post without signing up

display the newest message first.

prefer perl, but php is ok.

prefer no mysql, because i still learning it.




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

Date: Wed, 10 Dec 2003 20:37:21 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: search Forum, BBS script
Message-Id: <20031210153721.547f1ff1.jwillmore@remove.adelphia.net>

On Wed, 10 Dec 2003 20:21:31 GMT
"Liberal" <test@test.com> wrote:

> I am looking for the simplest forum, bbs script which has those
> features?
> new messages will be displayed only after the administrator reviewed
> allow users post without signing up
> display the newest message first.
> prefer perl, but php is ok.
> prefer no mysql, because i still learning it.

http://freshmeat.net/

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Ask your boss to reconsider -- it's so difficult to take "Go to
hell" for an answer. 


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

Date: Wed, 10 Dec 2003 12:59:59 -0800
From: TechnoHippie <technohippie@myway.com>
Subject: Re: search Forum, BBS script
Message-Id: <sKWdnbXJqcHFFEqiRVn-gQ@comcast.com>

Liberal wrote:

> I am looking for the simplest forum, bbs script which has those features?
> 
> new messages will be displayed only after the administrator reviewed
> 
> allow users post without signing up
> 
> display the newest message first.
> 
> prefer perl, but php is ok.
> 
> prefer no mysql, because i still learning it.

Have you looked at Discus?  Very customizable and easy to install, 
either manually or with thier autoinstall option.

HTH,
Judy



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

Date: Wed, 10 Dec 2003 20:31:22 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Server-side script executed on page load or event, but not SSI
Message-Id: <20031210153122.43d1234b.jwillmore@remove.adelphia.net>

On Wed, 10 Dec 2003 04:19:06 GMT
Henry <henryn@zzzspacebbs.com> wrote:
> However, there's a couple of housekeeping chores to do occasionally:
> For example, looking for database updates and downloading them if
> required.

Use the DBI module.

> Behind the scenes is a script --perl, I hope-- that runs when the
> entry page is loaded which checks to see if it's been run already
> that day. If not then it checks the modification date opf the remote
> database, and ...you get the picture. 

Yes, but are you looking for something already made?  If so, go to
http://freshmeat.net/.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
"I am not an Economist.  I am an honest man!"   -- Paul McCracken



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

Date: Wed, 10 Dec 2003 11:31:16 -0600
From: Sharif Islam <mislam@spamless.uiuc.edu>
Subject: Sorting dates...Argument "" isn't numeric
Message-Id: <br7lme$d19$1@news.ks.uiuc.edu>

This is probably something very basic I am missing here. However, I 
spent almost an hour, can't fix the above error.

I am trying to sort dates that are in following format:
mm*/?yyyy-mm*/?yyyy

Now the problem is there are some entries in my text file(200,000+ 
lines)that has blank dates. I believe I am getting the error for those 
cases. How can I fix this?

___OUTPUT___

# perl datesort.pl '09/2001-05/2004;09/1967-09/1988;/1946-/'
/1946-/;09/1967-09/1988;09/2001-05/2004
# perl datesort.pl '09/2001-/;03/1999-/'
03/1999-/;09/2001-/
# perl datesort.pl '09/2003; '
Argument "" isn't numeric in numeric comparison (<=>) at datesort.pl 
line 15.
  ;09/2003


____CODE___
#!/usr/bin/perl -w
use strict;

   # Sort dates:
my $date = shift;
my @date = split /;/, $date;
my @sorted = sort datecompare @date;
print my $newdate = join ';', @sorted;
print "\n";

sub datecompare
{
    my ($a1, $a2, $a3,$a4) = ( $a =~/(\d*)\/?(\d*)-?(\d*)\/?(\d*)/);
    my ($b1, $b2,$b3,$b4) = ($b   =~/(\d*)\/?(\d*)-?(\d*)\/?(\d*)/);
              $a2 <=> $b2
               or
           $a1 <=> $b1
               or
           $a4 <=> $b4
              or
           $a3 <=> $b3
  }

___CODE__

-- 
     )
    ((
   |""|-.
   | :|/'
  -`--'-



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

Date: Wed, 10 Dec 2003 17:40:19 +0000
From: "Joseph D. Wisniewski" <scorpy@SDF.LONESTAR.ORG>
Subject: Re: Sorting dates...Argument "" isn't numeric
Message-Id: <Pine.NEB.4.58.0312101736200.16696@mx.freeshell.org>

Just check each date to make sure it isn't the null string before you try
to sort it in, better yet, create a regexp to determine if it the input is
a date as you have defined it before doing any processing on it.

J.D. Wisniewski
hamsterguy at hamsterbay.com


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

Date: Wed, 10 Dec 2003 13:55:23 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Sorting dates...Argument "" isn't numeric
Message-Id: <slrnbteuhb.ute.tadmc@magna.augustmail.com>

Sharif Islam <mislam@spamless.uiuc.edu> wrote:

> This is probably something very basic I am missing here. However, I 
> spent almost an hour, can't fix the above error.


The "above" is not an error. It is a warning.

Look it up in perldiag.pod.


> has blank dates. I believe I am getting the error for those 
> cases. How can I fix this?


   my @sorted = sort datecompare grep length(), @date;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 10 Dec 2003 09:54:13 -0800
From: google@dotinf.co.uk (Ben B)
Subject: Static Content Management -- Baking Pages rather than Frying them
Message-Id: <7881e289.0312100954.e8d347a@posting.google.com>

All

I'm looking for a tool or series of tools to help me manage the
content of a website.  My request is odd because I have no need to
manage content on-the-fly.  I would be happy to regenerate pages each
time the content is updated.

I'd need to be able to --
+ supply a 'template' HTML file
+ a file (or optionally a database) to pad out the template
+ include dynamically created navigation -- breadcrumbs and main menu
for each page

I'd be happy to work in Perl or PHP, but must be able to use these
tools on a Windows platform.  My preference would be for Open Source
software.

Can you let me know what the 'state of the art' is in this niche area?
 I have looked at some Perl scripts, but they seem not to work on
Windows (and this is backed up by other user's comments).

Thanks

Ben


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

Date: Thu, 11 Dec 2003 04:06:13 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Static Content Management -- Baking Pages rather than Frying them
Message-Id: <2166657.0H0ZVygOAR@gregs-web-hosting-and-pickle-farming>

It was a dark and stormy night, and Ben B managed to scribble:

> All
> 
> I'm looking for a tool or series of tools to help me manage the
> content of a website.  My request is odd because I have no need to
> manage content on-the-fly.  I would be happy to regenerate pages each
> time the content is updated.
> 
> I'd need to be able to --
> + supply a 'template' HTML file
> + a file (or optionally a database) to pad out the template
> + include dynamically created navigation -- breadcrumbs and main menu
> for each page
> 
> I'd be happy to work in Perl or PHP, but must be able to use these
> tools on a Windows platform.  My preference would be for Open Source
> software.
> 
> Can you let me know what the 'state of the art' is in this niche area?
>  I have looked at some Perl scripts, but they seem not to work on
> Windows (and this is backed up by other user's comments).
> 
> Thanks
> 
> Ben

www.plone.org ??

gtoomey


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

Date: 10 Dec 2003 07:52:47 -0800
From: genericax@hotmail.com (Sara)
Subject: Re: What is '_'
Message-Id: <776e0325.0312100752.30e51ff1@posting.google.com>

Bart Lateur <bart.lateur@pandora.be> wrote in message news:<8gkdtvc30l9oruvsn7o3gk33mh4smu2gja@4ax.com>...
> Sara wrote:
> 
> >Curious, just consulted Camel v3, don't see this documented, or at
> >least if its there, it's not obvious. Is it a secret only revealed to
> >newsgroup readers? :)
> 
> I think it's in perlfunc, under "stat".
> 
> 	If stat is passed the special filehandle consisting of an
> 	underline, no stat is done, but the current contents of the stat
> 	structure from the last stat or filetest are returned.
> 
> It's a good place to find out about it, when you're checking out stat(),
> but the reverse, looking up what "_" means, isn't obvious -- as shown
> here.

Thanks Bart. Yes I checked '_' in Camel and it had some documentation
on _ as an ASCII char, but not WRT any stat function.

Randall you've done it again!

G


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

Date: Wed, 10 Dec 2003 20:35:38 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: What is '_'
Message-Id: <20031210153538.73414ed6.jwillmore@remove.adelphia.net>

On Wed, 10 Dec 2003 12:41:36 GMT
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> >>>>> "John" == John W Krahn <krahnj@acm.org> writes:
> 
> John> Yes, but what have you done lately?   :-)
> In general, they don't need me.  That's nice. :-) I can focus on
> cranking out 2.5 columns a month and managing my micro-herd of Perl
> trainers and consultants.

2.5?  Do publishers pay for half a column ;-)

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Anything is good and useful if it's made of chocolate. 



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

Date: 10 Dec 2003 14:32:04 -0800
From: kuujinbo@hotmail.com (ko)
Subject: Re: What is '_'
Message-Id: <92d64088.0312101432.3c11a75b@posting.google.com>

genericax@hotmail.com (Sara) wrote in message
> Curious, just consulted Camel v3, don't see this documented, or at
> least if its there, it's not obvious. Is it a secret only revealed to
> newsgroup readers? :) Nice to know though thanks!
> 
> G

Chapter 3, the 'Named Unary and File Test Operators' section.

HTH -keith


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

Date: Wed, 10 Dec 2003 22:09:16 +0100
From: "Gu. Schmidt" <GSM@hotmail.com>
Subject: Re: What is the Best Content Management System?
Message-Id: <3fd78b7c_2@news.bluewin.ch>

Liberal schrieb:
> There are a few in Perl and PHP, with MySQL or without and either in
> Mod_Perl or not in.
> 
> I have heard mason, but it does not have any demo site, but claims, AMAZON
> is using it.
> 
> I also like PostNuke, but then there is a sister product caled PHPNuke
> 
> I am looking for something simple but with a lot of plug-ins. I will not use
> many features, but like to have BBS/Forum and Classified Ads. I want it
> simple, because I need to rewrite a lot of codes to include my current Perl
> program.
> 
> What is my best choice?
> 
> 
I prefer http://www.contenido.de/

This CMS has been developed by professionals and the company later 
decided that it might be a good idea to give away this product for free.




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

Date: Wed, 10 Dec 2003 19:48:14 GMT
From: "Mark S Pryor" <marks.pryorSHRUB@CHENEYverizon.net>
Subject: win32: multi-versions after module update
Message-Id: <2MKBb.2705$UF1.956@nwrddc02.gnilink.net>

hello c.l.p.m,

Using Win2k sp3
Perl 5.6.1 build 626 from
    http://theoryx5.uwinnipeg.ca/

I went and got the latest 6xx edition of
DB_File from the above repository. The install (via ppd)
works great.

Was it wrong to write
    >PPM install DB_File.ppd
when I want to update?

My question is why does PPM keep the old version of
this package? Now I have the original DB_File v1.72 in
/perl/lib and latest (v1.801) is in /perl/site/lib.

The problem is
use DB_File;

will access the old version.

This is a rare Perl annoyance. I checked the docs and
came up with this workaround:

use lib "c:/perl/site/lib";

Am I using PPM wrong?

tia,
msp




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

Date: Wed, 10 Dec 2003 19:44:00 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: windows services
Message-Id: <20031210144359.60b287e9.jwillmore@remove.adelphia.net>

On 10 Dec 2003 02:09:22 -0800
jeremy@emmjay.freeserve.co.uk (Jexxa) wrote:

> Hi, I had a look on cpan for a module to control windows 2000
> services. eg turing on and off and status information. Nothing
> jumped out at me. Have I found the one area that perl has not
> infiltrated? will I have to write my own module?
> Any answers or comments gratefully received.

Have you looked at Win32::Service?
http://search.cpan.org/~gsar/libwin32-0.191/Service/Service.pm

I'm not 100% sure that ActiveState has a build for this or not.  I'm
thinking it does - since it is a Win32 module.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Deliberation, n.:  The act of examining one's bread to determine 
which side it is buttered on.   -- Ambrose Bierce, "The Devil's
<Dictionary" 


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

Date: 10 Dec 2003 14:50:25 -0800
From: kuujinbo@hotmail.com (ko)
Subject: Re: windows services
Message-Id: <92d64088.0312101450.2e006ea9@posting.google.com>

jeremy@emmjay.freeserve.co.uk (Jexxa) wrote in message news:<90225942.0312100209.1c34b9cf@posting.google.com>...
> Hi, I had a look on cpan for a module to control windows 2000
> services. eg turing on and off and status information. Nothing jumped
> out at me. Have I found the one area that perl has not infiltrated?
> will I have to write my own module?
> Any answers or comments gratefully received.

Hmm...a CPAN search on 'windows service' turns up Win32::Service as
the *second* result...

Anyway, here's a link with some example scripts:

http://www.winnetmag.com/Articles/ArticleID/16069/pg/1/1.html

HTH - keith


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

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


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