[23158] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5379 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 17 18:06:33 2003

Date: Sun, 17 Aug 2003 15:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 17 Aug 2003     Volume: 10 Number: 5379

Today's topics:
        Artificial intelligence (AI) has been solved (Arthur T. Murray)
    Re: comp.lang.perl.open.discussion rfc in alt.config <dha@panix.com>
    Re: comp.lang.perl.open.discussion rfc in alt.config <dngor@bellsouth.net>
        Cool Menus <smoke@groovin.com>
    Re: Encrypting a superuser <gellyfish@gellyfish.com>
    Re: how to rename 200 files in many sub-directories? <geoff.cox@blueyonder.co.uk>
    Re: how to rename 200 files in many sub-directories? <geoff.cox@blueyonder.co.uk>
    Re: how to rename 200 files in many sub-directories? <ian@WINDOZEdigiserv.net>
    Re: how to rename 200 files in many sub-directories? (Tad McClellan)
    Re: how to rename 200 files in many sub-directories? (Tad McClellan)
    Re: how to rename 200 files in many sub-directories? <geoff.cox@blueyonder.co.uk>
    Re: how to rename 200 files in many sub-directories? <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 17 Aug 2003 12:17:49 -0800
From: uj797@victoria.tc.ca (Arthur T. Murray)
Subject: Artificial intelligence (AI) has been solved
Message-Id: <3f3fd4dd@news.victoria.tc.ca>
Keywords: A Programming Language, AI, APL, artificial intelligence

> If it has, why isn't it telling us itself ?

The primitive-but-sufficient solution to AI is still evolving.

http://mentifex.virtualentity.com/apl.html -- for Mind.APL coding.

http://mentifex.virtualentity.com/acm.html -- step-by-step DIY AI.

http://mentifex.virtualentity.com/theory5.html -- Theory of Mind.


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

Date: Sun, 17 Aug 2003 18:48:35 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: comp.lang.perl.open.discussion rfc in alt.config
Message-Id: <slrnbjvjg3.f8k.dha@panix2.panix.com>

In article <j6lujv0a3p3m53alhfvckajtfqffveoh3n@4ax.com>, hudson wrote:
> On Sun, 17 Aug 2003 05:20:59 +0000 (UTC), "David H. Adler"
><dha@panix.com> wrote:
> 
>>From what I've been reading of your posts, you seem to be wanting not
>>open discussion - which is what happens on clpmisc - but discussion that
>>involves not telling people that you think they're doing something
>>wrong.
> 
> don't give me BS...what is happening on a.l.p.misc is not open
> discussion but zombie talk and dogma...isn't that true???

No.  First of all, what the heck is a.l.p.misc?  I assume you mean
'alt.lang.perl.misc', which doesn't exist.  This seems to relate to your
confusion about alt.config, dealt with elsewhere in this thread.

What's happening *here* is that what you call "zombie talk and dogma" is
simply stuff that's been discussed over and over again here.  That you
think you know better than those who have spent a lot of time discussing
these things doesn't mean that the accepted wisdom doesn't have reason
behind it.

One last thing - why did you answer my one post with two?  I note that
the one commenting on the difference between alt groups and others was
perfectly reasonable, while this one is argumentative and insulting.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Tegan's always being posessed!  She just wants attention.
        - Adric


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

Date: Sun, 17 Aug 2003 19:08:35 GMT
From: Rocco Caputo <dngor@bellsouth.net>
Subject: Re: comp.lang.perl.open.discussion rfc in alt.config
Message-Id: <slrnbjvl4a.f0.dngor@eyrie.homenet>

On Sun, 17 Aug 2003 03:12:32 -0700, hudson wrote:
> 
> don't give me BS...what is happening on a.l.p.misc is not open
> discussion but zombie talk and dogma...isn't that true???

I could quite easily accept that you believe this is alt.lang.perl.misc.
That's how serious the impedance mismatch between you and the froup is.

It must be said, though, that comp.lang.perl.open.discussion is a
hideous name for a newsgroup.

The usenet convention for "discussion" groups is to attach a -d to an
existing group's name.  This is usually reserved for newsgroups whose
charters prohibit general discussion.

Following that convention, the group comp.lang.perl.misc-d would be more
appropriate.  Unfortunately, the properly formed group name does not
fulfill your desire to attack comp.lang.perl.misc.

