[17386] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4808 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 4 09:05:27 2000

Date: Sat, 4 Nov 2000 06:05:10 -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: <973346710-v9-i4808@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 4 Nov 2000     Volume: 9 Number: 4808

Today's topics:
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
        Bijeenkomst Amsterdam Perl Mongers, Dinsdag 7 November  (Johan Vromans)
    Re: complex (for me anyway) rexexp <adancygier@nyc.rr.com>
        Emacs modules for Perl programming (Jari Aalto+mail.perl)
    Re: Freelance Programmer Neede - Good Money (Tony L. Svanstrom)
    Re: Freelance Programmer Neede - Good Money <wyzelli@yahoo.com>
    Re: Freelance Programmer Needed <gellyfish@gellyfish.com>
    Re: Freelance Programmer Needed <kevin@vailstar.com>
        Hex -> Text <same@make-it-online.com>
    Re: Hex -> Text (Gwyn Judd)
    Re: http request with back button <gellyfish@gellyfish.com>
        i'm new. will someone direct me? <rpark4@email.msn.com>
    Re: i'm new. will someone direct me? <wyzelli@yahoo.com>
    Re: i'm new. will someone direct me? <binbet01@cyberway.com.sg>
    Re: i'm new. will someone direct me? (Gwyn Judd)
    Re: Is there a better way to get "the element before $x <dontspamme@awdang.com>
    Re: Is there a better way to get "the element before $x (Gwyn Judd)
    Re: Is there a better way to get "the element before $x (Gwyn Judd)
        Looking for help mail@lboth.de
    Re: mmm Simple but how? Newbie needs help (David Wall)
    Re: Multi process under windows NT <blazer@mail.nevalink.ru>
        network security smittod@auburn.edu
    Re: network security <james@NOSPAM.demon.co.uk>
    Re: Perl Question <newsposter@cthulhu.demon.nl>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 04 Nov 2000 11:22:00 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage973337045.532@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://www.cpan.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

For an alternative way to get answers, check out the Perlfaq website.

    http://www.perlfaq.com/

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: 04 Nov 2000 11:42:40 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Bijeenkomst Amsterdam Perl Mongers, Dinsdag 7 November 2000
Message-Id: <m2y9z0kogv.fsf@phoenix.squirrel.nl>

[English version follows the dutch text]

Amsterdam.pm staat voor de "Amsterdamse Perl Mongers", een groep van
gebruikers van Perl. In tegenstelling tot wat de naam suggereert is
Amsterdam.pm niet beperkt tot alleen Amsterdam, maar functioneert, tot
er meer gebruikersgroepen in Nederland zijn, als Nederlandse
gebruikersgroep.

Amsterdam.pm organiseert informele bijeenkomsten waar Perl gebruikers
kunnen samenkomen en informatie en gebruikservaringen met betrekking
tot Perl kunnen uitwisselen. Deze bijeenkomsten vinden normaliter
plaats op elke eerste dinsdag van de maand. De voertaal binnen
Amsterdam.pm is in pricipe Nederlands, maar indien nodig zal Engels
worden gebruikt, b.v. om te communiceren met niet-Nederlandssprekende
aanwezigen.

De eerstvolgende bijeenkomst vindt plaats op dinsdag 7 november 2000 van
20:00 tot 22:00 uur op het kantoor van Dijkmat, Sarfatistraat 708,
Amsterdam. Deze bijeenkomst onder meer:

 - groepsfoto met Camel
 - voortgang werkgroepen
 - laatste nieuws over Perl6
 - en een heleboel Perl gezelligheid

Voor meer details, waaronder een routebeschrijving, zie
http://www.amsterdam.pm.org/Meetings/next_meeting.html

Liefhebbers van een etentje vooraf kunnen tussen 17:45 en 18:15
verzamelen bij Dijkmat. Om 18:15 (écht om 18:15!) zoeken we een
restaurantje in de buurt om een hapje te eten.

