[22130] in Perl-Users-Digest
Perl-Users Digest, Issue: 4352 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 6 18:05:57 2003
Date: Mon, 6 Jan 2003 15:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 6 Jan 2003 Volume: 10 Number: 4352
Today's topics:
A Good Perl Book <sjcole@hotmail.com>
A Good Perl Book <sjcole@hotmail.com>
Animal House (was Re: Variable is getting reset, but wh (Tad McClellan)
error with @ sign (Mac)
Re: error with @ sign <kasp@epatra.com>
Forms Question - Newbie (unixfox)
Re: Forms Question - Newbie <s.patterson@freeuk.com>
Re: how to refer to the array? (Tad McClellan)
insert newlines in a long string <sfarris9@insightbb.com>
Re: insert newlines in a long string <tony_curtis32@yahoo.com>
Re: insert newlines in a long string <kasp@epatra.com>
Re: insert newlines in a long string <sfarris9@insightbb.com>
Re: insert newlines in a long string <sfarris9@insightbb.com>
Re: insert newlines in a long string <kasp@epatra.com>
Re: insert newlines in a long string (Anno Siegel)
Re: insert newlines in a long string <truthxayer@yahoo.com>
let a perl script run as root <phsan@cs.siu.edu>
Re: let a perl script run as root <perl-dvd@darklaser.com>
Re: let a perl script run as root (Tad McClellan)
Re: let a perl script run as root <perl-dvd@darklaser.com>
Re: let a perl script run as root <mgjv@tradingpost.com.au>
Re: Noob: Variable is getting reset, but why? <jackstraw@witchita>
Re: Noob: Variable is getting reset, but why? <bongie@gmx.net>
Re: Noob: Variable is getting reset, but why? <jackstraw@witchita>
Re: Performance for my roguelike <peter@nospam.calweb.com>
Re: Perl on Pocket PC 2002? <jeff@vpservices.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 6 Jan 2003 22:44:46 -0000
From: "Steve C" <sjcole@hotmail.com>
Subject: A Good Perl Book
Message-Id: <1041892886.117181@ananke.eclipse.net.uk>
Hiya Folks,
I'm just about to order the O'Reilly book: Programming Perl (Authors Larry
Wall, Tom Christiansen, Jon Orwant)
I know there's plenty of online material - but you know, I like to be able
to read something in the local pub / bar ! (sad !!)
Is this book to be recommended by the many perl gurus on this NG, or should
I be considering something different ?
For information: I have only ever programmed in PASCAL, BASIC, COBOL, Visual
Basic (Arrgghh!) and more recntly dabbled with PHP4
Many Thanks
Steve C.
------------------------------
Date: Mon, 6 Jan 2003 22:45:27 -0000
From: "Steve C" <sjcole@hotmail.com>
Subject: A Good Perl Book
Message-Id: <1041892895.356594@ananke.eclipse.net.uk>
Hiya Folks,
I'm just about to order the O'Reilly book: Programming Perl (Authors Larry
Wall, Tom Christiansen, Jon Orwant)
I know there's plenty of online material - but you know, I like to be able
to read something in the local pub / bar ! (sad !!)
Is this book to be recommended by the many perl gurus on this NG, or should
I be considering something different ?
For information: I have only ever programmed in PASCAL, BASIC, COBOL, Visual
Basic (Arrgghh!) and more recntly dabbled with PHP4
Many Thanks
Steve C.
------------------------------
Date: Mon, 6 Jan 2003 15:53:41 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Animal House (was Re: Variable is getting reset, but why?)
Message-Id: <slrnb1jun5.ckb.tadmc@magna.augustmail.com>
Kasp <kasp@epatra.com> wrote:
> "Jack Straw" <jackstraw@witchita> wrote in message
> news:brgj1vo47c1mo2ta8r4o0fq697bchaudnk@4ax.com...
>> "Was it over when the Germans bombed Pearl Harbor? Hell no!"
>> -- Bluto
> PS: It was the "Japanese" that attacked Pearl Harbor and not the Germans.
Well yes, so the quote accurately portrays the "Bluto" character!
I guess you are not a fan of the movie "Animal House".
There is a sound clip of Bluto (John Bulushi) saying the above at:
http://www.moviesounds.com/animal.html
Or to see the quote with more context:
http://www.whysanity.net/monos/ahouse.html
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Jan 2003 13:56:16 -0800
From: schuckm@emigrant.com (Mac)
Subject: error with @ sign
Message-Id: <3d9b1ac6.0301061356.7e27a7fa@posting.google.com>
I am writing out html with the perl print funtion and am getting and
error when I use the "@" sign. I figured this may be because
------------------------------
Date: Tue, 7 Jan 2003 03:30:14 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: error with @ sign
Message-Id: <avcu9j$dlm$1@newsreader.mailgate.org>
"Mac" <schuckm@emigrant.com> wrote in message
news:3d9b1ac6.0301061356.7e27a7fa@posting.google.com...
> I am writing out html with the perl print funtion and am getting and
> error when I use the "@" sign. I figured this may be because
You should escape the @ as it has a special meaning.
Go for "\@".
HTH.
------------------------------
Date: 6 Jan 2003 13:44:11 -0800
From: unixfox@planetlink.net (unixfox)
Subject: Forms Question - Newbie
Message-Id: <f914825a.0301061344.1df811d1@posting.google.com>
I have created an input form that submits records to a database via
Perl/CGI script.
Is it possible to retrieve those records into the same form for
editing or deleting? If so, what changes will I have to make to the
original form to have my records updated after the edit or delete.
Thanks in advance...
------------------------------
Date: 6 Jan 2003 22:33:06 GMT
From: Stephen Patterson <s.patterson@freeuk.com>
Subject: Re: Forms Question - Newbie
Message-Id: <slrnb1k10v.2c9.s.patterson@eccles.localdomain>
On 6 Jan 2003 13:44:11 -0800, unixfox wrote:
> I have created an input form that submits records to a database via
> Perl/CGI script.
>
> Is it possible to retrieve those records into the same form for
> editing or deleting? If so, what changes will I have to make to the
> original form to have my records updated after the edit or delete.
Having done just that, yes
After the insert, reload the form with the entered values in (using
-value => in the inputs ), add some hidden fields so you can uniquely
identify this record with its current values. Then, once you've got
the data off the form, it should be simple to update it.
On a side note, I hope you're familiar with writing your own
subroutines (I'd have one to just display the form), and I take it
you'll be using the CGI module (it just makes some things easier).
--
Stephen Patterson http://www.lexx.uklinux.net http://patter.mine.nu
steve@SPAM.lexx.uklinux.net remove SPAM to reply
Linux Counter No: 142831 GPG Public key: 252B8B37
Last one down the pub's an MCSE
------------------------------
Date: Mon, 6 Jan 2003 16:13:22 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: how to refer to the array?
Message-Id: <slrnb1jvs2.ckb.tadmc@magna.augustmail.com>
Michael Peuser \(h\) <post@mpeuser.de> wrote:
> "John W. Krahn" <krahnj@acm.org> schrieb im Newsbeitrag
> news:3E196C59.6A71E7EA@acm.org...
>> push @{$countyInfo{$_}[1]}, 11111 for keys %countyInfo;
>
> I think the previous line should read:
> push @{$countyInfo{$_} -> [1]}, 11111 for keys %countyInfo;
Why do you think that?
(hope I'm not mis-speaking again... :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 06 Jan 2003 19:55:49 GMT
From: steven farris <sfarris9@insightbb.com>
Subject: insert newlines in a long string
Message-Id: <9blS9.461377$pN3.49819@sccrnsc03>
Hello, how could i take a long string in perl
and insert newlines at the whitespace nearest
to 80 chars? So a string that contains 320 chars
would have roughly 5 newlines inserted into
it.
------------------------------
Date: Mon, 06 Jan 2003 14:03:01 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: insert newlines in a long string
Message-Id: <87znqeyrka.fsf@limey.hpcc.uh.edu>
>> On Mon, 06 Jan 2003 19:55:49 GMT,
>> steven farris <sfarris9@insightbb.com> said:
> Hello, how could i take a long string in perl and insert
> newlines at the whitespace nearest to 80 chars? So a
> string that contains 320 chars would have roughly 5
> newlines inserted into it.
Text::Wrap is one way.
hth
t
------------------------------
Date: Tue, 7 Jan 2003 01:34:04 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: insert newlines in a long string
Message-Id: <avcnfr$8lv$1@newsreader.mailgate.org>
"steven farris" <sfarris9@insightbb.com> wrote in message
news:9blS9.461377$pN3.49819@sccrnsc03...
> Hello, how could i take a long string in perl
> and insert newlines at the whitespace nearest
> to 80 chars? So a string that contains 320 chars
> would have roughly 5 newlines inserted into
> it.
I think what you need exactly is that whatever be the whitespace just
before/closest to 80 character (column margin), it should be replaced by
\n...Right?
--
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
-- Larry Wall in the perl man page
------------------------------
Date: Mon, 06 Jan 2003 20:13:01 GMT
From: steven farris <sfarris9@insightbb.com>
Subject: Re: insert newlines in a long string
Message-Id: <hrlS9.265671$qF3.23545@sccrnsc04>
Kasp wrote:
> "steven farris" <sfarris9@insightbb.com> wrote in message
> news:9blS9.461377$pN3.49819@sccrnsc03...
>> Hello, how could i take a long string in perl
>> and insert newlines at the whitespace nearest
>> to 80 chars? So a string that contains 320 chars
>> would have roughly 5 newlines inserted into
>> it.
>
> I think what you need exactly is that whatever be the whitespace just
> before/closest to 80 character (column margin), it should be replaced by
> \n...Right?
Yes, that is correct.
>
> --
> Perl is designed to give you several ways to do anything, so
> consider picking the most readable one.
> -- Larry Wall in the perl man page
------------------------------
Date: Mon, 06 Jan 2003 20:17:51 GMT
From: steven farris <sfarris9@insightbb.com>
Subject: Re: insert newlines in a long string
Message-Id: <PvlS9.265711$qF3.23137@sccrnsc04>
Tony Curtis wrote:
>>> On Mon, 06 Jan 2003 19:55:49 GMT,
>>> steven farris <sfarris9@insightbb.com> said:
>
>> Hello, how could i take a long string in perl and insert
>> newlines at the whitespace nearest to 80 chars? So a
>> string that contains 320 chars would have roughly 5
>> newlines inserted into it.
>
> Text::Wrap is one way.
Thanks, this works well. I'm also curious about
a solution using regular exp.
>
> hth
> t
------------------------------
Date: Tue, 7 Jan 2003 02:01:48 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: insert newlines in a long string
Message-Id: <avcp3q$9qg$1@newsreader.mailgate.org>
> > I think what you need exactly is that whatever be the whitespace just
> > before/closest to 80 character (column margin), it should be replaced by
> > \n...Right?
>
> Yes, that is correct.
I found this... http://www.pgts.com.au/download/scripts/fm
And I will try this problem with regexp later.
------------------------------
Date: 6 Jan 2003 22:17:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: insert newlines in a long string
Message-Id: <avcvaj$4pf$1@mamenchi.zrz.TU-Berlin.DE>
steven farris <sfarris9@insightbb.com> wrote in comp.lang.perl.misc:
> Tony Curtis wrote:
>
> >>> On Mon, 06 Jan 2003 19:55:49 GMT,
> >>> steven farris <sfarris9@insightbb.com> said:
> >
> >> Hello, how could i take a long string in perl and insert
> >> newlines at the whitespace nearest to 80 chars? So a
> >> string that contains 320 chars would have roughly 5
> >> newlines inserted into it.
> >
> > Text::Wrap is one way.
>
> Thanks, this works well. I'm also curious about
> a solution using regular exp.
You probably mean a substitution operation (of which a regex is only
one part). This comes close:
s/(.{1,79}) /$1\n/g
However, please stick with the module. The simple substitution doesn't
provide a final linefeed, and it doesn't treat the case when there isn't
a blank within 80 characters (this could be amended). There are probably
more weird cases it doesn't deal with. The module is tried and tested.
Anno
------------------------------
Date: Mon, 06 Jan 2003 14:13:05 -0800
From: TruthXayer <truthxayer@yahoo.com>
Subject: Re: insert newlines in a long string
Message-Id: <3E19FF71.3090001@yahoo.com>
Try using the Text::Format module, it has other nice features as well.
my @str = qq{ whatever this crap is needs to be formatted, and
into Another Monday evening. Another summary to write.
Starting, as is becoming tediously predictable, with perl6-internals.
Another JIT Discussion Toward the end of the previous week,
Leopold To"tsch posted something about the latest round of changes
to the JIT core. Daniel Grunblatt was concerned that the
current JIT wasn't doing the correct thing when it came to hardware
register allocation and wanted to remove a some conditional
logic. Leo didn't agree at first, but became convinced and
aniel's requested change was applied.
};
$text = Text::Format->new ;
$text->text(\@str);
$text->columns(80);
print $text->format(@str);
steven farris wrote:
> Hello, how could i take a long string in perl
> and insert newlines at the whitespace nearest
> to 80 chars? So a string that contains 320 chars
> would have roughly 5 newlines inserted into
> it.
------------------------------
Date: Mon, 6 Jan 2003 13:50:34 -0600
From: "Philip" <phsan@cs.siu.edu>
Subject: let a perl script run as root
Message-Id: <avcmkg$548$1@saluki-news.it.siu.edu>
Is there anyway to let a perl script run as root in unix? I tried the
following things:
1) set the own of thr script to root
2) set setuid on the script
But still does not work. Any suggestion will be appreciated.
--
Thanks,
Philip
------------------------------
Date: Mon, 06 Jan 2003 21:21:32 GMT
From: "David" <perl-dvd@darklaser.com>
Subject: Re: let a perl script run as root
Message-Id: <wrmS9.19$uS.15355@news-west.eli.net>
"Philip" <phsan@cs.siu.edu> wrote in message
news:avcmkg$548$1@saluki-news.it.siu.edu...
> Is there anyway to let a perl script run as root in unix? I tried the
> following things:
> 1) set the own of thr script to root
> 2) set setuid on the script
>
> But still does not work. Any suggestion will be appreciated.
This is completely off topic (should be under web servers or apache if
thats what you have),
In answer: even if you can, that would be a serious mistake, and about
the biggest security hole you could provide to a hacker.
David
------------------------------
Date: Mon, 6 Jan 2003 16:15:13 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: let a perl script run as root
Message-Id: <slrnb1jvvh.ckb.tadmc@magna.augustmail.com>
Philip <phsan@cs.siu.edu> wrote:
> Is there anyway to let a perl script run as root in unix?
Yes.
1) login as root
2) run the script
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 06 Jan 2003 22:37:54 GMT
From: "David" <perl-dvd@darklaser.com>
Subject: Re: let a perl script run as root
Message-Id: <6znS9.22$uS.16501@news-west.eli.net>
"David" <perl-dvd@darklaser.com> wrote in message
news:wrmS9.19$uS.15355@news-west.eli.net...
> "Philip" <phsan@cs.siu.edu> wrote in message
> news:avcmkg$548$1@saluki-news.it.siu.edu...
> > Is there anyway to let a perl script run as root in unix? I tried
the
> > following things:
> > 1) set the own of thr script to root
> > 2) set setuid on the script
> >
> > But still does not work. Any suggestion will be appreciated.
>
> This is completely off topic (should be under web servers or apache if
> thats what you have),
> In answer: even if you can, that would be a serious mistake, and about
> the biggest security hole you could provide to a hacker.
Allow me to apologize, I guess my brain was on web servers. I thought
you had mentioned something that is simply not there. I'll shut up now.
David
------------------------------
Date: Mon, 06 Jan 2003 22:40:02 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: let a perl script run as root
Message-Id: <slrnb1k1e2.2j6.mgjv@verbruggen.comdyn.com.au>
On Mon, 06 Jan 2003 21:21:32 GMT,
David <perl-dvd@darklaser.com> wrote:
> "Philip" <phsan@cs.siu.edu> wrote in message
> news:avcmkg$548$1@saluki-news.it.siu.edu...
>> Is there anyway to let a perl script run as root in unix? I tried the
>> following things:
>> 1) set the own of thr script to root
>> 2) set setuid on the script
>>
>> But still does not work. Any suggestion will be appreciated.
>
> This is completely off topic (should be under web servers or apache if
> thats what you have),
I don't see anything in this post to suggest that the OP wants to run
a Perl program from a web server as root.
> In answer: even if you can, that would be a serious mistake, and about
> the biggest security hole you could provide to a hacker.
If it is a CGI program, then yes, I agree, although someone who knows
what they are doing can make that safe. However, the OP is not that
person, or they would not be asking this question. If the OP is indeed
trying this, I'll happily add my voice to the chorus of dissuasion
that will follow.
To the OP: If you are trying to write a command line tool that needs
to run as root, I suggest you use sudo (which has nothing to do with
Perl, but everything with that you are trying to do).
Make sure you have read perlsec, and understand what it says.
The answer to your question (how to get setuid Perl scripts to work)
is also contained within that document, but I strongly suggest you
don't make programs setuid root unless you _have_ to.
Martien
--
|
Martien Verbruggen |
Trading Post Australia | Can't say that it is, 'cause it ain't.
|
------------------------------
Date: Mon, 06 Jan 2003 14:42:36 -0500
From: Jack Straw <jackstraw@witchita>
Subject: Re: Noob: Variable is getting reset, but why?
Message-Id: <fslj1vkn9m89iov5nhvhi156c8gs79agkd@4ax.com>
Brian McCauley <nobull@mail.com>:
>Jack Straw <jackstraw@witchita> writes:
>
>> Subject: Noob: Variable is getting reset, but why?
>
>"Noob" will be read as "person too lazy to read the manual and can't
>even spell newbie".
Well, it should be read as someone who's not very confident in what
they're doing, and is willing to admit as such.
>If this is the case then please read the manuals before you posr.
I have read Learning, Programming, and Cookbook, but that's a lot
different that understanding everything. Perl has been rather
difficult for me, I'm having a hard time understandg how Perl thinks,
'cause it seems like alot more is impied than in other languages.
>If this is _not_ the case then why waste valuable space in your
>subject line to give the wrong impression?
>
>Have you actually tried running under the debugger or putting in some
>dianostic prints to see if the variable really is getting reset?
>
>No, you haven't.
Yes, of course I have. But *I'm confused*.
>It was just a wild, and completely inaccurate, guess.
It may have been inaccurate, but it's not wild. I've been working on
this for a while, and do not feel guilty for not having done my
research. On the one hand, I undestand frustrations with stupid
questions, but on the other hand, being overly-harsh doesn't do much
for perl advocacy either.
>I notice that you did enable warnings. And the warnings your code
>generates should have given a big clue as to what was wrong.
What I get is "Use of uninitialized value", which doesn't make any
sense at all to me. If it's inside of the IF condition with the
match, then how could the $1 *not* be initialized?
>> What I don't understand is, that when I double-check my answers, the
>> total-bytes number is for the last tape only, not the sum for the
>> entire list of tapes that I have in my regexp. Why would that be?
>
>Because your regex is wrong.
>
>Your regex may match 3 different tagets but only in one is anything
>captured in $1.
I don't understand. In my input file, there is definietly a bytes
field (the one I'm trying to get w/ $1) in every record, no matter
whether it's one of the specific tapes I'm trying to filter on or not.
So, when a line is 'good', no matter which of the three targets
matched, I will have a valid bytes field.
>That's why you see the warning "Use of uninitialized value in
>addition (+)" in the line where you do:
>
>> $to_be_recalled_bytes += $1;
>
>Your regex was:
>
>> /^.{183}Y00545|Y01779|Y07001.{60}(.{10})/
>
>You meant:
>
> /^.{183}(?:Y00545|Y01779|Y07001).{60}(.{10})/
I have no idea what your change does, would you explain it please?
I know that the '?' can be used after an atom to call for 0 or 1 time,
but that looks like it would apply to the '(', so I think that's
wrong.
I guess that means that it is used as an assertion, but the two
examples I have in Learning use '?=' and '?!'. I don't see what the
'?:' is doing at all.
When would need to use a lookahead assertion? My regexp seems simple
to me, and very similar to other ones I've written. Maybe that's why
I'm so confused.
PS: Hope your day gets better, seriously.
--
JackStraw
0x3D561045
------------------------------
Date: Mon, 06 Jan 2003 21:35:28 +0100
From: "Harald H.-J. Bongartz" <bongie@gmx.net>
Subject: Re: Noob: Variable is getting reset, but why?
Message-Id: <1247915.q9tTflaP7X@nyoga.dubu.de>
Jack Straw wrote:
> Brian McCauley <nobull@mail.com>:
>>Your regex may match 3 different tagets but only in one is anything
>>captured in $1.
>
> I don't understand. In my input file, there is definietly a bytes
> field (the one I'm trying to get w/ $1) in every record, no matter
> whether it's one of the specific tapes I'm trying to filter on or not.
> So, when a line is 'good', no matter which of the three targets
> matched, I will have a valid bytes field.
[...]
>>Your regex was:
>>
>>> /^.{183}Y00545|Y01779|Y07001.{60}(.{10})/
^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^
1 2 3
This regex means: You have three choices, separated by '|' and marked
above, of which at least one must match. The three choices are:
1) A string starting with 183 arbitrary characters, followed by Y00545;
nothing captured here;
2) A string containing Y01779; nothing captured here either;
3) A string containing of Y07001, followed by 60 arbitrary characters,
followed by additional 10 arbitrary characters, that are captured
in $1.
And this is for sure *not* what you meant. If the string matches
choices 1) or 2), your capture buffer $1 will be empty.
>>You meant:
>>
>> /^.{183}(?:Y00545|Y01779|Y07001).{60}(.{10})/
>
> I have no idea what your change does, would you explain it please?
The (?:...) construct is like (...), except that it does not capture its
contents (called "clustering, not capturing"), so your parentheses at
the end will still correspond to $1.
See "perldoc perlre".
Ciao,
Harald
--
Harald H.-J. Bongartz <bongie@gmx.net>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"I believe we are on an irreversible trend toward more freedom and
democracy - but that could change."
-- George W. Bush Jr.
------------------------------
Date: Mon, 06 Jan 2003 15:54:35 -0500
From: Jack Straw <jackstraw@witchita>
Subject: Re: Noob: Variable is getting reset, but why?
Message-Id: <4pqj1v0dh3ae38mn7cauvf7ksi17318d1a@4ax.com>
"Harald H.-J. Bongartz" <bongie@gmx.net>:
>Jack Straw wrote:
> /^.{183}Y00545|Y01779|Y07001.{60}(.{10})/
>This regex means: You have three choices, separated by '|', of which at
>least one must match. The three choices are:
>1) A string starting with 183 arbitrary characters, followed by Y00545;
> nothing captured here;
>2) A string containing Y01779; nothing captured here either;
>3) A string containing of Y07001, followed by 60 arbitrary characters,
> followed by additional 10 arbitrary characters, that are captured
> in $1.
>And this is for sure *not* what you meant. If the string matches
>choices 1) or 2), your capture buffer $1 will be empty.
I see *exactly* what you mean now. The first clause of the logical or
starts at the beginning of the regex, not at the first 'Y', which is
what i wanted.
So, if I follow, you're telling me to group my entire set of OR
possibilities in a '(?: )' construct. That will limit the
beginning of my first option, and the end of my last option, so that
it works the way I want it to.
I see exactly what's going on now, thank you for your help.
--
JackStraw
0x3D561045
"Was it over when the Germans bombed Pearl Harbor? Hell no!"
-- Bluto
------------------------------
Date: Mon, 06 Jan 2003 11:21:53 -0800
From: peter <peter@nospam.calweb.com>
Subject: Re: Performance for my roguelike
Message-Id: <3e19d614$0$42033$d368eab@news.newshosting.com>
gibbering poster wrote:
> Hi guys... I would post this in RGRD, but those folks dont know much about perl...
>
> Basically, I'm working on a roguelike game in perl!! Call me crazy, but I'm giving
> it a shot. Origally, My map object had a 2d array of scalars which simply
> represented the character to draw for a given tile.
> <snip>
>
Another one?
http://splitreflection.com/cal/HackNet.html
looks like you're heading in a simular direction.
------------------------------
Date: Mon, 06 Jan 2003 13:45:42 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl on Pocket PC 2002?
Message-Id: <3E19F906.90204@vpservices.com>
Bob X wrote:
> Is there a version that runs on the Pocket PC?
>
> Bob
Yes, see the thread on the subject from this newsgroup within the last
week or two.
--
Jeff
------------------------------
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 4352
***************************************