So let's focus on your more snarky "open discussion" idea.

Usenet would like to think it has a hierarchical namespace.
comp.lang.perl.open.discussion does not fall into any hierarchy, so
it'll probably get smacked down without much consideration.  If you
still prefer making an ass of yourself, I would advise you to consider:

  comp.lang.perl.discussion.open
  comp.lang.perl.open-discussion
  comp.lang.perl.misc.according-to-hudson

Either would be taken more seriously than your original proposal.

You seem to have entered into a bad situation here.  Rather than trying
to extricate yourself from it and make amends with the Perl community at
large, you seem to just be digging yourself deeper into it.

I suggest you calm down and take serious stock of your situation.  The
Internet and the Perl community have very long memories, and you are
acting like a child from what appears to be your business e-mail
address.

Good luck.  Don't become the next Matt Wright.

-- 
Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/



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

Date: Sun, 17 Aug 2003 14:49:40 -0400
From: Duckin Shrapnel <smoke@groovin.com>
Subject: Cool Menus
Message-Id: <vphvjvscissrnasr381m53afnbj2b3efl7@4ax.com>

Does anyone use / invoke the Cool Menus javascript with / from Perl?


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

Date: Sun, 17 Aug 2003 21:47:52 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Encrypting a superuser
Message-Id: <cKS%a.10$Yx6.2759@news.dircon.co.uk>

"JJ \(UK\)" <gee@i.cant.think.why.you'd.want.my.email.address.com> wrote:
> "Brian Harnish" <bharn_S_ish@te_P_chnologi_A_st._M_com> wrote in message
> news:pan.2003.08.15.16.05.12.48452@te_P_chnologi_A_st._M_com...
> > That's a really bad idea. Try something else, such as "sudo" if on
> > Unix/Linux. It would be too easy for someone to decrypt the password if
> > its in the script.
> 
> Ah, good point, I didn't make it clear that they're using Windows NT4 so
> that's not an option...
> 

I would suggest that you ask in some windows newsgroup about how you might
grant the user that is going to run this program the particular privilege
that is required to carry out its function and nothing else.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sun, 17 Aug 2003 17:13:27 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <ms7vjv4bdu211f2j31109iitlij3e4mv48@4ax.com>

On Sun, 17 Aug 2003 12:07:43 GMT, "John W. Krahn" <krahnj@acm.org>
wrote:

John,

Can you help with this?  I am using ActivePerl with Windows 98 (SE)
 ... have been looking at the use of Archive::Zip .. not clear how
Archive:: differs from File::   ?

When I use File::Find I get an syntax error message. Any ideas?

Cheers

Geoff

>use File::Find:
>
>my $dir = 'c:/docs';
># The -p option from Info-ZIP's unzip sends file data to stdout.
># It may not be the same in WinZIP's wzunzip
>my $unzip = 'wzunzip.exe -p';
>
>find( sub {
>    ( my $name = $_ ) =~ s/\.zip$/.doc/i or return;
>    open my $doc, '>', $name or die "Cannot open $name: $!";
>    binmode $doc;
>    print $doc qx( "$unzip $_" ) or die "Cannot print to $name: $!";
>    unlink $_ or warn "Cannot delete $_: $!";
>    }, $dir );
>
>__END__
>
>
>
>John



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

Date: Sun, 17 Aug 2003 17:15:50 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <7eavjv811bipc8lj3k990ataem0fn375j9@4ax.com>

On Sun, 17 Aug 2003 18:44:08 +1000, "Gregory Toomey"
<NOSPAM@bigpond.com> wrote:

>"Geoff Cox" <geoff.cox@blueyonder.co.uk> wrote in message
>news:89fujvcs00g1bl19g20m601189nm479nbf@4ax.com...
>> Hello,
>>
>> I have over 200 zip files in about 100 sub-directories of say c:\docs.
>...
>> Any ideas please!
>> Thanks
>> Geoff
>
>You can use Archive::Zip in Perl to manipulate the zip files.

Thanks for the info - have started to look at the example files which
come with Archive::Zip but any suggestions re where I can find  info
on how to use it?

Incidentally it was installed with ActivePerl 5.8 as others have
said..

Cheers