Bezoek onze Web site http://www.Amsterdam.pm.org voor meer details.

Let op: De volgende bijeenkomst is 12 december i.p.v. 5 december.

[English version]

Amsterdam.pm stands for the Amsterdam Perl Mongers. We're basically a
Perl user group. Despite its name, it is not local to the Amsterdam
environment, but it welcomes Perl mongers from all over the
Netherlands.

Amsterdam.pm organises informal meetings where Perl users can meet,
and exchange information and experiences with regard to using Perl.
The meetings are normally held every first Tuesday of the month.
Although the preferred language for communication is Dutch, English
will be spoken if necessary.

Our next meeting is Tuesday November 7th, 2000, from 20:00 till 22:00
at the office of Dijkmat, Sarfatistraat 708, Amsterdam. This meeting
will have:

 - group picture with Camel
 - progress working groups
 - latest news about Perl6
 - and lots of Perl fun

See http://www.amsterdam.pm.org/Meetings/next_meeting.html for
more detail and the directions to get there.

Should you want to join some of us for dinner, please gather between
17:45 and 18:15 at Dijkmat. At 18:15 sharp we'll leave for a
restaurant somewhere nearby for dinner.

See http://www.Amsterdam.pm.org for more details.

Note: The next meeting is December 12th, not 5th!


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

Date: Sat, 04 Nov 2000 07:30:32 GMT
From: Aaron Dancygier <adancygier@nyc.rr.com>
Subject: Re: complex (for me anyway) rexexp
Message-Id: <3A03BAE3.83809FAE@nyc.rr.com>

