[17684] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5104 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 13 18:10:47 2000

Date: Wed, 13 Dec 2000 15:10:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <976749018-v9-i5104@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 13 Dec 2000     Volume: 9 Number: 5104

Today's topics:
    Re: My first JAPH.... <timallen449@coldmail.com>
    Re: My first JAPH.... <Ed.Blackshaw@ic24.net>
    Re: My first JAPH.... (Adam Spragg)
    Re: My first JAPH.... <Ed.Blackshaw@ic24.net>
    Re: My first JAPH.... (Richard Zilavec)
    Re: My first JAPH.... <elijah@workspot.net>
    Re: My first JAPH.... <bart.lateur@skynet.be>
        MySQL DBI install <pirod@webdifusao.com>
        Parser to extract {} functions from a script (AMPLE) <micsaund@home.com>
    Re: Parser to extract {} functions from a script (AMPLE <bart.lateur@skynet.be>
        Perl Newbie Needs Form Script Help passing Data in the  (Allen D Moore)
    Re: Posting Guidelines for comp.lang.perl.misc ($Revisi (John Stanley)
    Re: Problem using Image::Size on a webserver <iltzu@sci.invalid>
    Re: quick way to search array members <bart.lateur@skynet.be>
    Re: Redirection and variables <jeff@vpservices.com>
        secure email <troyr@vicnet.net.au>
    Re: SIG{__DIE__} handler <iltzu@sci.invalid>
        SSLeay..what level of encryption is being used? <spudmuf@my-deja.com>
    Re: To Blob or not To Blob (Richard Zilavec)
    Re: Use PERL or Java? Which is faster? (Craig Berry)
    Re: Using stat to get last mod.time (Mark-Jason Dominus)
        What is Perl anyway? <g.klijzing@zap.a2000.nl>
    Re: What is Perl anyway? (Tim Hammerquist)
    Re: what should managers know about perl? (Tim Hammerquist)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 13 Dec 2000 20:15:19 +0100
From: "tim allen" <timallen449@coldmail.com>
Subject: Re: My first JAPH....
Message-Id: <918ha5$8cf$1@diana.bcn.ttd.net>

It works for me!  Dang, I was all proud of mine, but looks like I'll have to
obfuscate harder.  I can't make heads nor tails of yours!  Saludos.
unmunge?cold=hot
--
@q=unpack('U*',"Tim Allen");@l=unpack('U*',"Geeky Hackers Grok Perl!\n"
);@w=(61,113,107,191,88,-11,74,107,105,127,97,119,115,47,64,120,118,29,
20,72,91,189,144,39,-88);foreach(@w){push(@g,($_-$l[$x]));$x++}foreach(
@g){print chr($_+$q[$z]);$z++;$z%=@q}

--
"Adam Spragg" <atspragg@garbanzo.engr.ucdavis.edu> wrote in message
news:918gci$fe4$1@mark.ucdavis.edu...
Necessity might be the mother of invention, but boredom is certainly the
father...

@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
eval
join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print
chr;}print"\n";

Is that good?

Adam




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

Date: Wed, 13 Dec 2000 20:53:31 -0000
From: "Ed.Blackshaw" <Ed.Blackshaw@ic24.net>
Subject: Re: My first JAPH....
Message-Id: <hmRZ5.17719$Ig.71539@news1-hme0>

Runs on my Windoze ;-)

