[10712] in Perl-Users-Digest
Perl-Users Digest, Issue: 4311 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 27 23:07:47 1998
Date: Fri, 27 Nov 98 20:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 27 Nov 1998 Volume: 8 Number: 4311
Today's topics:
Re: bugs in the perl T-shirt (was Re: Question from a m (brian d foy)
Re: help-new (Tad McClellan)
Re: Hiding "To:" field (brian d foy)
How to generate Perl executable for UNIX? <zmao@eecs.berkeley.edu>
Re: How to generate Perl executable for UNIX? (brian d foy)
html vs. cgi via perl (Mike)
Re: localtime () - perl's bug ? (Matthew Bafford)
Re: localtime () - perl's bug ? <rra@stanford.edu>
Re: localtime () - perl's bug ? <r28629@email.sps.mot.com>
Re: localtime () - perl's bug ? (Tony Cook)
mod_perl + perl 5.005_02 <prauz@sprynet.com>
Re: Newbie question: Executing scripts under Win95 dturley@pobox.com
Re: Newbie question: Executing scripts under Win95 <due@murray.fordham.edu>
Re: Password Protected Sites ? (brian d foy)
Re: regex works OK but ?? <uri@sysarch.com>
REGEXP stumper for intermediate perl user <dylan@leading.net>
Re: REGEXP stumper for intermediate perl user (brian d foy)
Re: REGEXP stumper for intermediate perl user (Larry Rosler)
Re: statement as "#include" in C (Tad McClellan)
Re: TAKING BIDS: Perl script needed (brian d foy)
Re: Y2K and Programmer Denial (Martin Gleeson)
Re: Y2K work - need suggestions <prauz@sprynet.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 27 Nov 1998 21:02:36 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: bugs in the perl T-shirt (was Re: Question from a mega-geek)
Message-Id: <comdog-ya02408000R2711982102360001@news.panix.com>
In article <19981125.231001.3u2.rnr.w164w_-_@locutus.ofB.ORG>, Russell Schulz <Russell_Schulz@locutus.ofB.ORG> posted:
> Jonathan Stowe <gellyfish@btinternet.com> wrote:
>
> > I think that the Perl Mongers t-shirt has a bug in it - I have been
> > wearing one quite frequently for nearly three weeks now
>
> you need to invoke &wash() after each use, or there will be a LOT of bugs.
would someone like to write the t-shirt docs? i'll distribute them
with each shirt. i can even put the shirt under the GPL so that you
can let anyone wear it. :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
that's a joke. it's really not GPL-ed.
------------------------------
Date: Fri, 27 Nov 1998 19:13:11 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: help-new
Message-Id: <7nin37.mee.ln@flash.net>
Gary & Dianne Black (rainbowend@earthlink.net) wrote:
: This is a multi-part message in MIME format.
Please configure your "newsreader" properly.
Do not post MIME to Usenet.
: I need to learn cgi and perl for a project. What is the best way? I
: know html and need more especially how to add a shopping cart to a
: website. Can anyone advise me on the best way to go about this.
You left out the most important prerequisite.
Do you know how to program?
Perl is much easier to learn if you already know how
to program.
If you don't know how to program, then I would suggest
taking an Introductory Programming class (most of them
are based on Pascal) at a local Community College.
Then learn Perl.
Then learn the vagaries of CGI programs.
Then learn about shopping carts.
If you don't have time for all of that, then you should
probably hire a programmer to handle it for you (and look
over their shoulder to learn it for yourself).
Good luck!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 27 Nov 1998 20:46:34 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Hiding "To:" field
Message-Id: <comdog-ya02408000R2711982046340001@news.panix.com>
In article <365CAB84.561E4D2E@viper.net>, Todd Smith <tbsmith@viper.net> posted:
> brian d foy wrote:
>
> > In article <3659F287.3025@digi-q.com>, alex@digi-q.com posted:
> >
> > > Does anybody know if it's possible to hide "To:" field when sending a
> > > message through mailprog?
> >
> > how is the message going to know where to go? perhaps you have a
> > different question with more context though. it would belong in
>
> wouldn't?
your right. that's what i meant. yeah, that's the ticket ;)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
i failed typing in high school, too.
------------------------------
Date: Fri, 27 Nov 1998 17:03:29 -0800
From: "Z. Morley Mao" <zmao@eecs.berkeley.edu>
Subject: How to generate Perl executable for UNIX?
Message-Id: <365F4BE1.3A75DB04@eecs.berkeley.edu>
Hi,
Could someone please tell me how to compile a Perl script into a
UNIX executable a.out? We need this to make it run faster.
thanks.
--Morley
------------------------------
Date: Fri, 27 Nov 1998 21:09:14 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: How to generate Perl executable for UNIX?
Message-Id: <comdog-ya02408000R2711982109140001@news.panix.com>
In article <365F4BE1.3A75DB04@eecs.berkeley.edu>, "Z. Morley Mao" <zmao@eecs.berkeley.edu> posted:
> Could someone please tell me how to compile a Perl script into a
> UNIX executable a.out? We need this to make it run faster.
what makes you think it will run faster?
what's the real problem?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Sat, 28 Nov 1998 03:28:02 +0100
From: mike@lovetalk.de (Mike)
Subject: html vs. cgi via perl
Message-Id: <MPG.10c97e132ecbe95098968d@news.ndh.com>
Does anyone have any idea on how to ping a cgi-script ?? (not just the
ip)
I would like to write a script that compares html vs. cgi response times
on a server.....
thanx,
michael
------------------------------
Date: Fri, 27 Nov 1998 19:07:21 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: localtime () - perl's bug ?
Message-Id: <MPG.10c908bf4ef6b168989744@news.scescape.net>
In article <365F3834.34B838F6@homeworks.com.br>,
slepetys@homeworks.com.br says...
=> Hi,
=>
=> I wrote a script in Perl that make's use of the localtime() command to
=> get the time and day as is wroten below:
=> #
=> ($sec,$min,$hour,$day,$month,$year)=localtime ();
=> $data = "$day/$month/$year";
=> $horario = "$hour:$min:$sec";
=> #
Ok, about 1 year and 1 month from now, you _do_ realize that code isn't
going to make a very nice date, don't you?
1/1/100
Hmmm.... You might want to pay more attention to all the y2k fuss. :)
=> But for my surprise the command works properly, but the month extracted
=> was ever one below the current. I tried it on my machine (INTEL), in a
=> DEC (alpha 500) and in the webserver (O2) and all reported the same
=> error.
Look back at the documentation for localtime...
...
All array elements are numeric, and come straight out of a struct tm.
In particular this means that $mon has the range 0..11 and $wday has
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the range 0..6 with sunday as day . Also, $year is the number of
**********************
years since 1900, that is, $year is 123 in year 2023, and not simply
**************** (Pay attention to this, too!!!)
the last two digits of the year.
...
=> Is it a perl's bug ?
Nope, it's a sign of Perl's parentage...
It makes it slightly easier to do things like:
my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my $month = $months[(localtime)[4]];
print "The current month is: $month\n";
Hope This Helps!
=> SLepetys
--Matthew
------------------------------
Date: 27 Nov 1998 16:10:23 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: localtime () - perl's bug ?
Message-Id: <yl90gwvfrk.fsf@windlord.stanford.edu>
Roberto Slepetys Ferreira <slepetys@homeworks.com.br> writes:
> But for my surprise the command works properly, but the month extracted
> was ever one below the current. I tried it on my machine (INTEL), in a
> DEC (alpha 500) and in the webserver (O2) and all reported the same
> error.
> Is it a perl's bug ?
No, it's documented. The documentation says why this is. See man
perlfunc under localtime.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Fri, 27 Nov 1998 19:03:17 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: localtime () - perl's bug ?
Message-Id: <365F3D95.2CC10CAF@email.sps.mot.com>
Roberto Slepetys Ferreira wrote:
>
> Hi,
>
> I wrote a script in Perl that make's use of the localtime() command to
> get the time and day as is wroten below:
>
> #
> ($sec,$min,$hour,$day,$month,$year)=localtime ();
> $data = "$day/$month/$year";
> $horario = "$hour:$min:$sec";
> #
>
> But for my surprise the command works properly, but the month extracted
> was ever one below the current. I tried it on my machine (INTEL), in a
> DEC (alpha 500) and in the webserver (O2) and all reported the same
> error.
>
> Is it a perl's bug ?
I have seen these 'false alarms' many times.
Somehow, I fail to understand why people rather blindly believe they are
facing (Perl's) bugs instead of mistakes - their owned - before taking the
effort verifying it. <sigh>
My highest regards to those who have had the patience to provide the
clarification. In the meantime, Larry, I will try to do better.
-TK
------------------------------
Date: 29 Nov 1998 01:26:42 GMT
From: tony@ns.cook.ml.org (Tony Cook)
Subject: Re: localtime () - perl's bug ?
Message-Id: <73q7si$k4$1@ns.cook.ml.org>
Roberto Slepetys Ferreira (slepetys@homeworks.com.br) wrote:
: Hi,
: I wrote a script in Perl that make's use of the localtime() command to
: get the time and day as is wroten below:
<snip>
: But for my surprise the command works properly, but the month extracted
: was ever one below the current. I tried it on my machine (INTEL), in a
: DEC (alpha 500) and in the webserver (O2) and all reported the same
: error.
If you read
perldoc -f localtime
you will see that $mday has a range from 0 to 11, ie. 0 is January.
: Is it a perl's bug ?
Nope.
------------------------------
Date: Sat, 28 Nov 1998 00:16:53 +0000
From: Balazs Rauznitz <prauz@sprynet.com>
Subject: mod_perl + perl 5.005_02
Message-Id: <365F40F5.5C23301C@sprynet.com>
Hello.
I am running an Apache server with mod_perl on my Linux box and just
compiled perl 5.005_02, but experience strange things when using the new
perl with mod_perl:
The same script that worked before has syntax error reported about 50%
of the time it's run. The line is:
$tpl = new CGI::FastTemplate ("somedirectoryname");
The error log says:
[Fri Nov 27 17:55:12 1998] [error] syntax error at /www/perl-bin/mailrep
line 20, near "new CGI::FastTemplate "
Bareword found where operator expected at /www/perl-bin/bbthread line
12, near "new CGI::FastTemplate"
(Do you need to predeclare new?)
The really odd thing is that if I hit reload on the browser, then it
usually loads the page fine, but I get this kind of error randomly
through the site.
After switching back to perl 5.004 the problem disapperers.
Am I missing something (like is it a problem to run mod_perl with a
different compiler it was compiled with) or is this a
bug/incompatability ?
Appreciate any help:
Balazs
------------------------------
Date: Sat, 28 Nov 1998 01:33:11 GMT
From: dturley@pobox.com
Subject: Re: Newbie question: Executing scripts under Win95
Message-Id: <73njsm$2g5$1@nnrp1.dejanews.com>
In article <73n82f$24k$0@206.165.167.228>,
"Allan M. Due" <due@murray.fordham.edu> wrote:
> *Warning*
> Personal opinion to follow:
>
> The best answer I have to this problem is the UltraEdit text editor
> (www.ultraedit.com). It is a great text editor for Perl and allows you to
> configure a user tool which you can use to run Perl from within the editor
> and capture the output to a listbox or a new file. I couldn't live without
> it (If anyone needs help setting it up, let me know).
I'll second this. if you are stuck on a windoze machine, this is the editor to
use. The author offers excellent support and the product is great. I "live" in
this editor
> The downside is that it cost $30.00.
??? I would say the upside is that it ONLY costs $30.00. Have you looked at
the prices of other programmer's editors?. BTW, BBEdit, a Mac OS
programmer's editor that is just as great costs around $150!!!
David Turley
dturley@pobox.com
http://www.binary.net/dturley/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 28 Nov 1998 02:16:02 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Newbie question: Executing scripts under Win95
Message-Id: <73nmd2$5k$0@206.165.167.228>
dturley@pobox.com wrote in message <73njsm$2g5$1@nnrp1.dejanews.com>...
>In article <73n82f$24k$0@206.165.167.228>,
> "Allan M. Due" <due@murray.fordham.edu> wrote:
>
>
>> *Warning*
>> Personal opinion to follow:
>>
>> The best answer I have to this problem is the UltraEdit text editor
>> (www.ultraedit.com). It is a great text editor for Perl and allows you
to
>> configure a user tool which you can use to run Perl from within the
editor
>> and capture the output to a listbox or a new file. I couldn't live
without
>> it (If anyone needs help setting it up, let me know).
>
>
>I'll second this. if you are stuck on a windoze machine, this is the editor
to
>use. The author offers excellent support and the product is great. I "live"
in
>this editor
>
>> The downside is that it cost $30.00.
>
>??? I would say the upside is that it ONLY costs $30.00. Have you looked at
>the prices of other programmer's editors?. BTW, BBEdit, a Mac OS
>programmer's editor that is just as great costs around $150!!!
>
Point taken, but in a free newsgroup, where advice is provided for free, for
a product that is freely distributed, I thougth I should mention a cost was
involved for the editor. Particularly when there are free editors
available, eg there is a free port of Emacs to Windoze. UltraEdit is worth
the cost, IMHO, so I made mention of it.
AmD
------------------------------
Date: Fri, 27 Nov 1998 21:07:57 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Password Protected Sites ?
Message-Id: <comdog-ya02408000R2711982107570001@news.panix.com>
In article <365E9B94.811E8D15@popcorn-studio.ch>, philip.class@popcorn-studio.ch posted:
> What are possible solutions for password protected sites ?
depends on your server. this isn't a Perl question, btw.
> I've checked http://www.takempis.com/pword.asp that shows a simple example of
> a pw protection to access a database (using ASP).
depends on your server. this isn't a Perl question, btw.
> But how do I protect a whole Webpage (or maybe a whole Directory) from
> unwanted users ?
depends on your server. this isn't a Perl question, btw.
> There's another example on http://www.net-link.net/cgi-docs/htpsswd.html that
> uses the CGI-Interface and probably accesses a Perl-Script.
CGI is not a good way to do this. that's an extra process per connection!
> Or may I have to use SSL ?
not at all. authentication and encryption are separate problems.
> I'd be very glad if someone could show me any examples / tutorials / links.
depends on your server, but it looks like you
are in Bill land. if you want to use mod_perl, see the examples
in the upcoming modperl book at <URL:http://www.modperl.com/>.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 27 Nov 1998 19:10:04 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: regex works OK but ??
Message-Id: <x7iug0y8wz.fsf@sysarch.com>
>>>>> "ss" == sara starre <nospam.perl_rocks@hotmail.com> writes:
ss> 11/12/98 12:29:31
is this the source pattern always? just a data and time? does it ever wrap
around lines?
if the pattern is fixed like that, then your regex is too complex. just
match the full
ss> s/(^.+)(\/\d\d)(\s+)(.+)(\:\d\d\s*$)/$1 @ $4/;
you don't need to group unless you are going to refer to the group. you
only refer to $1 and $4 so you could remove some parens.
also since you don't modify $1 you can not match it (the rest of the
text should restrict the match to what you want).
and it is safer to match the time part directly and not with .+ or \S+
and don't use / for a delimiter when you are matching /. choose another
one. i like | (except when i have a | in my regex which is rare). others
like ! or matched pairs like []. i like to use matched pairs when i use the /x
modifier to expand the regex to multiple lines.
try this (tested):
s|/\d\d\s+(\d\d:\d\d):\d\d| @ $1|
if you want to be more secure you could match the full date
s|(\d\d/\d\d)/\d\d\s+(\d\d:\d\d):\d\d|$1 @ $2|
this will work on wrapped lines (assuming the data dn time aren't broken
around the wrap) since \s will match \n
ss> However, I showed this to a friend & he said "don't use this solution
ss> because results may vary from system to system and release to release".
this make little sense with such a simple regex.
ss> In fact when he first read it he said it wouldn't work- until I showed
ss> him the result. He thought that the initial (.+) would grab the entire
ss> string and then not match. My thinking was that perl would discover a
ss> match to the whole expression, if it was there. Apparently I was
ss> correct, but maybe not entirely?
he obviously doesn't know regexes well. .+ will match only if the rest
of the regex also matches (and those matches are not null). so it won't
grab the entire string here.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Fri, 27 Nov 1998 18:46:19 -0500
From: "Someone" <dylan@leading.net>
Subject: REGEXP stumper for intermediate perl user
Message-Id: <73nnua$kh3@news.southeast.net>
i have a text string inside $value that can consist of anything. i want to
eliminate all whitespace, except when found inside single quotes (' ').
i have tried a few things, including a modification of the "trim white
space" example on pg 73 of programming perl, 2nd edition, and have read
pages of docs (including the re section in the faq and the re manual docs in
html format from cpan -- of course its possible i missed something), but am
starting to think the answer lies in writing a good RE, which im still
pretty new at.
i apologize if the answer has been discussed on this newsgroup or is out
there for me to read. i would be happy to look it up if given a starting
point.
further details:
the $value itself could contain anything in any order, which must be
preserved. ordinarily, s/\s+//g would do just fine, except this also nukes
the whitespace inside the single quotes.
the $value does not have to contain a single quoted substring, but it could
also contain an infinite amount of them. if one does exist, something (.+)
will be inside the quotes, and the quotes must be preserved as well.
however, no 2 single quoted substrings will be consecutive. for this reason,
i tried s/\s*('.+')?\s*/$1/g and was close, but got multiple uninitialized
variable messages on that line of code. this must be due to the occurances
of whitespace without the '.+' because im using the ?, but im not sure how
to fix this.
any help would be greatly appreciated.
Scot
------------------------------
Date: Fri, 27 Nov 1998 22:36:21 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: REGEXP stumper for intermediate perl user
Message-Id: <comdog-ya02408000R2711982236210001@news.panix.com>
In article <73nnua$kh3@news.southeast.net>, "Someone" <dylan@leading.net> posted:
> i have a text string inside $value that can consist of anything. i want to
> eliminate all whitespace, except when found inside single quotes (' ').
does the ' character show up in any other place? for example,
this is 'quoted text' and it\'s escaped version
this is 'quoted and \'escaped text'
if there are no escaped 's, you can split the string on the '
character, munge the odd numbered elements, then join it with
an ' like so:
$count = 1;
print
join "'",
map { $count++ % 2 ? strip_ws($_) : $_; }
split /'/,
q| ' this is text' that was text 'example quoted' text |;
sub strip_ws
{
$_[0] =~ s/\s+//g;
$_[0]
}
otherwise it\'s a bit more difficult ;)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 27 Nov 1998 19:50:51 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: REGEXP stumper for intermediate perl user
Message-Id: <MPG.10c912f477bee8bd98992b@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <73nnua$kh3@news.southeast.net> on Fri, 27 Nov 1998 18:46:19
-0500, Someone <dylan@leading.net> says...
> i have a text string inside $value that can consist of anything. i want to
> eliminate all whitespace, except when found inside single quotes (' ').
...
> however, no 2 single quoted substrings will be consecutive. for this reason,
> i tried s/\s*('.+')?\s*/$1/g and was close, but got multiple uninitialized
> variable messages on that line of code. this must be due to the occurances
> of whitespace without the '.+' because im using the ?, but im not sure how
> to fix this.
You were very close. You want your $1 always to be defined, so the '?'
must be inside the capturing parentheses. This works:
s/\s*((?:'.+')?)\s*/$1/g
But I have found being more explicit to be more efficient:
s/\s*((?:'[^']+')?)\s*/$1/g
As brian d foy points out, this also assumes no unpaired single quotes
lying around.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 27 Nov 1998 18:56:32 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: statement as "#include" in C
Message-Id: <0ohn37.7ae.ln@flash.net>
Jin Shunyao (jinsy@iname.com) wrote:
: Have there a statement that can include a file from another file in
: perl language? Just like #include "file" in C.
^^^^^^^^^^^^^^^^^^
Yes, there is one that quite literaly is just like #include in C.
Namely, #include in C ;-)
See the -P switch in the 'perlrun' man page if you want
to use the C preprocessor with Perl.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 27 Nov 1998 20:59:51 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: TAKING BIDS: Perl script needed
Message-Id: <comdog-ya02408000R2711982059510001@news.panix.com>
In article <8clnkzta09.fsf@gadget.cscaper.com>, Randal Schwartz <merlyn@stonehenge.com> posted:
> >>>>> "TheEadsNet" == TheEadsNet <theeadsnet@aol.com> writes:
>
> TheEadsNet> I need a script that can:
> TheEadsNet> 1. Input a .gif file (animated or static)
>
> use Image::Magick;
> my $image = Image::Magick->new->read("yourfile");
>
> TheEadsNet> 2. Determine dimensions of the .gif
>
> ## not really needed... it's magic[k] :)
($height, $width) = $image->Get( 'height', 'width');
[Randal, i'll invoice you for that line if you get the contract]
> TheEadsNet> 3. Append a pre-designed (468x60, etc.) animiated layer
> consisting of a solid
> TheEadsNet> background color and one line of Italic text
>
> my $predesigned = Image::Magick->new->read("predesigned.gif");
> push @$image, @$predesigned;
it's a bit more complicated if you want that to be behind every
frame. probably two or three more lines. you can even do it
without importing an image since you can put a border around an
image and put text anywhere on the image (using whichever fonts
you have installed - ghostscript is needed for that though)
> Well, if it takes a while for you to read your mail, I'll say up to 15
> days. You can send whatever amount of money you want to the address
> below.
>
> And next time, pick a project that cannot be done in five minutes. :)
well, the rest of the time is installing ImageMagick and gs. as
i recall that took you around *20* minutes :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Sat, 28 Nov 1998 14:42:31 +1100
From: gleeson@unimelb.edu.au (Martin Gleeson)
Subject: Re: Y2K and Programmer Denial
Message-Id: <gleeson-ya02408000R2811981442310001@news.unimelb.edu.au>
In article <73kvbt$vjb$1@nnrp1.dejanews.com>, finsol@ts.co.nz wrote:
>Recent debate on this and other programming newsgroups, regarding Y2K issues,
>has prompted me to write on the subject of programmer denial. This article was
>recently published in NZ Computerworld.
>
>Many of you following the debate may be interested in reading further on the
>subject discussed. My first article was on 'booby trap code', a problem that
>affects programming languages such as Perl, MacPerl, C, C++, Java,
>Javascript, CGI, MVS and CICS.
I wouldn't be putting a whole lot of stock in the opinions of someone who
claims to be a programmer yet thinks that CGI, MVS and CICS are programming
languages.
>The second article describes the widespread
>programmer denial that I encountered. Initially, this denial was provoked by
>my research into the subject and then, later, further debate arose when my
>"booby trap code" article was published.
You seem to be confusing criticism of your flawed analysis with denial
of the existence of a problem. And you have the arrogance to talk about
denial? Sheesh.
Cheers,
Marty.
--
Martin Gleeson
** Personal opinion only **
Imagine, if you will, a world without hypothetical situations...
------------------------------
Date: Sat, 28 Nov 1998 00:23:50 +0000
From: Balazs Rauznitz <prauz@sprynet.com>
To: Citizen Joe <please@post-it.com>
Subject: Re: Y2K work - need suggestions
Message-Id: <365F4296.24CC6D7A@sprynet.com>
What about using fork to run the programs paralell ?
Balazs
Citizen Joe wrote:
>
> I usually work as a Unix system administrator. However, my current job does
> not involve the usual system support. It is still on the Unix platform and
> it involves Y2K. I work for a major corporation and my exact role in this
> is finding out how many software components there are and which ones are
> Y2K compliant and which ones are not Y2K compliant.
>
> We have about 300 HPUX servers. There are 150 known components. There could
> be a large number of undiscovered components because system managers did
> not have their act together and did not record their changes to the system.
>
> First of all, most components are not even Y2K sensitive since they do not
> involve date. Examples are Perl and Emacs. Of the ones that are Y2K
> sensitive, most are not important. I do not have the complete picture but
> my guess is that there are less than 20 important Y2K sensetive components
> that will affect the customer severely.
>
> My job is to list all of components, including the critical ones and report
> the compliance status. Such as: components x version 7.01 is non-compliant
> but version 8.4 is compliant. Then the information will be passed to the
> system managers who will make the necessary upgrades. Some non-compliant
> components do not have a compliant version. They will be obsoleted and
> replaced.
>
> Basically, it is not a hard job. The size and the magnitude make it
> difficult. I am doing it all with a Perl5 script that runs on all the boxes
> and gathers info and puts it on the web page. So far we partially
> identified the status of 85 different components using scripting and swlist
> -l product command.
>
> Here is where the problem is. The script takes too long to execute. It
> takes about 10 seconds for each component and I just can't figure out a way
> to get around that. 10 seconds x 150 components x 300 machines = 450000
> seconds to check all the components on all the machines or 125 hours, when
> I am done.
>
> I decided to do this project in Perl 5. The script is based on remsh.
> It is in the format:
>
> $command=`remsh $box "/usr/local/bin/component -v"`;
>
> or I grep a file or something. It is unique in many cases. Then I pipe to
> if statements to determine compliance, through an exclusion list, save it
> to a file in a specific format, etc. The results go to a web page, then to
> an Excel spreadsheet and ultimately to a database.
>
> remsh is an expensive command. I am beginning to have doubts about
> selecting Perl for the project. About basing the script on remsh-type
> commands. From the beginning, I was considering using ksh and instead of
> running remsh, putting the script on the box, letting it run there and then
> just rcp-ing the results to the depot for analysys. Ideally, I would like
> to do that in Perl. But the problem is that not every machine has Perl
> installed. In fact, not every machine has ksh. If do the whole thing in sh,
> I will also run into problems because it does not manipulate text anywhere
> near as nicely as Perl and I need all of Perl's capabilities such as
> regular expressions, arrays, hashes, sorting, etc.
>
> So far I decided to keep going with Perl, and just run the script 10
> components at a time. I will re-evalute the time. Of course, I don't have
> all 150 components done. The overall time is merely a projection.
>
> Maybe the solution to cut down on time is to make sure that all the
> machines have at least perl 4, and tell system managers to install perl on
> the ones that do not have it. It should be an easy fix to make the script
> to run on the system instead of via the network, save the results and then
> copy then back.
>
> Maybe I should just accept the time the way it is?
>
> Please post your suggestions.
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4311
**************************************