[12852] in Perl-Users-Digest
Perl-Users Digest, Issue: 262 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 26 17:07:16 1999
Date: Mon, 26 Jul 1999 14:05:15 -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 Mon, 26 Jul 1999 Volume: 9 Number: 262
Today's topics:
Beginner-friendly group as cultural adaptation? <jbc@shell2.la.best.com>
Re: Beginner-friendly group as cultural adaptation? (Abigail)
Re: FAQ 8.45: How do I install a module from CPAN? (Matthew Bafford)
Re: FAQ 8.45: How do I install a module from CPAN? <toby@venice.cas.utk.edu>
Re: FAQ 8.45: How do I install a module from CPAN? (Abigail)
FormMail Year 2000 problem <simsi@hotmail.com.nospam>
Re: FormMail Year 2000 problem <cassell@mail.cor.epa.gov>
Re: FormMail Year 2000 problem (Matthew Bafford)
getopt and accepting . and .. bhaskaracharya@my-deja.com
group variables in script dbrodigan@my-deja.com
Re: How make .pl files executable? Is there a compiler? <jmulder@localhost.nl>
Re: How to dereference an array reference? <cassell@mail.cor.epa.gov>
HTML within perl ?? <mike@euromortgage.cc>
Re: HTML within perl ?? (Todd Tolhurst)
Re: Install MSQL Module into Perl (Abigail)
Re: Perl, FTP, and Win32 with IIS (ouch) dbhra@bellsouth.net
Re: Perl, FTP, and Win32 with IIS (ouch) dbhra@bellsouth.net
Re: Perl, FTP, and Win32 with IIS (ouch) (Abigail)
Re: problem size limit of perl <swiftkid@bigfoot.com>
Re: problem size limit of perl (Abigail)
question on times function <tanner@ultra.math.uni-potsdam.de>
Re: Regex-ing (Abigail)
Re: Regex-ing <q2ir@unb.ca>
Re: Regex-ing (Bart Lateur)
Re: Regex-ing <flavell@mail.cern.ch>
Re: Regex-ing <founder@pege.org>
Re: remove records from database (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Jul 1999 18:51:45 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Beginner-friendly group as cultural adaptation?
Message-Id: <379cae41$0$214@nntp1.ba.best.com>
There has been some very interesting (to me at least) discussion here
lately justifying this group's norms as a cultural legacy to which
newcomers should be expected to adapt, just as strangers in a new
country should learn the local customs. There are very good reasons why
newbies should learn to read the documentation, follow the group for a
time before posting, choose good subject lines, follow quoting
standards, and so on. There is broad consensus that everyone, newbies
and regulars alike, would benefit if more newbies could be encouraged
to do that.
The analogy cuts both ways, however. Cultures also adapt over time,
modifying traditions to accommodate new circumstances. That, after all,
is where today's norms came from: adaptation to yesterday's thorny
problems. Many of today's newbies are not coming from a background of
being professional programmers, or even aspiring to be professional
programmers. They're amateurs, many of them trying to learn Perl
primarily to help them do Web stuff. They lack many of the
prerequisites that prior generations of Perl newbies could have been
expected to possess. Even if you argue that they're not fundamentally
different from previous generations of newbies, or that their
relatively lowly starting point doesn't change anything about the
standards they should be expected to meet, their sheer numbers tend to
make the traditional means of bringing them along problematic. In the
past it may have been possible to admonish the occasional newcomer
without reducing the group's S/N ratio much, but today it sometimes
seems that admonishments (and meta-arguments about their use) make up
a sizeable percentage of the group's traffic.
I realize that proposing a group specifically for Perl newbies is a
dicey proposition. It runs the risk of raising political correctness
hackles, and being opposed as representing creeping cultural
relativism. Even if such land mines could be avoided, I doubt I'd be the
best person to propose it, given the amount of negative karma I've
probably accumulated in past clashes over the newbie issue.
But there seem to be some indications from at least some of the group's
regulars that it might be worth bringing up again. So I'm bringing it
up.
In that article that Tad's been reposting lately, Larry spoke about the
need for a better kindergarten. As usual, Larry's insights have gained
weight with the passage of time. He wrote that nearly 4 years ago, and
it's true today more than ever. I'm not saying that a newbie group
would be a panacea in that regard, but I believe it could help.
The group I'm envisioning could incorporate some of the following into
its charter:
- a prohibition on cross-posting to other c.l.p.* groups.
- a relatively broad definition of appropriate subject matter.
- a relatively frequent re-posting schedule of a relatively long list
of relevant FAQs and other documents (with "relevant" defined fairly
broadly, to include things like the Usenet Primer and Tom's piece on
appropriate followup behavior, as well as appropriate selections from
the traditional Perl and Web/CGI FAQs).
Presumably, the group's name would be chosen with a view to encouraging
newbie participation. *.wizards might work for that, but would probably
lead to too much confusion, and would fail a truth-in-advertising test.
*.web or *.www might be worth considering, though they would probably
raise hackles due to the subject-matter overlap with the
comp.infosystems.www.* groups, and might be viewed as too restrictive,
anyway, if the goal was to have a kindergarten for non-Web newbies as
well. *.idiots would appeal to some, but probably wouldn't attract as
much participation as something more neutral, like *.beginner or
*.amateur. And then there's just plain *.newbie.
This may well be doomed from the outset. If you really hate the idea
and would vote against it under any circumstances, please consider
letting me know either publicly or privately. If the product of (status
of opposing respondent) x (number of respondents opposed) exceeds a
certain fairly low threshold, I'll just drop the notion right now and
save us all a lot of trouble. Say, Abigail plus 3 other regulars; I
wouldn't think there'd be much point in trying to overcome that level
of resistance.
Thanks.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 26 Jul 1999 15:41:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <slrn7pphtu.lg7.abigail@alexandra.delanet.com>
John Callender (jbc@shell2.la.best.com) wrote on MMCLV September MCMXCIII
in <URL:news:379cae41$0$214@nntp1.ba.best.com>:
??
?? This may well be doomed from the outset. If you really hate the idea
?? and would vote against it under any circumstances, please consider
?? letting me know either publicly or privately. If the product of (status
?? of opposing respondent) x (number of respondents opposed) exceeds a
?? certain fairly low threshold, I'll just drop the notion right now and
?? save us all a lot of trouble. Say, Abigail plus 3 other regulars; I
?? wouldn't think there'd be much point in trying to overcome that level
?? of resistance.
I would vote against it if the group name matches /^comp\..*\.perl/s.
But feel free to create an alt.perl.wussies. ;-)
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 20:10:37 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <slrn7pperp.1jd.*@dragons.duesouth.net>
Tramm Hudson), thinking with his hands, posted the following to
comp.lang.perl.misc:
: Abigail <abigail@delanet.com> wrote:
: $*!@# I've a user 'camel' that owns everything in /opt/perl. No need to have
^^^^
: $*!@# 'root' own anything Perl related.
:
: Who owns suidperl then?
suidperl's pretty optional, isn't it?
: Tramm
--Matthew
------------------------------
Date: Mon, 26 Jul 1999 16:14:30 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <379CC1A6.CBA6EF1@venice.cas.utk.edu>
>
>
> Or am I missing some clever alternative here?
> thanks
>
> --
> --
> bruce.miller@nist.gov
> http://math.nist.gov/~BMiller/
As I was throughly corrected by tom just recently, let me let you in on a
not-so-secret :-).
shell>perl Makefile.PL LIB=~/lib
Create a directory called 'lib' or whatever in your home directory and do the
above. Then:
shell>make
shell>make test #maybe....
shell>make install
It will install rather neatly.
When you want to call a module:
#!/usr/bin/perl
use lib '/home/toby/lib';
#then the code.
Toby
------------------------------
Date: 26 Jul 1999 15:32:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <slrn7pphda.lg7.abigail@alexandra.delanet.com>
Tramm Hudson (hudson@swcp.com) wrote on MMCLV September MCMXCIII in
<URL:news:7ni3rt$c87@llama.swcp.com>:
'' Abigail <abigail@delanet.com> wrote:
'' $*!@#
'' $*!@# I've a user 'camel' that owns everything in /opt/perl. No need to have
'' $*!@# 'root' own anything Perl related.
'' $*!@#
''
'' Who owns suidperl then?
$ which suidperl
$
Abigail
--
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??)
{s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 20:45:55 +0100
From: "Simmo" <simsi@hotmail.com.nospam>
Subject: FormMail Year 2000 problem
Message-Id: <hV2n3.28$LH1.6488@news.enterprise.net>
Hi,
Just a quick note - hope it hasnt been covered here but if you use FormMail
from Matt Wrights Script Archive like what i does (!) and its over a year or
so old (haven't checked latest versions), you may find this line in it:
$date = "$days[$wday], $months[$mon] $mday, 19$year at $hour\:$min\:$sec";
Could be a problem in a few months.
Cheers
Simmo
------------------------------
Date: Mon, 26 Jul 1999 13:14:24 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: simis@hotmail.com
Subject: Re: FormMail Year 2000 problem
Message-Id: <379CC1A0.1737F764@mail.cor.epa.gov>
Simmo wrote:
>
> Hi,
>
> Just a quick note - hope it hasnt been covered here but if you use FormMail
It *has* been discussed here. But more reminders are better, given the
way this script has metastatized through the web. This is but one of many
problems with these scripts. Other problems can be found by going to
deja.com and doing a search through the archives of this ng.
> from Matt Wrights Script Archive like what i does (!) and its over a year or
> so old (haven't checked latest versions), you may find this line in it:
>
> $date = "$days[$wday], $months[$mon] $mday, 19$year at $hour\:$min\:$sec";
>
> Could be a problem in a few months.
Yes. It WILL be a problem in a few months. If Matt had bothered
to read the docs, he would have known to *add* 1900 to the year,
rather than concatenate '19' and $year. D'oh! The way he
handles the rest of that string is ugly too. And that's just one
line in the program!
> Cheers
Thanks for bringing this to the attention of lurkers who haven't
seen this before.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 26 Jul 1999 20:39:27 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: FormMail Year 2000 problem
Message-Id: <slrn7ppgb1.1jd.*@dragons.duesouth.net>
On Mon, 26 Jul 1999 20:45:55 +0100, Simmo" <simsi@hotmail.com.nospam>
held some poor sysadmin at gunpoint, and typed the following into
comp.lang.perl.misc:
: Just a quick note - hope it hasnt been covered here but if you use FormMail
: from Matt Wrights Script Archive like what i does (!) and its over a year or
: so old (haven't checked latest versions), you may find this line in it:
:
: $date = "$days[$wday], $months[$mon] $mday, 19$year at $hour\:$min\:$sec";
Cool!
People will be able to send anonymous mail to anyone they want, and
the recipients will think it came from the year 19100!
: Cheers
I'm smiling.
: Simmo
--Matthew
------------------------------
Date: Mon, 26 Jul 1999 20:26:38 GMT
From: bhaskaracharya@my-deja.com
Subject: getopt and accepting . and ..
Message-Id: <7nig9l$uec$1@nnrp1.deja.com>
hi
when passing in input as say a switch using the following
how can i make $opt_i accept . and .. without checking for them
specifically?
###code
#!/perl
use Getopt::Long;
@opt_l = ("h!", "i=s");
die $usageMsg unless GetOptions @opt_l;
### i is a path to directory
$dir = $opt_i;
### current code
if ($opt_i =~ /\.\.(/.*) ) # if its ..
{ do something...}##################
how can i make $opt_i accept . and .. without checking for them
specifically? i mean, is there a way to avoid the explicit checks
and setting the directory???
thanks
bhaskar
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 26 Jul 1999 19:28:24 GMT
From: dbrodigan@my-deja.com
Subject: group variables in script
Message-Id: <7nicsd$rvg$1@nnrp1.deja.com>
I downloaded a script called vote.pl. I configured
it to run on my w32 apache using perl 5.0. It
seems to be running ok, however, when I modified
it by expanding the groups, it displays the
variable as if it was html whereas it should be
interpreted like the other variables. I'm unable
to located where this variable discrepancy is,
could someone help me find it. hit the result html
portion to see what I'm looking at. thanks
http://sxdrb.sons.alaska.edu/specialty/voting/Judg
evote.html
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 26 Jul 1999 18:38:46 GMT
From: Johan Mulder <jmulder@localhost.nl>
Subject: Re: How make .pl files executable? Is there a compiler?
Message-Id: <7ni9vm$3c3$1@news1.xs4all.nl>
Abigail <abigail@delanet.com> wrote:
: RTFFAQ.
Or something like:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
I know it's an old one but it's very effective :)
------------------------------
Date: Mon, 26 Jul 1999 11:31:58 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to dereference an array reference?
Message-Id: <379CA99E.36B48179@mail.cor.epa.gov>
Kai Großjohann wrote:
>
> backwards.saerdna@srm.hc (Andreas Fehr) writes:
>
> > Yes, filtering spam is easy, but here in Europe, most private
> > people have a modem dialup connection to the internet and no
> > flat rate to connect there. So loading all the spam to your
> > computer takes some time and money.
>
> The TV broadcasting stations are wasting my money! They broadcast
> commercials, and *I* have to pay the electricity bill!
Thank you for that strawman which bears no resemblance to the
issues. I might as well make the same sort of illogical jumps:
Kai breathes.
My dog breathes.
Therefore they are the same species.
But I won't. That would be rude and unnecessary. For those
who get spam on dialup systems, the download costs can be
enough to push them past their ISP's monthly total-hours limit
and cost them real cash dollars. If you never experience this,
perhaps you could help subsidize Andreas. :-)
HAND,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 26 Jul 1999 12:49:22 +0100
From: "Michael Dransfield" <mike@euromortgage.cc>
Subject: HTML within perl ??
Message-Id: <379c6ff5@news.jakinternet.co.uk>
I have form processor at the moment which returns the fields in the form in
the following format
field = information
field2 = information
This makes the information difficult to read as the form is over 30 fields
long.
It would be easier if the information can be returned as HTML mail in the
format
<TABLE>
<TR>
<TD>field</TD>
<TD>information</TD> etc etc
This would mean that I could print the form directly from my mail prog, at
the moment I copy and paste the form into Word where I convert it into a
table and then print out.
I changed this line in the script from
{ $msgtext .= "$to_print = $fields{$to_print}\n"; }
to
{ $msgtext .= "<TR><TD>$to_print</TD> <TD>$fields{$to_print}</TD></TR>\n"; }
This doesn't seem to work
Any ideas??
Mike
------------------------------
Date: Mon, 26 Jul 1999 21:08:48 GMT
From: toto@toto.com (Todd Tolhurst)
Subject: Re: HTML within perl ??
Message-Id: <379ccd2c.24316417@news-server>
On Mon, 26 Jul 1999 12:49:22 +0100, "Michael Dransfield"
<mike@euromortgage.cc> wrote:
>I changed this line in the script from
>{ $msgtext .= "$to_print = $fields{$to_print}\n"; }
>to
>{ $msgtext .= "<TR><TD>$to_print</TD> <TD>$fields{$to_print}</TD></TR>\n"; }
>
>This doesn't seem to work
>Any ideas??
It's really hard to give a diagnosis when you don't say what the
symptoms are. "This doesn't seem to work" is a bit vague. What did
it do, what did it fail to do?
Hint: Manually write the HTML you want displayed. Now compare it to
what your program outputs. If it's not the same, find out why your
program is generating something different.
--
Todd Tolhurst
toto@toto.com
http://www.w3xpert.com/toto/
------------------------------
Date: 26 Jul 1999 15:42:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Install MSQL Module into Perl
Message-Id: <slrn7ppi16.lg7.abigail@alexandra.delanet.com>
Paul Foran (Layout/Design) (Paul.Foran@analog.com) wrote on MMCLV
September MCMXCIII in <URL:news:379C9D59.B3A80814@analog.com>:
__ How do i do it with Activestate as the PPM does not work.
Very carefully.
Abigail
--
perl -wlne '}for($.){print' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 15:21:23 -0400
From: dbhra@bellsouth.net
Subject: Re: Perl, FTP, and Win32 with IIS (ouch)
Message-Id: <379CB532.531C56D2@somewhere>
> I'm using IIS 4 on NTSP4. I'm guessing I need the Net:FTP module, but I
> can't find a Win32 version (all distributions that I found require
> make...that won't fly in NT; or will it?)
>
I run ActivePerl on my Win NT 4.0 SP4 workstation, and I wrote an ftp
client in Perl. Net::FTP is in the "libnet" module. You can obtain
modules for ActivePerl using PPM (Perl Package Manager) at the command
prompt. Hope this helps.
David Bradford
dbhra@nojunk.bellsouth.net
(extract nojunk)
------------------------------
Date: Mon, 26 Jul 1999 15:21:57 -0400
From: dbhra@bellsouth.net
Subject: Re: Perl, FTP, and Win32 with IIS (ouch)
Message-Id: <5v2n3.806$Uv6.1412@news1.mco>
> I'm using IIS 4 on NTSP4. I'm guessing I need the Net:FTP module, but I
> can't find a Win32 version (all distributions that I found require
> make...that won't fly in NT; or will it?)
>
I run ActivePerl on my Win NT 4.0 SP4 workstation, and I wrote an ftp
client in Perl. Net::FTP is in the "libnet" module. You can obtain
modules for ActivePerl using PPM (Perl Package Manager) at the command
prompt. Hope this helps.
David Bradford
dbhra@nojunk.bellsouth.net
(extract nojunk)
------------------------------
Date: 26 Jul 1999 15:45:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl, FTP, and Win32 with IIS (ouch)
Message-Id: <slrn7ppi69.lg7.abigail@alexandra.delanet.com>
sherifhanna@my-deja.com (sherifhanna@my-deja.com) wrote on MMCLV
September MCMXCIII in <URL:news:7ni78s$o5d$1@nnrp1.deja.com>:
^^ I want to write a cgi perl script, which interfaces with IIS, that will
^^ ftp to a remote computer, download a text file into a local directory,
^^ and then generate an html file with a link to the downloaded file. How
^^ do I do it?
Step by step.
Are you just fishing for a prewritten solution? You want to do lots
of things, yet you aren't indication you actually tried something
yourself.
Read documentation. Write something. Then, if you run into problems,
ask. Don't try to fish for freebies.
^^ I'm using IIS 4 on NTSP4. I'm guessing I need the Net:FTP module, but I
^^ can't find a Win32 version (all distributions that I found require
^^ make...that won't fly in NT; or will it?)
You mean, you can't even be bothered to try if make works? How lazy can
people get?
Abigail
--
perl -wlpe '}$_=$.;{' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 23:19:40 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: problem size limit of perl
Message-Id: <7njc69$ldi1@news.cyber.net.pk>
: I am trying to use a Perl script to process a text database. The main data
: structure of my program is a 4-dimension associative array, which will
: require about 200M of memory while running.
:
: I am running it on a Ultra5 with Solaris. The program works extremely slow
: after it processes some data and will finally hang up when data size is
: larger than 100M.
:
: Could somebody give me a point. Is the problem in the 4-dimension
: associative array or Perl can not handle too many datum.
Not sure but I think its 4 dim aarray, I use 4gb of data in a Berkely
2 Binary database using DB_File, which works quite fast! (on a Redhat
with 64mb ram) ... ?
------------------------------
Date: 26 Jul 1999 15:47:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: problem size limit of perl
Message-Id: <slrn7ppia4.lg7.abigail@alexandra.delanet.com>
Chao Fang (cfang@nwu.edu) wrote on MMCLV September MCMXCIII in
<URL:news:7ni1f4$lb1@news.acns.nwu.edu>:
|| I am trying to use a Perl script to process a text database. The main data
|| structure of my program is a 4-dimension associative array, which will
|| require about 200M of memory while running.
||
|| I am running it on a Ultra5 with Solaris. The program works extremely slow
|| after it processes some data and will finally hang up when data size is
|| larger than 100M.
||
|| Could somebody give me a point. Is the problem in the 4-dimension
|| associative array or Perl can not handle too many datum.
Perl can. But can your environment?
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 21:14:41 +0200
From: Andreas Tanner <tanner@ultra.math.uni-potsdam.de>
Subject: question on times function
Message-Id: <379CB3A1.14794115@ultra.math.uni-potsdam.de>
Sorry for this naive question, but I don't understand the definition of
the times function in the manual. It says "..returns user and system
times for this process, and the children of this process..
Now what does "this process" mean?
Can I measure running times of some script like this:
"frame.pl":
print PROT times;
system("perl myscript");
print PROT times;
where myscript contains a lot of system calls (to be precise, calls of
Latex of some automatically generated files).
Any help appreciated
Andreas
------------------------------
Date: 26 Jul 1999 15:48:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Regex-ing
Message-Id: <slrn7ppicd.lg7.abigail@alexandra.delanet.com>
Banos (nomailpleasewereantispammers) wrote on MMCLV September MCMXCIII in
<URL:news:933010735.20052.0.nnrp-04.c2deffda@news.demon.co.uk>:
-- This thread has reaffirmed my reluctance to embrace perl. Perl is just
-- cryptic 'crap'. This should surely be a simple request with a simple tried
-- and tested unambiguous answer by now.
--
-- There must be some alternatives!
Sure. Try Python.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 14:53:44 -0300
From: "Eric L. Brine" <q2ir@unb.ca>
Subject: Re: Regex-ing
Message-Id: <Pine.GSO.4.05.9907261446180.4110-100000@jupiter.sun.csd.unb.ca>
> This thread has reaffirmed my reluctance to embrace perl. Perl is just
> cryptic 'crap'. This should surely be a simple request with a simple tried
> and tested unambiguous answer by now.
You're blaming perl for the (perceived?) inadequateness of the people who
tried to help?
> There must be some alternatives!
Of course there are. Feel free to use any language you want!
> > I want to replace all carriage-returns with my own delimiter.
> > i have tried the following:-
> > $news = s/\n/delimiter/g;
Carriage Return is "\r". so, what you want is:
$news = s/\r/delimiter/gs;
> > ?news=This+is+the+first+line%0D%0AThis+is+the+second+line
You seem to imply you want to replace all CRLF (not just CR) with your own
delimiter. If that's what you want to do, then the following will do the
trick:
$news = s/\r\n/delimiter/gs;
or even:
$news = s/\r?\n/delimiter/gs;
--
Eric L. Brine | Chicken: The eggs's way of making more eggs.
q2ir@unb.ca | Do you always hit the nail on the thumb?
ELB@iname.com | An optimist thinks thorn bushes have roses.
------------------------------
Date: Mon, 26 Jul 1999 18:27:01 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Regex-ing
Message-Id: <379ca84f.202618@news.skynet.be>
"Banos" <no mail please were anti spammers> wrote:
>This thread has reaffirmed my reluctance to embrace perl. Perl is just
>cryptic 'crap'. This should surely be a simple request with a simple tried
>and tested unambiguous answer by now.
>
>There must be some alternatives!
Er... Are you sure you mean "some"? Don't you mean "just one"?
Bart.
------------------------------
Date: Mon, 26 Jul 1999 20:50:45 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Regex-ing
Message-Id: <Pine.HPP.3.95a.990726204141.26512H-100000@hpplus03.cern.ch>
On Mon, 26 Jul 1999, it was written:
> This thread has reaffirmed my reluctance to embrace perl. Perl is just
> cryptic 'crap'. This should surely be a simple request with a simple tried
> and tested unambiguous answer by now.
Only one? Some mistake surely!
> There must be some alternatives!
Quite. Normally there's more than one way to do it.
> > I want to replace all carriage-returns with my own delimiter.
Newlines, it seems.
> > $news = s/\n/delimiter/g;
As was just pointed out on clpm, there's some helpful discussion of
network newlines and some (imho slightly muddled but basically sound)
comments on how to make it work in a portable fashion, in perldoc
perlipc
> > ?news=This+is+the+first+line%0D%0AThis+is+the+second+line
We see that you have some \015 and \012 characters present.
Actually they are also represented by \r and \n, but if you don't know
which platforms the program is going to run on, you won't know which is
which. I'd suggest it's more sanitary to spell out just what you want,
rather than to pretend that all the world's a unix and hope that the
others will come out in the wash.
But that perlipc documentation can assist in firming up just what it is
that you really want.
--
"Bei dreibegriffigen mechanischen Vorsignalen ohne
Doppelstellerhebel steuern zwei Fluegelkupplungen"
------------------------------
Date: Mon, 26 Jul 1999 21:54:54 +0200
From: "Mosl Roland" <founder@pege.org>
Subject: Re: Regex-ing
Message-Id: <7niggf$q5r$1@orudios.magnet.at>
Banos <no mail please were anti spammers> wrote in message
news:933010735.20052.0.nnrp-04.c2deffda@news.demon.co.uk...
> This thread has reaffirmed my reluctance to embrace perl. Perl is just
> cryptic 'crap'.
Simple use an other language :-)
I use now Perl for everything.
The combination of PerlScript
and DHTML on MSIE 5 makes
Perl also very easy to develop
programs with graphic user
surface.
--
Mosl Roland - http://www.pege.org
clear targets for a confused civilization
------------------------------
Date: 26 Jul 1999 15:52:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: remove records from database
Message-Id: <slrn7ppii8.lg7.abigail@alexandra.delanet.com>
inlandpac@my-deja.com (inlandpac@my-deja.com) wrote on MMCLV September
MCMXCIII in <URL:news:7nhsi3$gfj$1@nnrp1.deja.com>:
== I am talking about a flat file (| delimited).
==
== I am new at this and don't appreciate the criticism towards my search
== for understanding and knowledge.
==
== These communities are supposed to be for everyone to use; for the
== inexperienced to learn and for others to share their knowledge. If you
== are not here to share your knowledge and have desires to criticize then
== what is the point in you being here?
You're new at this, yet you know what others, who have been here for
years, should do, and shouldn't do? Don't you think that's a bit twisted?
Adapt, grasshopper.
*plonk*
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 262
*************************************