Mine is the first thing I ever wrote in perl.  Well apart from 'hello
universe' (was feeling ambitious ;-).
Actually, so far, also pretty much the only thing ;-(

--
Ed Blackshaw
EdBlackshaw@madasafish.com
http://www.chm.bris.ac.uk/~cheab
"We're not dropping out here, we're infiltrating and taking over."

#!usr/bin/perl
foreach(unpack q~c*~,qq|Ujlk+~qpkwzm.Ozms,w~\|tzm)&'?\$26\||)
{print$a;$a=sprintf q^%c^,($_^(unpack q^c^,qq{ })^ord qq?\??)
;$a=~s[([1q4S!7U:z3#\\])]{$a};if($1){$a=~s<$1>^ ^;}$a=~s<([0^
gf2\'\\\@\%\^qq968])>;$a;;($a=~s{$1}{.})if($1);}print v10.13;

Adam Spragg <atspragg@garbanzo.engr.ucdavis.edu> wrote in message
news:918gci$fe4$1@mark.ucdavis.edu...
> Necessity might be the mother of invention, but boredom is certainly the
> father...
>
> @_=(join"","0",eval join("*",17,435983),eval join("*",ord"
",ord"H",5,4441),
> eval
join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
>
(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
> "0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print
chr;}print"\n";
>
> Is that good?
>
> Adam




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

Date: 13 Dec 2000 22:01:15 GMT
From: atspragg@garbanzo.engr.ucdavis.edu (Adam Spragg)
Subject: Re: My first JAPH....
Message-Id: <918rjb$kbr$1@mark.ucdavis.edu>

Ed.Blackshaw (Ed.Blackshaw@ic24.net) wrote:
: Mine is the first thing I ever wrote in perl.  Well apart from 'hello

I really have a hard time believing this, but that's the response you 
wanted, wasn't it?

: foreach(unpack q~c*~,qq|Ujlk+~qpkwzm.Ozms,w~\|tzm)&'?\$26\||)
: {print$a;$a=sprintf q^%c^,($_^(unpack q^c^,qq{ })^ord qq?\??)
: ;$a=~s[([1q4S!7U:z3#\\])]{$a};if($1){$a=~s<$1>^ ^;}$a=~s<([0^
: gf2\'\\\@\%\^qq968])>;$a;;($a=~s{$1}{.})if($1);}print v10.13;

Adam



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

Date: Wed, 13 Dec 2000 22:09:40 -0000
From: "Ed.Blackshaw" <Ed.Blackshaw@ic24.net>
Subject: Re: My first JAPH....
Message-Id: <wvSZ5.4275$y5.11307@news2-hme0>

I had a little help from the camel sitting in front of me... ;-)

e

Adam Spragg <atspragg@garbanzo.engr.ucdavis.edu> wrote in message
news:918rjb$kbr$1@mark.ucdavis.edu...
> Ed.Blackshaw (Ed.Blackshaw@ic24.net) wrote:
> : Mine is the first thing I ever wrote in perl.  Well apart from 'hello
>
> I really have a hard time believing this, but that's the response you
> wanted, wasn't it?
>
> : foreach(unpack q~c*~,qq|Ujlk+~qpkwzm.Ozms,w~\|tzm)&'?\$26\||)
> : {print$a;$a=sprintf q^%c^,($_^(unpack q^c^,qq{ })^ord qq?\??)
> : ;$a=~s[([1q4S!7U:z3#\\])]{$a};if($1){$a=~s<$1>^ ^;}$a=~s<([0^
> : gf2\'\\\@\%\^qq968])>;$a;;($a=~s{$1}{.})if($1);}print v10.13;
>
> Adam
>




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

Date: Wed, 13 Dec 2000 22:17:57 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: My first JAPH....
Message-Id: <3a3ef571.101284490@news.tcn.net>

On 13 Dec 2000 18:49:54 GMT, atspragg@garbanzo.engr.ucdavis.edu (Adam
Spragg) wrote:

>Necessity might be the mother of invention, but boredom is certainly the 
>father...
>
>@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
>eval join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
>(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
>"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print chr;}print"\n";
>
>Is that good?

I thought it was supposed to end with a comma?

--
 Richard Zilavec
 rzilavec@tcn.net


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

Date: 13 Dec 2000 22:29:49 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: My first JAPH....
Message-Id: <eli$0012131725@qz.little-neck.ny.us>

In comp.lang.perl.misc, Richard Zilavec <rzilavec@tcn.net> wrote:
> On 13 Dec 2000 18:49:54 GMT, atspragg@garbanzo.engr.ucdavis.edu (Adam
> Spragg) wrote:
[de-quoted for line length reasons]

@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
eval join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print chr;}print"\n";

> >Is that good?

My only comment is that I think it is worth the effort to try to
get all lines the same length, at least for JAPHs that need
long lines.

> I thought it was supposed to end with a comma?

While that is Randal's rule, many others don't follow it.

Elijah
------
perl -wle '$_ = Just_Another_Perl_Hacker; tr/_/ /; print'


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

Date: Wed, 13 Dec 2000 22:50:25 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: My first JAPH....
Message-Id: <37vf3t09cb0c4psffiv3g0fj0m6dpu8o42@4ax.com>

Adam Spragg wrote:

>@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
>eval join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
>(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
>"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print chr;}print"\n";
>
>Is that good?

Argument "" isn't numeric in chr at test.pl line 5.

If you replace "m%.{0,3}%g" with "m%.{1,3}%g", the warning disappears.
I'm not sure why you want to match an empty string, anyway.

-- 
	Bart.


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

Date: Wed, 13 Dec 2000 19:24:08 -0000
From: "Pierre Rodrigues" <pirod@webdifusao.com>
Subject: MySQL DBI install
Message-Id: <3a37cb9e$1@212.18.160.197>

I am trying to install
 Msql-Mysql-modules-1.2215

for DBI.

The perl Makefile.PL works OK.
But on make I have an error and cannot understand how to correct it. (see
below)

Required modules are installed
DBI
Data::ShowTable

Thanks for your help!!
Pierre

-- Error message
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "pt"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
chmod 644 mysql.bs
LD_RUN_PATH="/usr/lib/mysql:/lib:/usr/lib:/usr/lib/gcc-lib/i386-redhat-linux
/2.9
6" gcc -o ../blib/arch/auto/DBD/mysql/mysql.so  -shared -L/usr/local/lib
dbdimp.
o
mysql.o -L/usr/lib/mysql    -L/usr/lib/mysql -lmysqlclient -lm -lz -L/usr/li
b/
gcc-lib/i386-redhat-linux/2.96 -lgcc
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [../blib/arch/auto/DBD/mysql/mysql.so] Error 1
make[1]: Leaving directory `/home/user/perl/Msql-Mysql-modules-1.2215/mysql'
make: *** [subdirs] Error 2







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

Date: Wed, 13 Dec 2000 19:55:44 GMT
From: "Mike Saunders" <micsaund@home.com>
Subject: Parser to extract {} functions from a script (AMPLE)
Message-Id: <4vQZ5.21179$x6.12276087@news2.rdc2.tx.home.com>

Hi,

I've been searching around the net looking for this script,
but I'm having trouble finding keywords that narrow the
search, so I thought I'd turn to you guys and see if I can
save some time :^)

I am looking to extract a certain function from within an
ASCII file.  This file contains AMPLE code, which uses {}
and C-style comments.  I basically want to be able to look
for a certain function name ("init" for example) and then
print/save just that function.

I think this is more complex than it first appears, because
of the possibility of the "init" function being in the file
within /* .... */ comments.

Does anyone know of a perl-based parser that I can grab/hack/
study to see how this is done efficiently?  I've heard that
Effective Perl has a "{} matching" example, but I don't have
the book and I doubt that it will account for possibility of
comments/multiple entries/etc.

Thanks!!!
Mike





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

Date: Wed, 13 Dec 2000 22:07:42 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Parser to extract {} functions from a script (AMPLE)
Message-Id: <0isf3tkph6smq9946l9qvsavub667b7pd5@4ax.com>

Mike Saunders wrote:

>I've heard that Effective Perl has a "{} matching" example

If you want to extract balanced text, possibly even nested, then check
out Text::Balanced, which is part of the Parse::RecDescent distribution.
It was created in order to be able to recognize code blocks (in
particular, Perl code blocks that need to be executed when a grammar
rule matches).

-- 
	Bart.


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

Date: Wed, 13 Dec 2000 21:55:42 GMT
From: allen@mail-masters.com (Allen D Moore)
Subject: Perl Newbie Needs Form Script Help passing Data in the URL....
Message-Id: <3a37ee16.22306189@news.supernews.com>

Please help!

I am scripting a form in perl which contains numerous fields and need
to pre-fill data within some of the fields, yet allow the user to
re-enter different data if required:

print "<input type=\"text\" name=\"name\" size=\"24\"
value=\"$name\">";

where the refering url would contail data for the $name field...

like: http://www.somesite.com/form.cgi?name=value

What am I missing in order to get the data into the generated form?

TIA!

-Allen


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

Date: 13 Dec 2000 20:26:40 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 0.1 $)
Message-Id: <918m20$npa$1@news.NERO.NET>

In article <4ahf3tsb6jvbces8sns5o0tgfkp27dka6t@4ax.com>,
Bart Lateur  <bart.lateur@skynet.be> wrote:
>>HTML has the great advantage that many
>>newsreaders process it natively;
>
>Blech. That's no excuse. 

That's right, it's not. I wasn't using it as one. I was pointing out
that of the two markups, one that was being explicitely prohibited was
more supported in news than one that was apparently explicitely allowed.

>If you want to discuss Britney Spears, 

I have no desire to discuss Britney Spears.

>If you want to have meaningful discussions
>with experienced programmers about Perl, use text only.

My opinion exactly. Thanks for backing me up.



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

Date: 13 Dec 2000 21:53:55 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Problem using Image::Size on a webserver
Message-Id: <976744359.28205@itz.pp.sci.fi>

In article <4a2c6017b2g.soper@soundhouse.co.uk>, Geoff Soper wrote:
>In article <976674272.26866@itz.pp.sci.fi>,
>   Ilmari Karonen <iltzu@sci.invalid> wrote:
>> More elegant solution:
>
>>   use lib '/home/soundh/cgi-bin/required';
>
>Follow-up question, can I use two of these to allow for the program being
>run on my machine and on the server (with different locations)?

What happened when you tried it?  (rhetorical question)

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post
 something, we discuss its implications.  If the discussion happens to
 answer a question you've asked, that's incidental." -- nobull in clpm



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

Date: Wed, 13 Dec 2000 22:43:10 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: quick way to search array members
Message-Id: <nhuf3t4jlct6joqgqtfkeveaeil3sdgmq5@4ax.com>

Ren Maddox wrote:

>You may be thinking of "grep", but you should avoid that for this
>purpose as it will always search the entire array even if the element
>is found at the beginning of the array.  This can be quite wasteful.

Bogus. A search that aborts as soon as a match is found, will on average
still need to go through half of the items. For an item that isn't
there, you'll need to go through all of them anyway. If the likeliness
that what you're looking for isn't there, increases, the average number
of items that you need to search through will increase as well, i.e.
more than half of the total.

Building a hash to search for just one element, that is what I call
wasteful.

-- 
	Bart.


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

Date: Wed, 13 Dec 2000 11:59:30 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Redirection and variables
Message-Id: <3A37D522.9CAC2992@vpservices.com>

TSR wrote:
> 
> Program A calls Program B.  I want to add some scripting in the
> middle.  Now Program A calls Perl Script calls Program B.  Program A
> POSTs data and Program B GETs data.  When I add the Perl Script in the
> middle, how can I transfer the POSTed data from Program A through Perl
> Script to Program B without any user interaction in the Perl Script?
> ...
> I'm currently building a redirect using
> print
> $query->redirect('http://www.test.com/ProgramB?color1=red&color2=blue')
> This works, however there are some circumstances where the length
> could be longer than is allowed for a URL.  This is why I am looking
> for a better method.

This tiny script uses the LWP modules to pass along a post via a POST
request rather than the GET request you are using, thus avoiding the
problem you spotted.  It does this: reads in a post from form A or
program A; inserts, deletes, or modifies values of the post; sends the
post on as input to program B; accepts back the output of Program B;
prints that output to STDOUT (though one could just as easily print it
to a file or do something else).  BTW, this will automatically escape
things that need escaping; will send along username and password if
required; and will also honor multi-valued fields (e.g. treat a
radio-group as an array).

#!/usr/local/bin/perl -Tw
$|++;
use strict;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use CGI;
my $cgi = new CGI;

# place routines to change values here
#
#  $cgi->param( 'field_foo' => 3 );  # add or modify a value
#  $cgi->delete( 'field_bar' );      # delete a value
#

# Set these variables for "program B"
#
my $url      = 'http://foobar.edu/cgi-bin/test.cgi';
my $username = undef;
my $password = undef;

my $content  = $cgi->Vars;
my $ua       = LWP::UserAgent->new;
my $req      = POST $url, $content;
$req->authorization_basic($username, $password);
my $res      = $ua->request($req);
$res->is_success ? print $res->content
                 : print $res->message;
__END__

Enjoy!

-- 
Jeff


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

Date: Thu, 14 Dec 2000 09:11:48 +1100
From: "Troy Rasiah" <troyr@vicnet.net.au>
Subject: secure email
Message-Id: <qwSZ5.891$%v1.28941@ozemail.com.au>

Hi there,
              I have been trying to send secure email via a perl script but
not having much luck.

I used gpg to generate my keys.....followed the prompts and made my public
and private keys respectivley

I then used GnuPG::Interface to get the perl script to send the message. I
basically copied the sample script from the man page and changed code to
reflect my email address and passphrase etc

The error i'm gettin is as follows:
>>gpg: this cipher algorithm is depreciated; please use a more standard one!

I'm failry new to this topic so if anyone could point me in the right
direction or tell me what i've done wrong i'd be most grateful

sample script
 ------------------------------
#!/usr/bin/perl

use IO::Handle;
         use GnuPG::Interface;

         my @original_plaintext = ( "How do you doo?" );
         my $passphrase = "$mypassphrase";

         my $gnupg = GnuPG::Interface->new();

         $gnupg->options->hash_init( armor    => 1,
                                     recipients => [ $recipient_email,



                                                  '$recipient_public_key' ],
                                     #meta_interactive( 0 ),
                                   );

########       Encrypting

         # We'll let standard error to to our standard error
         my ( $input, $output ) = ( IO::Handle->new(),
                                    IO::Handle->new() );

         my $handles = GnuPG::Handles->new( stdin    => $input,
                                            stdout   => $output );

         # this sets up the communication
         # Note that the recipients were specified earlier
         # in the 'options' data member of the $gnupg object.
         $gnupg->encrypt( handles => $handles );

         # this passes in the plaintext
         print $input @original_plaintext;

         # this closes the communication channel,
         # indicating we are done
         close $input;

         my @ciphertext = <$output>;  # reading the output

         wait;  # clean up the finished GnuPG process



--
----------------------------------------------------------------------------
----------------
TR





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

Date: 13 Dec 2000 22:01:41 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: SIG{__DIE__} handler
Message-Id: <976744746.28769@itz.pp.sci.fi>

In article <3a379533_2@nnrp1.news.uk.psi.net>, ian mcg wrote:
>{
> local $SIG{__DIE__} = \&myDieHandler;
> $xml_upload->parse($xml_document);
>}
>
>Badly formed XML causes the handler to be called. However, well formed XML
>also calls the handler.
>
>Commenting out 'local $SIG{__DIE__} ...' results in badly formed XML
>crashing the program, and well formed XML being parsed as expected.
>
>Does anyone out there know why this happens?

No, but I do know a better way to do what you want:

  eval {
      $xml_upload->parse($xml_document);
  };
  myDieHandler($@) if $@;

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post
 something, we discuss its implications.  If the discussion happens to
 answer a question you've asked, that's incidental." -- nobull in clpm



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

Date: Wed, 13 Dec 2000 22:49:35 GMT
From: Chris <spudmuf@my-deja.com>
Subject: SSLeay..what level of encryption is being used?
Message-Id: <918udt$ei8$1@nnrp1.deja.com>

Hi,

I'm running windows nt4 with activeperl 5.6.0.620 and have installed
Crypt::SSLeay 0.17.1 and LWP.  I have a little perl program that sends
information to a secure website via HTTPS.  It seems to be working but
my question is how do I know what encryption level it is using?

Im really new to this but any help would be appreciated....

Thanks Chris


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 13 Dec 2000 19:43:27 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: To Blob or not To Blob
Message-Id: <3a38d0a7.91864756@news.tcn.net>

On Wed, 13 Dec 2000 07:11:23 GMT, Barnel <barnel@ottawa.com> wrote:

>Since this users will view and listen to these files from a web page
>would it not be simpler if I stored the uploaded file on the file system
>and simply put in the database the location of the files which I can
>later insert into a web page.

I would use the filesystem to store the media types and the database
to index them.  Maybe the size, height, width, name, some keyswords,
etc....  I think you would be looking at a performance issue in the
near future by storing the media in the database.

--
 Richard Zilavec
 rzilavec@tcn.net


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

Date: Wed, 13 Dec 2000 22:16:15 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Use PERL or Java? Which is faster?
Message-Id: <t3ft9fhs1ffb01@corp.supernews.com>

Nils O. Selåsdal (noselasd@frisurf.no) wrote:
: In the business world, the speed of your coding is often more important
: than the spped of the running program...

 ...but the maintainability and expandability of the resulting code usually
ends up being more important than either.

One of the nicest things about Moore's Law is that we've reached the point
at which most machines have more cycles and memory than they strictly
need, so we can afford some inefficiency for the sake of clarity and
modularity.  Something like XML is a revolutionary way to transfer data
only in the sense that, before 1990 or so, no app or small system could
possibly afford the overhead of passing around such a redundant,
inefficient, parser-cycle-eating data format.  (And yes, I know about the
SGML predecessors to XML, but they were used only on very large systems
and in strictly limited roles.) 

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "The hills are burning, and the wind is raging; and the clock
   |   strikes midnight in the Garden of Allah." - Don Henley


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

Date: Wed, 13 Dec 2000 20:17:31 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Using stat to get last mod.time
Message-Id: <3a37d95a.26cb$1d6@news.op.net>

In article <90oevh$kog$1@nnrp1.deja.com>,
Adam Levenstein  <cleon42@my-deja.com> wrote:
>($fsec,$fmin,$fhour,$fmday,$fmon,$fyear,$fwday,$fyday,$fisdst) = $mtime;

You need 

        localtime($mtime)

instead of just $mtime.

>Now, the simple question with the long answer - why doesn't this work?

Wrong question.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Wed, 13 Dec 2000 22:47:39 +0100
From: "Da Rula" <g.klijzing@zap.a2000.nl>
Subject: What is Perl anyway?
Message-Id: <918qu2$hur$1@darwin.a2000.nl>

Which machines use perl,and why should I use it?Is it for websites too?




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

Date: Wed, 13 Dec 2000 22:55:11 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: What is Perl anyway?
Message-Id: <slrn93fvm1.78b.tim@degree.ath.cx>

Da Rula <g.klijzing@zap.a2000.nl> wrote:
> Which machines use perl,and why should I use it?Is it for websites too?

`perldoc -q 'what is perl'`:

: Found in /usr/lib/perl5/5.6.0/pod/perlfaq1.pod
:   What is Perl?
: 
:             Perl is a high-level programming language with an eclectic
:             heritage written by Larry Wall and a cast of thousands. It
:             derives from the ubiquitous C programming language and to a
:             lesser extent from sed, awk, the Unix shell, and at least a
:             dozen other tools and languages. Perl's process, file, and text
:             manipulation facilities make it particularly well-suited for
:             tasks involving quick prototyping, system utilities, software
:             tools, system management tasks, database access, graphical
:             programming, networking, and world wide web programming. These
:             strengths make it especially popular with system administrators
:             and CGI script authors, but mathematicians, geneticists,
:             journalists, and even managers also use Perl. Maybe you should,
:             too.
 [ barrage of other "What is Perl*" questions snipped ]

This is the first question answered in perlfaq1.  If you don't have a
Perl distribution installed, you can view the Perl faq online at:

	http://www.perl.com/pub/doc/manual/html/pod/perlfaq1.html

-- 
-Tim Hammerquist <timmy@cpan.org>

People get annoyed when you try to debug them.
	-- Larry Wall, 1999


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

Date: Wed, 13 Dec 2000 22:46:32 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: what should managers know about perl?
Message-Id: <slrn93fv5r.78b.tim@degree.ath.cx>

Rene Nyffenegger <renenyffenegger@my-deja.com> wrote:
> I thought there was a faq on www.perl.com: "What should
> managers know about perl?" that dealt with issues
> like support and the like. Now, I don't find it anymore.
> Maybe because it had another name, maybe because I don't
> recall correctly.
> 
> I am asking for this (or something similar) because we are
> trying to convince some managers to use perl in our
> production environment.

Does it happen to be this one?

print `perldoc -q supervisor`;

: Found in /usr/lib/perl5/5.6.0/pod/perlfaq1.pod
:   How can I convince my sysadmin/supervisor/employees to use version
(5/5.005/Perl instead of some other language)?
: 
:             If your manager or employees are wary of unsupported software,
:             or software which doesn't officially ship with your operating
:             system, you might try to appeal to their self-interest. If
:             programmers can be more productive using and utilizing Perl
:             constructs, functionality, simplicity, and power, then the
:             typical manager/supervisor/employee may be persuaded. Regarding
:             using Perl in general, it's also sometimes helpful to point out
:             that delivery times may be reduced using Perl, as compared to
:             other languages.
: 
:             If you have a project which has a bottleneck, especially in
:             terms of translation or testing, Perl almost certainly will
:             provide a viable, and quick solution. In conjunction with any
:             persuasion effort, you should not fail to point out that Perl is
:             used, quite extensively, and with extremely reliable and
:             valuable results, at many large computer software and/or
:             hardware companies throughout the world. In fact, many Unix
:             vendors now ship Perl by default, and support is usually just a
:             news-posting away, if you can't find the answer in the
:             *comprehensive* documentation, including this FAQ.
: 
:             See http://www.perl.org/advocacy/ for more information.
: 
:             If you face reluctance to upgrading from an older version of
:             perl, then point out that version 4 is utterly unmaintained and
:             unsupported by the Perl Development Team. Another big sell for
:             Perl5 is the large number of modules and extensions which
:             greatly reduce development time for any given task. Also mention
:             that the difference between version 4 and version 5 of Perl is
:             like the difference between awk and C++. (Well, OK, maybe not
:             quite that distinct, but you get the idea.) If you want support
:             and a reasonable guarantee that what you're developing will
:             continue to work in the future, then you have to run the
:             supported version. That probably means running the 5.005
:             release, although 5.004 isn't that bad. Several important bugs
:             were fixed from the 5.000 through 5.003 versions, though, so try
:             upgrading past them if possible.
: 
:             Of particular note is the massive bug hunt for buffer overflow
:             problems that went into the 5.004 release. All releases prior to
:             that, including perl4, are considered insecure and should be
:             upgraded as soon as possible.
 [ snip ]

-- 
-Tim Hammerquist <timmy@cpan.org>
If the human mind was simple enough to understand,
we'd be too simple to understand it.
	-- Emerson Pugh


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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 5104
**************************************


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