[23613] in Perl-Users-Digest
Perl-Users Digest, Issue: 5820 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 17 21:10:51 2003
Date: Mon, 17 Nov 2003 18:10:14 -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, 17 Nov 2003 Volume: 10 Number: 5820
Today's topics:
Re: regex to convert 1000000 -> 1,000,000 ? <abigail@abigail.nl>
Re: regex to convert 1000000 -> 1,000,000 ? <abigail@abigail.nl>
Re: regex to convert 1000000 -> 1,000,000 ? <abigail@abigail.nl>
Re: regex to convert 1000000 -> 1,000,000 ? (Sam Holden)
Re: regex to convert 1000000 -> 1,000,000 ? (Sam Holden)
Re: regex to convert 1000000 -> 1,000,000 ? <wsanford@wallysanford.com>
Re: regex to convert 1000000 -> 1,000,000 ? <tcurrey@no.no.i.said.no>
Re: regex to convert 1000000 -> 1,000,000 ? <REMOVEsdnCAPS@comcast.net>
Re: regex to convert 1000000 -> 1,000,000 ? <tore@aursand.no>
Re: running a sub inside regex (Jay Tilton)
Re: running a sub inside regex (Tad McClellan)
Re: running a sub inside regex <pinyaj@rpi.edu>
Re: running a sub inside regex (Hae Jin)
Re: running a sub inside regex (Hae Jin)
Re: running a sub inside regex (Tad McClellan)
Re: Whitespace removal in html generated by cgi <wwonko@rdwarf.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 17 Nov 2003 23:22:57 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrim2h.6vj.abigail@alexandra.abigail.nl>
Wally Sanford (wsanford@wallysanford.com) wrote on MMMDCCXXVIII September
MCMXCIII in <URL:news:bp5uc3$1jpjek$1@ID-196529.news.uni-berlin.de>:
##
## And as usual, you miss the point that most new people would not have
## _knowlege_ of na faq. It's like when ou go to a new place. Say, you move
## to a new state, go to a new school, you know not wher anything really
## is, you tend to ask around "hey, do you know where I can find this or
## that?". You _can't_ expect every new person to know where to find
## everything, becuase they may not even know of the exisitance of such a
## tool.
##
## Nothing wrong with pointing them ot an FAQ, but chastizing a new person
## for not checking an FAQ they may not know about is just plain mean
## spirted and absurd (need I mention arrogant?) If you find your self
## wanting to post something ill spirited like this it may be better to
## just stfu. I dont give a flying crap how helpful you overwise are.
##
## There is nothing wrong with being new. One must start somewhere.
Indeed. One does start with the manual. How does one get the manual?
"man perl" [1]. What does the manual start off with? A list of more
manuals! What's high in that list - the second page of "man perl"?
Right. A pointer to the Perl FAQ.
You can't expect everyone to know everything. But you *can* expect people
to look at the documentation they are given.
[1] Or whatever is the equivalent on inferiour systems.
Abigail
--
perl -wle 'eval {die [[qq [Just another Perl Hacker]]]};; print
${${${@}}[$#{@{${@}}}]}[$#{${@{${@}}}[$#{@{${@}}}]}]'
------------------------------
Date: 17 Nov 2003 23:24:44 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrim5s.6vj.abigail@alexandra.abigail.nl>
Sam Holden (sholden@flexal.cs.usyd.edu.au) wrote on MMMDCCXXVIII
September MCMXCIII in <URL:news:slrnbrd510.mg3.sholden@flexal.cs.usyd.edu.au>:
;;
;; School's tend not to have FAQs, so that's a pretty stupid analogy.
I can't recall in my many years of getting an education to have attended
a school without a student guide full of frequently needed information.
Abigail
--
#!/opt/perl/bin/perl -- # Remove trailing newline!
BEGIN{$SIG{__WARN__}=sub{$_=pop;y-_- -;print/".*(.)"/;
truncate$0,-1+-s$0;exec$0;}}//rekcaH_lreP_rehtona_tsuJ
------------------------------
Date: 17 Nov 2003 23:26:23 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrim8v.6vj.abigail@alexandra.abigail.nl>
Wally Sanford (wsanford@wallysanford.com) wrote on MMMDCCXXX September
MCMXCIII in <URL:news:bpb5eg$1kqno4$1@ID-196529.news.uni-berlin.de>:
))
)) If they are unixsavy they might try something like: $ perl --help | grep
)) doc
No, if they are Unix savy, they try "man perl", and guess what? On the
second page it mentions the FAQ!
Abigail
--
# Perl 5.6.0 broke this.
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: 17 Nov 2003 23:38:09 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrimut.qln.sholden@flexal.cs.usyd.edu.au>
On Mon, 17 Nov 2003 10:53:00 -0800,
Wally Sanford <wsanford@wallysanford.com> wrote:
> Sam Holden wrote:
>>
>> And one starts by reading the documentation for the language,
>> compiler, software package, whatever it is you are new to. For perl
>> the FAQ
>> is a big chunk of that documentation and pretty hard to miss, unless
>> of course you didn't bother looking at any of the documentation.
>
> Actually, the whole situation is like this: Perl is like a software
> package from a store that has a nice manual that under a hidden panel.
> you don't know it's there unless you KNOW it's there.
>
> Someone who is starting will likely not even of heard of "perldoc".
>
> If they are unixsavy they might try something like: $ perl --help | grep
> doc
> Which doesn not return anything. `$ perl --help` by it self does nothing
> to guide you to the docs.
A unixsavy person will type "man perl" which nicely lists all the other
man pages. inclusing perlfaq. A unixsavy person knows what:
"For ease of access, the Perl manual has been split up into several sections."
followed by a list of man page names means.
> Even grepping the man page for perl doesn't ofer much:
>
> $ man perl | grep doc
> perltoc Perl documentation table of contents
> perlpod Perl plain old documentation
> Extensive additional documentation for Perl modules is
> this additional documentation in the
> additional documentation is distributed standard with
> Perl, but you'll also find documentation for third-party
> You should be able to view Perl's documentation with your
Who greps manpages for "doc"? The manpage is the documentation. You
read it, and in the case of perl read the other pages it tells you
about.
>
> So a newbie might be inclined to try
>
> $ perltoc
> bash: perltoc: command not found
If the newbie is an idiot, and uses grep not to search and then check the
context, but to read.
A newbie needs to learn how to read documentation on their system before
they learn how to use perl.
>
> And `$ man perl | grep perldoc` return nothing, but the point is they
> have to first KNOW of perldoc.
perldoc is irrelevant, man works just fine and provides access to the
same documentation. Arguably better access due to the wonders of
man -k/apropos.
If someone uses unix and does not know about man, then they should stop
and learn about it *before* doing anything else with unix. Unix is
unusable without it.
>
> $ man perl | grep help
> you're not sure where you should look for help, try the -w
> Larry Wall <larry@wall.org>, with the help of oodles of
> help to others who wish to advocate the use of Perl in
> help mail in a bug report.
>
> This could bery well lead
>
> $ help perl
> bash: help: no help topics match `perl'. Try `help help'.
How does that random text lead to trying a "help" command. I see no
reference to such a command. How does it lead to "help perl" more than
it leads to "oodles perl" or "mail perl"?
>
> Many newsbies could of installed some linux distro that came with Perl
> and they decide on exploring it. Looking for documentation seems to be
> more then a trivial task.
>
> So, just short of going to www.perl.org, how is one suppost to know of
> perldoc and it's faq's off the bat?
man perl
man perlfaq
man perlfaq<relevant number>
> It's not a question of a newsgroup being like a coutry or whatever, but
> the lack of self advertising of perldoc it self. The fact thast there is
> no mention of it in the man page doing simple greps is unacceptable.
Again, perldoc is irrelevant. man works just fine. It is not the job of
the perl documentation to explain the use of man, that is the job of
"man man" :)
Do you want the perl documentation to include tutorial information on the
use of man, the use of the various microsoft help systems, the use of
a web browser to view HTMLized docs, etc, etc.
Assumming the reader can read documentation on the system they are using
is reasonable. How did they know to how to run perl otherwise? How did they
know how to create a file?
You could always of course upgrade to the current stable version of perl
which does in fact provide a reference to perldoc findable by your strange
"grep the man page for doc" approach to reading manpages:
; man perl | grep doc
Reformatting perl(1), please wait...
gate the rest of Perl's extensive documentation.
perltoc Perl documentation table of contents
perlpod Perl plain old documentation
perlpodspec Perl plain old documentation format specification
perldoc Look up Perl documentation in Pod format
tains the majority of the standard Perl documentation and the perldoc
Extensive additional documentation for Perl modules is available, both
You should be able to view Perl's documentation with your man(1) pro-
Complaining about things which have been fixed has no useful purpose.
>
> Expecting someone to of read documentation thats buried in a way that
> you didnt even know it was there in the "box" is what is unacceptable.
It isn't buried.
> Now that I think about it, I never even heard of perldoc until I first
> read this group a good some time ago.
So what, perldoc isn't important. It provides a nice way of specifying
perl documentation in this newsgroup, saying "perldoc perldata" is
nice since "man perldata" is meaningless on windows.
perldoc is nice for searching the FAQ (though not as nice as grep), but
you aren't meant to search the FAQ at the beginning, you are meant to
*read* it.
--
Sam Holden
------------------------------
Date: 17 Nov 2003 23:54:37 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrintt.qln.sholden@flexal.cs.usyd.edu.au>
On 17 Nov 2003 23:24:44 GMT, Abigail <abigail@abigail.nl> wrote:
> Sam Holden (sholden@flexal.cs.usyd.edu.au) wrote on MMMDCCXXVIII
> September MCMXCIII in <URL:news:slrnbrd510.mg3.sholden@flexal.cs.usyd.edu.au>:
> ;;
> ;; School's tend not to have FAQs, so that's a pretty stupid analogy.
>
>
> I can't recall in my many years of getting an education to have attended
> a school without a student guide full of frequently needed information.
But that isn't a FAQ. Maybe schools in your part of the world are different
than over here. But over here I've never seen something that resembles a FAQ,
something with a list of questions which are have actually been asked
frequently (or even just once) with answers.
Things like:
* Which teacher is most likely to let me leave early?
* Which areas are best avoided if I don't wish to get in a fight at lunch?
* Which toilets are the cleanest?
* On which day are the weekly staff meetings that make it easy to sneak out
at lunch?
* Which computer in the library is fastest?
* How late can I be for roll call?
--
Sam Holden
------------------------------
Date: Mon, 17 Nov 2003 17:26:56 -0800
From: "Wally Sanford" <wsanford@wallysanford.com>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <bpbsh4$1mrtqq$1@ID-196529.news.uni-berlin.de>
Abigail wrote:
[Abigail's Non standard broken quoting fixed;
Btw why do you continue to post like this knowing it breaks many
quoting schemes that readers use, inparticular color coding???]
> Wally Sanford (wsanford@wallysanford.com) wrote on MMMDCCXXX September
> MCMXCIII in URL:news:bpb5eg$1kqno4$1@ID-196529.news.uni-berlin.de:
>
>> If they are unixsavy they might try something like: $ perl --help
>> grep doc
>
> No, if they are Unix savy, they try "man perl", and guess what? On the
> second page it mentions the FAQ!
$ man perl | grep -i faq
perlfaq Perl frequently asked questions
perlfaq1 General Questions About Perl
perlfaq2 Obtaining and Learning about Perl
perlfaq3 Programming Tools
perlfaq4 Data Manipulation
perlfaq5 Files and Formats
perlfaq6 Regexes
perlfaq7 Perl Language Issues
perlfaq8 System Interaction
perlfaq9 Networking
It *mentions* perlfaq but says NOTHING of how to *access* it. Thats whe
whole point ehre.
------------------------------
Date: Mon, 17 Nov 2003 17:22:29 -0800
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <bpbsdl$red$1@news.astound.net>
Chris Mattern wrote:
> Wally Sanford wrote:
>> Chris Mattern wrote:
>>
>>> Wally Sanford wrote:
>>>
>>>> Sam Holden wrote:
>>>>
>>>>
>>>>> And one starts by reading the documentation for the language,
>>>>> compiler, software package, whatever it is you are new to. For
>>>>> perl
>>>>> the FAQ
>>>>> is a big chunk of that documentation and pretty hard to miss,
>>>>> unless
>>>>> of course you didn't bother looking at any of the documentation.
>>>>
>>> <much about the hidden perl docs>
>>>
>>>> So, just short of going to www.perl.org, how is one suppost to know
>>>> of perldoc and it's faq's off the bat?
>>>
>>> Well, if you come to this group, the posting guidelines, posted
>>> twice
>>> every week, if you *read* the group before *post* to it, like you
>>> should (remember why the good Lord gave two ears and only one
>>> mouth!)
>>
>>
>> Twice a week? I have seen them posted at all the last few months. I
>> have
>> been through 3 different isp's so that is not limited to just my news
>> service. Wehre is this being posted from? Under what name?
>
> Tad McClellan posts it, regular as clockwork. Which may explain why
> he sometimes gets a mite testy when it seems nobody reads it.
Maybe he sould ask if the person he's replying to can even see those
posts?
> Eight times in the past month. I've accessed the newsgroup from
> several different ISPs and Google, and they've always been there.
> Not sure how you missed it.
Apparently hes not the only one.
>>> Your points about the difficulty of finding perldoc are well taken.
>>> But it doesn't excuse clueless posts, because people who have found
>>> this newsgroup have found the key to finding perldoc if they will
>>> *read*.
>>
>>
>> Well if other people cannot see the faq being posted as you say, jsut
>> like it does nto show on my server, then that too is a broken bridge
>> that cannot be crossed, and would also exaplin why some newbies seem
>> to
>> give blank stairs when asked why they didnt read it.
>>
> If it doesn't show on your server, it can only be because your server
> is broken, which is scarcely the fault of the Perl documentation or
> its maintainers.
Actually I don't see those posts either. I think since so many people
seem to have a problem seeing it, could it be something with Tad's
server not properly propagating posts? Why assume it's someone's else
when it is possible the problem can be at the source. Other then his
posts my server seems to show anything that google shows (and then
some.) Just Tad's posts don't always appear.
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1
)!eg;print(reverse("$s")."\n");'
------------------------------
Date: Mon, 17 Nov 2003 19:27:57 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <Xns9436D0564B669sdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
sholden@flexal.cs.usyd.edu.au (Sam Holden) wrote in
news:slrnbrintt.qln.sholden@flexal.cs.usyd.edu.au:
> On 17 Nov 2003 23:24:44 GMT, Abigail <abigail@abigail.nl> wrote:
>>
>> I can't recall in my many years of getting an education to have
>> attended a school without a student guide full of frequently needed
>> information.
>
> But that isn't a FAQ. Maybe schools in your part of the world are
> different than over here. But over here I've never seen something that
> resembles a FAQ, something with a list of questions which are have
> actually been asked frequently (or even just once) with answers.
>
> Things like:
>
> * Which teacher is most likely to let me leave early?
>
> * Which areas are best avoided if I don't wish to get in a fight at
> lunch?
>
> * Which toilets are the cleanest?
>
> * On which day are the weekly staff meetings that make it easy to
> sneak out
> at lunch?
>
> * Which computer in the library is fastest?
>
> * How late can I be for roll call?
I got a FAQ (it wasn't called that; the term had not yet been invented)
when I started college. It didn't have such trivia as the above, but it
did have the answers to such questions as:
* What are good local radio stations?
* What are good local restaurants?
* Where are you allowed to park on campus?
* Who are useful administration personnel to know?
* What resources are available to you as a student?
etc.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP7l1z2PeouIeTNHoEQJvzQCgo+Cogh/h09gaiX4BGFhkuAquuwcAnA2E
7FwGMi3JlaEvT9VxYpV/hpO0
=RteQ
-----END PGP SIGNATURE-----
------------------------------
Date: Tue, 18 Nov 2003 02:45:41 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <pan.2003.11.17.21.25.16.586551@aursand.no>
On Mon, 17 Nov 2003 12:41:16 -0800, Wally Sanford wrote:
>> Well, if you come to this group, the posting guidelines, posted twice
>> every week, if you *read* the group before *post* to it, like you
>> should (remember why the good Lord gave two ears and only one mouth!)
> Twice a week? I have seen them posted at all the last few months.
Then you are blind. The posting guidelines have been posted in this
newsgroup 13 times since October 3rd this year. The last posting was on
November 14th.
Check <http://groups.google.com/>.
--
Tore Aursand <tore@aursand.no>
------------------------------
Date: Mon, 17 Nov 2003 23:05:38 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: running a sub inside regex
Message-Id: <3fb951f8.6381043@news.erols.com>
"Austin P. So (Hae Jin)" <haejin@ubc.ca> wrote:
: if ($string =~ m/($substring|revcomp($substring))/ig) {
: $match_position = pos + 1;
: $match = $1;
: ...
: }
:
: sub revcomp {
: #make reverse complement
: return
: }
Did you test that?
The m// operator is like a double-quotish string. Subroutine calls are
not interpolated without some extra work.
if ($string =~ m/($substring|@{[revcomp($substring)]})/ig) { ... }
^^^ ^^
------------------------------
Date: Mon, 17 Nov 2003 18:08:20 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: running a sub inside regex
Message-Id: <slrnbrionk.drg.tadmc@magna.augustmail.com>
Jay Tilton <tiltonj@erols.com> wrote:
> "Austin P. So (Hae Jin)" <haejin@ubc.ca> wrote:
>
>: if ($string =~ m/($substring|revcomp($substring))/ig) {
>: $match_position = pos + 1;
>: $match = $1;
>: ...
>: }
>:
>: sub revcomp {
>: #make reverse complement
>: return
>: }
>
> Did you test that?
>
> The m// operator is like a double-quotish string. Subroutine calls are
> not interpolated without some extra work.
>
> if ($string =~ m/($substring|@{[revcomp($substring)]})/ig) { ... }
And shouldn't it be either:
if ( m// )
or
while ( m//g )
??
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 17 Nov 2003 19:25:21 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Thomas Isenbarger <isen@mgh.molbio.harvard.edu>
Subject: Re: running a sub inside regex
Message-Id: <Pine.SGI.3.96.1031117190957.193319A-100000@vcmr-64.server.rpi.edu>
[posted & mailed]
On Mon, 17 Nov 2003, Thomas Isenbarger wrote:
>for molecular biologists out there, I am trying to find the reverse
>complement on the fly inside the regex. the @pairing array is something
>like @pairing = (AU, CG, GC, UA) and defines the substitutions to be made
>in order to build a reverse complement.
>
>for non molecular biologists out there, a sequence that should match is
>'acgu' if you need a test case.
A context-free grammar for this would be:
S -> a S u | u S a | c S g | g S c | [nothing]
You *could* do this with Perl regexes, but it's unweildy (and inefficient,
I can assure you):
my $pair;
$pair = qr{
a (??{ $pair }) u |
u (??{ $pair }) a |
c (??{ $pair }) g |
g (??{ $pair }) c |
(?# nothing )
}x;
if ("acgu" =~ /^($pair)$/) {
print "matched '$1'\n";
}
However, it's probably easier just to match a sequence, and then try to
match its reverse:
if ("acgu" =~ /^(([acgu]+)(??{ complement($2) }))$/) {
print "matched '$1' ('$2')\n";
}
sub complement {
my $str = reverse shift;
$str =~ tr/aucg/uagc/;
return $str;
}
I didn't need to use "use re 'eval'" for either of these, by the way,
because the variables in the regexes are qr// objects.
--
Jeff Pinyan RPI Acacia Brother #734 2003 Rush Chairman
"And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler)
years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election
Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
------------------------------
Date: Mon, 17 Nov 2003 16:27:07 -0800
From: "Austin P. So (Hae Jin)" <haejin@ubc.ca>
Subject: Re: running a sub inside regex
Message-Id: <bpbp1f$6ou$1@nntp.itservices.ubc.ca>
Jay Tilton wrote:
> "Austin P. So (Hae Jin)" <haejin@ubc.ca> wrote:
>
> : if ($string =~ m/($substring|revcomp($substring))/ig) {
> : $match_position = pos + 1;
> : $match = $1;
> : ...
> : }
Oops...it should be:
$match_position = (pos $string) + 1;
> : sub revcomp {
> : #make reverse complement
> : return
> : }
>
> Did you test that?
Actually I did after you posted...just to be sure since it had been a
while since I did this...
And of course it didn't work...I guess my fallback is that I'm a crappy
perl programmer...:)...I think I actually rewrote it too way back when...
> The m// operator is like a double-quotish string. Subroutine calls are
> not interpolated without some extra work.
>
> if ($string =~ m/($substring|@{[revcomp($substring)]})/ig) { ... }
Yep. That works brilliantly. Thanks.
And just to polish it further, to get the substring start site, it
should be:
if ($string =~ m/(?=($substring|@{[revComp($substring)]}))/ig) {...}
Good thing I started lurking this newsgroup again... :)
BTW...where is a reference for subroutine calls within a regex?
Austin
------------------------------
Date: Mon, 17 Nov 2003 16:30:44 -0800
From: "Austin P. So (Hae Jin)" <haejin@ubc.ca>
Subject: Re: running a sub inside regex
Message-Id: <bpbp7p$6tm$1@nntp.itservices.ubc.ca>
Tad McClellan wrote:
> And shouldn't it be either:
>
> if ( m// )
>
> or
>
> while ( m//g )
>
> ??
Right. My bad...
the latter to get all the substring instances...
Austin
------------------------------
Date: Mon, 17 Nov 2003 19:21:17 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: running a sub inside regex
Message-Id: <slrnbrit0d.dva.tadmc@magna.augustmail.com>
Austin P. So (Hae Jin) <haejin@ubc.ca> wrote:
> BTW...where is a reference for subroutine calls within a regex?
Step 1 is to recognize that it isn't the regexness that matters,
it is the double-quotishness that matters.
Step 2 is to lookup subroutine calls within a double-quotish string. :-)
perldoc -q expand
How do I expand function calls in a string?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 17 Nov 2003 23:55:55 +0000 (UTC)
From: Louis Erickson <wwonko@rdwarf.com>
Subject: Re: Whitespace removal in html generated by cgi
Message-Id: <bpbn6b$6fr$1@holly.rdwarf.com>
Gregory Toomey <nospam@bigpond.com> wrote:
: It was a dark and stormy night, and Eric J. Roode managed to scribble:
:> What is the goal of this? Reducing the amount of data that is
:> transmitted to the client browser?
: Yes.
:>If so, you would probably be better
:> off compressing the output with gzip -- all major browsers support gzip
:> compressed data.
: Yes I use Apache with gzip so that's another level of compression.
If you're gzipping the output stream, then the removal of spaces isn't likely
to change your transmission size significantly, if at all. The compressor
will flatten them right out, without risking the content of the HTML.
Also note that if you have a CGI that sends back something besides HTML,
such as image or sound data, this will completely screw it up.
--
Louis Erickson - wwonko@rdwarf.com - http://www.rdwarf.com/~wwonko/
Andrea: Unhappy the land that has no heroes.
Galileo: No, unhappy the land that needs heroes.
-- Bertolt Brecht, "Life of Galileo"
------------------------------
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 5820
***************************************