Geoff


>
>gtoomey
>



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

Date: Sun, 17 Aug 2003 16:33:03 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <20030817173308.57b10bde.ian@WINDOZEdigiserv.net>

On Sun, 17 Aug 2003 17:15:50 +0100 in
<message-id:7eavjv811bipc8lj3k990ataem0fn375j9@4ax.com>
Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:

> On Sun, 17 Aug 2003 18:44:08 +1000, "Gregory Toomey"
> <NOSPAM@bigpond.com> wrote:
> 
> >"Geoff Cox" <geoff.cox@blueyonder.co.uk> wrote in message
> >news:89fujvcs00g1bl19g20m601189nm479nbf@4ax.com...
> >> Hello,
> >>
> >> I have over 200 zip files in about 100 sub-directories of say
> >c:\docs....
> >> Any ideas please!
> >> Thanks
> >> Geoff
> >
> >You can use Archive::Zip in Perl to manipulate the zip files.
> 
> Thanks for the info - have started to look at the example files which
> come with Archive::Zip but any suggestions re where I can find  info
> on how to use it?
> 
> Incidentally it was installed with ActivePerl 5.8 as others have
> said..
> 
> Cheers
> 
> Geoff


Geoff,

Here's the function I use to automagically unzip my anti-virus update
files. The '$quiet' option is there as I run this as an automated task
daily from a cronjob.
(Please note: I'm not claiming this perfect code, but it works for
me=)):

      6 use Archive::Zip qw(:ERROR_CODES :CONSTANTS);

        [ ... ]

    118 sub unzip() {
    119     my ($fp_path, $def) = @_;
    120     my ($ret, $success);
    121     my $zip = Archive::Zip->new;
    122     if ($zip->read("$tmp_path/$def") != AZ_OK) {
    123         unless ($quiet) { print "Cannot open $def\n"; }
    124 
    125         return;
    126     }
    127 
    128     foreach ($zip->memberNames()) {
    129         $zip->extractMember($_, "$fp_path/$_");
    130         $success .= "$_\n";
    131     }
    132 
    133     unless ($quiet) {
    134         if ($success) {
    135             chomp($success);
    136             print "\n\nThe following files have been installed
from '$def'\n\n$success\n";    137         } else {
    138             print "\n\nNo files were installed from '$def'\n";
    139         }
    140     }
    141 
    142     return;
    143 }



HTH.



Regards,

  Ian


-- 
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.


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

Date: Sun, 17 Aug 2003 11:44:57 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <slrnbjvc89.l1e.tadmc@magna.augustmail.com>

Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:


> Archive::Zip but any suggestions re where I can find  info
> on how to use it?


Have you tried reading the documentation that comes with the module yet?


   perldoc Archive::Zip


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


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

Date: Sun, 17 Aug 2003 11:43:49 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <slrnbjvc65.l1e.tadmc@magna.augustmail.com>

Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:

> When I use File::Find I get an syntax error message. Any ideas?


Fix the invalid syntax.

We (still) cannot help you fix your code if you do not show us your code...


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


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

Date: Sun, 17 Aug 2003 18:24:58 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <6ievjvk4htj9ekq1e3ksd93aa0mec4jabd@4ax.com>

On Sun, 17 Aug 2003 11:43:49 -0500, tadmc@augustmail.com (Tad
McClellan) wrote:

>Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:
>
>> When I use File::Find I get an syntax error message. Any ideas?
>
>
>Fix the invalid syntax.

It turned out to be a : instead of a ; at the end of the line..

>We (still) cannot help you fix your code if you do not show us your code...

Problem is - I am trying to get an idea of where to start! Have used
perl a few years ago and it is slow to come back..

I now have 2 routes - use Archive::Zip or File::Find  .... 

Cheers

Geoff



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

Date: Sun, 17 Aug 2003 17:34:47 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <3F3FBCB3.6030001@rochester.rr.com>

Geoff Cox wrote:

> On Sun, 17 Aug 2003 12:07:43 GMT, "John W. Krahn" <krahnj@acm.org>
> wrote:
 ...


> When I use File::Find I get an syntax error message. Any ideas?
 ...


> Geoff
> 
> 
>>use File::Find:

;---------------^


 ...
>>John

-- 
Bob Walton



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

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


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