actually how about
1 while ($content =~ s/(print[^,]*),([^;]*;)/$1.$2/;

Aaron

Stephen Kloder wrote:

> Dave Brondsema wrote:
>
> > I have a string and I want to change every ", " to " . " if the ", " is
> > between "print" and ";".  I have some experience with regexps, but I
> > haven't done anything like this before.
> >
> > The closest I have so far is:
> > $content =~ s/print([.]*?);/print ;/gomi;
> >
> > but I obviously need a ", " somewhere on the left and " . " on the
> > right but I don't know where to put it.
> >
> > Here's an example of input/output:
> >
> > __INPUT__
> > $x = 2;
> > print "hello", $x, "goodbye";
> >
> > __OUTPUT__
> > $x=2
> > print "hello" . $x . "goodbye";
> >
>
> 1 while $content =~ s/(print.*),(.*;)/$1.$2/i;
>
> perldoc perlre
> perldoc perlop
> --
> Stephen Kloder               |   "I say what it occurs to me to say.
> stephenk@cc.gatech.edu       |      More I cannot say."
> Phone 404-874-6584           |   -- The Man in the Shack
> ICQ #65153895                |            be :- think.



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

Date: 04 Nov 2000 09:46:44 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_973331121@rtfm.mit.edu>

Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://home.eu.org/~jari/ema-keys.html
Maintainer: Jari Aalto <jari.aalto@poboxes.com>

Announcement: "What Emacs lisp modules can help with programming Perl"

    Preface

        Emacs is your friend if you have to do anything comcerning software
        development: It offers plug-in modules, written in Emacs lisp
        (elisp) language, that makes all your programmings wishes come
        true. Please introduce yourself to Emacs and your programming era
        will get a new light.

    Where to find Emacs

        XEmacs/Emacs, is available to various platforms:

        o   Unix:
            If you don't have one, bust your sysadm.
            http://www.gnu.org/software/emacs/emacs.html
            http://www.xemacs.org/
            Emacs resources at http://home.eu.org/~jari/emacs-elisp.html

        o   W9x/NT:
            http://www.gnu.org/software/emacs/windows/ntemacs.html

Emacs Perl Modules

    Cperl -- Perl programming mode

        .ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
        .<olson@mcs.anl.gov>           Bob Olson (started 1991)
        .<ilya@math.ohio-state.edu>    Ilya Zakharevich

        Major mode for editing perl files. Forget the default
        `perl-mode' that comes with Emacs, this is much better. Comes
        starndard in newest Emacs.

    TinyPerl -- Perl related utilities

        .http://home.eu.org/~jari/tiny-tools-beta.zip
        .http://home.eu.org/~jari/emacs-tiny-tools.html

        If you ever wonder how to deal with Perl POD pages or how to find
        documentation from all perl manpages, this package is for you.
        Couple of keystrokes and all the documentaion is in your hands.

        o   Instant function help: See documentation of `shift', `pop'...
        o   Show Perl manual pages in *pod* buffer
        o   Load source code into Emacs, like Devel::DProf.pm
        o   Grep through all Perl manpages (.pod)
        o   Follow POD manpage references to next pod page with TinyUrl
        o   Coloured pod pages with `font-lock'
        o   Separate `tiperl-pod-view-mode' for jumping topics and pages
            forward and backward in *pod* buffer.
        o   TinyUrl is used to jump to URLs (other pod pages, man pages etc)
            mentioned in POD pages. (It's a general URL minor mode)

    TinyIgrep -- Perl Code browsing and easy grepping

        [TinyIgrep is included in the tgz mentioned above]

        To grep from all installed Perl modules, define database to
        TinyIgrep. There is example in the tgz (ema-tigr.ini) that shows
        how to set up datatbases for Perl5, Perl4 whatever you have
        installed

        TinyIgrep calls Igrep.el to run the find for you, You can adjust
        recursive grep options, ignored case, add user grep options.

        You can get `igrep.el' module from <kevinr@ihs.com>. Ask for copy.
        Check also ftp://ftp.ihs.com/pub/kevinr/

    TinyCompile -- Browsing grep results in Emacs *compile* buffer

        TinyCompile is minor mode for *compile* buffer from where
        you can collapse unwanted lines, shorten the file URLs

            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT

            -->
            cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
            file1:NNN: MATCHED TEXT
            file1:NNN: MATCHED TEXT

End



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

Date: Sat, 04 Nov 2000 05:24:49 GMT
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Freelance Programmer Neede - Good Money
Message-Id: <1ejk72e.1shucsn1vvpwqvN%tony@svanstrom.com>

Lee Denny <lee@areality.co.uk> wrote:

> Sorry if this is the wrong group, but we need an urgent quote on the
> attached specification.
> Thanks in advance

I can tell that's going to cost a lot, I mean, to begin with I'd have to
hire someone to break into your office and computer just to find out
what you want done.


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
   on the verge of frenzy - i think my mask of sanity is about to slip
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©99-00 <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: Sat, 4 Nov 2000 16:59:00 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Freelance Programmer Neede - Good Money
Message-Id: <0VOM5.2$D47.254@vic.nntp.telstra.net>


"Russ Jones" <russ_jones@rac.ray.com> wrote in message
news:3A0337CD.F062A144@rac.ray.com...
>
> Are we there yet? Are we there yet? Are we there yet? Are we there
> yet?

We won't be there till after it gets dark!

Oh......

Is it dark yet?

:)

Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';




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

Date: 4 Nov 2000 11:33:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Freelance Programmer Needed
Message-Id: <8u0s6q$f6l$1@orpheus.gellyfish.com>

On Fri, 3 Nov 2000 16:44:31 -0000 Lee Denny wrote:
> Sorry if this is the wrong group, but we need an urgent quote on the
> attached specification.

You've got to be kidding - a 22K *Word* document ?  Not only is this the
wrong place to making a job posting it is considered to be in even worse
taste to be posting uuencoded binaries IMO.


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


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

Date: Sat, 04 Nov 2000 08:22:12 -0500
From: Kevin Michael Vail <kevin@vailstar.com>
Subject: Re: Freelance Programmer Needed
Message-Id: <kevin-BE89E8.08221204112000@news.his.com>

In article <8u0s6q$f6l$1@orpheus.gellyfish.com>, Jonathan Stowe 
<gellyfish@gellyfish.com> wrote:

> On Fri, 3 Nov 2000 16:44:31 -0000 Lee Denny wrote:
> > Sorry if this is the wrong group, but we need an urgent quote on the
> > attached specification.
> 
> You've got to be kidding - a 22K *Word* document ?  Not only is this the
> wrong place to making a job posting it is considered to be in even worse
> taste to be posting uuencoded binaries IMO.

Especially given the possibility of acquiring a cross-platform macro 
virus...
-- 
Kevin Michael Vail | a billion stars go spinning through the night,
kevin@vailstar.com | blazing high above your head.
 . . . . . . . . .  | But _in_ you is the presence that
 . . . . . . . . . | will be, when all the stars are dead.  (Rainer Maria Rilke)


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

Date: Sat, 4 Nov 2000 17:25:48 +0800
From: <same@make-it-online.com>
Subject: Hex -> Text
Message-Id: <MPG.146e56f9b6e56797989680@news.newsguy.com>

Hi,

Can someone show me how to convert Hex file to Text file?

Thanks!


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

Date: Sat, 04 Nov 2000 11:24:06 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Hex -> Text
Message-Id: <slrn907sej.h71.tjla@thislove.dyndns.org>

I was shocked! How could same@make-it-online.com <same@make-it-online.com>
say such a terrible thing:
>Hi,
>
>Can someone show me how to convert Hex file to Text file?

No. That is to say, not without knowing more about the format of the
file. I suggest you look at the documentation for pack() and unpack(). I
hope that helps.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Crime does not pay... as well as politics.

		-- A. E. Newman


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

Date: 4 Nov 2000 12:13:38 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: http request with back button
Message-Id: <8u0uhi$fou$1@orpheus.gellyfish.com>

On Fri, 03 Nov 2000 06:57:09 -0800 Salvador Peralta wrote:
> 
> 
> Clay Irving wrote:
>> 
>> On Fri, 03 Nov 2000 13:27:52 GMT, junk_npomfret@my-deja.com
>> <junk_npomfret@my-deja.com> wrote:
>> 
>> >Without using JavaScript, and without geting a 'Page has expired'
>> >message - how can I make my browser re-request a page with the user has
>> >hit the back button.
>> 
>> The Java newsgroup is down the hall to the right...
> 
> What does using this tag  <meta http-equiv="Pragma" content="no-cache">
> on the originating document to prevent the browser from reading it from
> cache have to do with Java?

What does it have to do with Perl for that matter ?

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


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

Date: Fri, 3 Nov 2000 22:48:14 -0800
From: "rpark4" <rpark4@email.msn.com>
Subject: i'm new. will someone direct me?
Message-Id: <#25C6viRAHA.322@cpmsnbbsa09>

Hello.

I would really really like to break into the whole perl/CGI thing. but i
don't know anything about where to start.

Does anyone know of a place where i can get a tutorial or any help on how to
get something started and what i need to start writing scripts and making
them work.

in other words i know nothing. but i know what i want to do. i want to be
able to program databases for my clients. i use flash and photoshop and know
html and CSS. but i would like to offer the database part also.

if anyone would be so kind as to tell me, or point me in the right direction
as to where i can get all the information a person such as myself would
need.


chris.




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

Date: Sat, 4 Nov 2000 16:57:00 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: i'm new. will someone direct me?
Message-Id: <bTOM5.1$D47.324@vic.nntp.telstra.net>

"rpark4" <rpark4@email.msn.com> wrote in message
news:#25C6viRAHA.322@cpmsnbbsa09...
> Hello.
>
> I would really really like to break into the whole perl/CGI thing. but i
> don't know anything about where to start.
>
> Does anyone know of a place where i can get a tutorial or any help on how
to
> get something started and what i need to start writing scripts and making
> them work.
>
> in other words i know nothing. but i know what i want to do. i want to be
> able to program databases for my clients. i use flash and photoshop and
know
> html and CSS. but i would like to offer the database part also.
>
> if anyone would be so kind as to tell me, or point me in the right
direction
> as to where i can get all the information a person such as myself would
> need.
>

www.perl.com is a good place to start.

Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';




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

Date: Sat, 04 Nov 2000 18:56:52 +0800
From: Lim Chung Ping <binbet01@cyberway.com.sg>
Subject: Re: i'm new. will someone direct me?
Message-Id: <3A03EB74.46522E76@cyberway.com.sg>

I am a new uesr too.
I have problem running perl file using a PWS or Apache.
Using win98.
Have tried to config the http.conf file to show where is the perl.exe located
 ..

Still get the error 500.

Can someone pls help me.. Need to get it up for sch assignment..

What I have:
1. Active perl
2. PWS
3. Apache (win32)

any thing else I needed?

I can run asp file and show the default html page.

Have tried to edit the registry scriptmap part but still no avail.

pls assist me.. Thanks and Regards



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

Date: Sat, 04 Nov 2000 11:26:37 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: i'm new. will someone direct me?
Message-Id: <slrn907sja.h71.tjla@thislove.dyndns.org>

I was shocked! How could Lim Chung Ping <binbet01@cyberway.com.sg>
say such a terrible thing:
>I am a new uesr too.
>I have problem running perl file using a PWS or Apache.
>
>Still get the error 500.

You are in the wrong newsgroup. You want to go to either:

comp.infosystems.www.authoring.cgi

or

comp.infosystems.www.servers.ms-windows

I hope that helps.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
If only is was as easy to banish hunger by rubbing the belly as it is to
masturbate.
		-- Diogenes the Cynic


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

Date: Sat, 04 Nov 2000 06:16:43 GMT
From: LimboStar <dontspamme@awdang.com>
Subject: Re: Is there a better way to get "the element before $x" in an array?
Message-Id: <8u09k9$p3c$1@nnrp1.deja.com>

In article <39F9EA65.6FDFA238@ipac.caltech.edu>,
  tim@ipac.caltech.edu wrote:
> my $prev_letter = $letters[
>        (grep $cur_letter eq $letters[$_], 0..$#letters)[0]
>                            - 1];

I just wanted to say thanks for this - I didn't ask the original
question but it's damn near exactly what I was looking for.

One question about this though - it creates a temporary array of size
$#letters, right?  For large arrays, this will eat memory.  Is there a
sleeker way of doing it, or is this the best in terms of a speed /
memory tradeoff?

Just curious.  Thanks again, anyway.

--
sjd;


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 04 Nov 2000 12:51:42 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Is there a better way to get "the element before $x" in an array?
Message-Id: <slrn9081iq.h71.tjla@thislove.dyndns.org>

I was shocked! How could LimboStar <dontspamme@awdang.com>
say such a terrible thing:
>In article <39F9EA65.6FDFA238@ipac.caltech.edu>,
>  tim@ipac.caltech.edu wrote:
>> my $prev_letter = $letters[
>>        (grep $cur_letter eq $letters[$_], 0..$#letters)[0]
>>                            - 1];
>
>I just wanted to say thanks for this - I didn't ask the original
>question but it's damn near exactly what I was looking for.
>
>One question about this though - it creates a temporary array of size
>$#letters, right?  For large arrays, this will eat memory.  Is there a
>sleeker way of doing it, or is this the best in terms of a speed /
>memory tradeoff?

Not quite. It creates an array with size equal to the number of letters
found. Also the given solution accesses past the end of the array.

I suggest a slightly more explicit solution:

($letters[$_] eq $cur_letter) && 
    ($index = $_, last)
    for (0..$#letters-1);

$prev_letter = $letters[$index-1];

print "Found $prev_letter before $index\n";

Or you could do:

use List::Util;

$index = first{$letters[$_] eq $cur_letter} 0..$#letters;

$prev_letter = $letters[$index-1];

List::Util isn't included with perl though so you'll need to install it.
It's probably faster than any of the solutions suggested thus far.

<digression>

Actually I wanted to do it in one line:

$prev_letter=$letters[${\(first{$letters[$_]eq$cur_letter}0..$#letters)}-1];

But it wouldn't let me due to a bug in the interpreter, I think. If you
do:

$prev_letter=$letters[${\(first{1;$letters[$_]eq$cur_letter}0..$#letters)}-1];

Then it does. I'm not up with the internals of perl enough to tell if
it's a bug in the core or in the module. perlbug submitted just in case.

</digression>

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.


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

Date: Sat, 04 Nov 2000 13:28:41 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Is there a better way to get "the element before $x" in an array?
Message-Id: <slrn9083o6.h71.tjla@thislove.dyndns.org>

I was shocked! How could Gwyn Judd <tjla@guvfybir.qlaqaf.bet>
say such a terrible thing:
>I was shocked! How could LimboStar <dontspamme@awdang.com>
>say such a terrible thing:
>>In article <39F9EA65.6FDFA238@ipac.caltech.edu>,
>>  tim@ipac.caltech.edu wrote:
>>> my $prev_letter = $letters[
>>>        (grep $cur_letter eq $letters[$_], 0..$#letters)[0]
>>>                            - 1];
>>
>>I just wanted to say thanks for this - I didn't ask the original
>>question but it's damn near exactly what I was looking for.
>>
>>One question about this though - it creates a temporary array of size
>>$#letters, right?  For large arrays, this will eat memory.  Is there a
>>sleeker way of doing it, or is this the best in terms of a speed /
>>memory tradeoff?

Also, from the point of view of speed, grep sucks if you are only
looking for one item, because grep will find them all right to the end
of the array, concatenate them into an array, which you then throw away
all but the first. Imagine a million element array (he says with a casual air
as if such a thing could exist in Perl) that had the one you're looking
for at the beginning. This solution here is also quite good, not
requiring an external module:

$prev_letter =
$letters[&{sub{($letters[$_]eq$cur_letter)&&return($_-1)for(0..$#letters-1)}}];

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Petribar, n.:
	Any sun-bleached prehistoric candy that has been sitting in
the window of a vending machine too long.
		-- Rich Hall, "Sniglets"


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

Date: Sat, 04 Nov 2000 10:39:57 +0100
From: mail@lboth.de
Subject: Looking for help
Message-Id: <3A03D96D.68DB487F@lboth.de>

Hi Folks!

I'd like to create a little online-game, and i'am
looking for motivated and talented perl-Programmers.
(Of course beginners are welcome too :) )
If you are interested in joining a "project" like
this, then take a look at:

http://www.lboth.de/cgi-bin/sronline.pl?befehl=rahmen&name=lars&pw=test

This is everything, that exists of this game up to now.
Feel free, to try everything you want.
If you'd like to answer me, then please use email only.
I'am not reading any newsgroup regularly!

Sincerely, Lars


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

Date: 2 Nov 2000 23:25:48 -0500
From: darkon@one.net (David Wall)
Subject: Re: mmm Simple but how? Newbie needs help
Message-Id: <8FE0E613Adarkononenet@206.112.192.118>

markscott@barclays.net (mark) wrote in <3a02212b@news.jakinternet.co.uk>:

>I'm very new to perl and CGI, and in simple terms What's the
>main difference between Perl and CGI? What is the factor that clicks
>in to say "Ha Perl Script or Ha ha! CGI Script?

See http://hoohoo.ncsa.uiuc.edu/cgi/, I think it will explain the 
differences pretty well.  CGI scripts can be written in Perl, but Perl can 
be used for considerably more than CGI scripting.  If you do decide to use 
Perl for your CGI scripts, http://www.perl.com/ will be of considerable use 
to you, as will the references on Lincoln Stein's site: 
http://stein.cshl.org/~lstein/.  Pay particular attention to CGI.pm (if you 
haven't already started using it).

BTW, you'll get more responses for CGI questions in the 
comp.infosystems.www.authoring.cgi newsgroup, as CGI is off-topic here.  A 
more descriptive subject line helps, too.

Hope this helps.

-- 
David Wall
darkon@one.net


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

Date: Sat, 04 Nov 2000 00:44:54 +0300
From: Mike Blazer <blazer@mail.nevalink.ru>
To: Tarael200 <tarael200@aol.com>
Subject: Re: Multi process under windows NT
Message-Id: <3A0331D6.6D6713E8@mail.nevalink.ru>

Tarael200 wrote:
> 
> >
> >Yes...get ActiveState's ActivePerl 5.6 (build 61x)...fork() is supported.
> >
> 
> Is it supported under Win95?

Yes, but seems like being extremely buggy.
I've got much better results with threads (Thread.pm) but they are not working in ActiveState builds. The only port that supported threads was Pete's PerlMagic. It was available at http://www.petes-place.com/ - the site is down now.

So, if you can build your own Perl, build it with threads and so forth.
-- 
==================================
Mike Blazer
blazer@mail.nevalink.ru
http://base.dux.ru/guest/fno/perl/
==================================


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

Date: Sat, 04 Nov 2000 07:58:19 GMT
From: smittod@auburn.edu
Subject: network security
Message-Id: <8u0fir$ss6$1@nnrp1.deja.com>

I'm pretty good with perl in general, but I want to get myself ready to
interview for a job with a company that deals with network security,
hacking detection and prevention, and things like that. The only job
requirements were a lot of experience with perl and understanding of
tcp/ip. Can anyone help me determine what I need to study? I've got the
perl down, but where do I go to learn how to use perl in conjunction
with network security and things this company would need? (I don't want
to ask them because I want to look like I know all about the job). A
long time ago I bought the book "Teach yourself TCP/IP in 14 days," but
it doesn't ever talk about scripting, just setting up networks. What
should I do?

Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 4 Nov 2000 09:53:02 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: network security
Message-Id: <ant040902d07fNdQ@oakseed.demon.co.uk>

In article <8u0fir$ss6$1@nnrp1.deja.com>,
<URL:mailto:smittod@auburn.edu> wrote:
> I'm pretty good with perl in general, but I want to get myself ready to
> interview for a job with a company that deals with network security,
> hacking detection and prevention, and things like that. The only job
> requirements were a lot of experience with perl and understanding of
> tcp/ip. Can anyone help me determine what I need to study?

In my (admittedly limited) experience, companies that specialise in
something do not expect new recruits to be expert in their field,
partly because they think they are the experts. So if the only stated
job requirements were for Perl and TCP/IP then that's all you should
need (other than enthusiasm and a pleasant nature at interview).

If you try to pretend to have knowledge of their specialism they will
undoubtedly question you on it, discover your limitations, and having
established that you are trying to pretend to be something you're not,
may also assume you're not anything else you claim to be.

Of course, for me to preach that honesty is the best policy, may
simply show my naivete. You should do what you think is right.

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: 2 Nov 2000 14:56:46 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Perl Question
Message-Id: <8trvbe$jot$1@internal-news.uu.net>

Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
> \begin[more]{offtopic}

> On Thu, 2 Nov 2000 01:20:00 +0000,
> 	James Taylor <james@NOSPAM.demon.co.uk> wrote:

>> Do many newsreaders support scorefiles (as opposed to killfiles)?

> Hmm. I don't know. I have only used slrn for quite some time now. I
> believe that knews had something like that as well, and I suspect that
> tin is more sophisticated nowadays, too.

tin has a generic filter, and you can assign values to specific
rules. Assign negative values => kill, positive values => select.

Erik



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

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


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