[16720] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4132 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 25 14:06:32 2000

Date: Fri, 25 Aug 2000 11:05:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967226718-v9-i4132@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 25 Aug 2000     Volume: 9 Number: 4132

Today's topics:
    Re: @_ as array (Randal L. Schwartz)
    Re: CGI / Registry question <elephant@squirrelgroup.com>
    Re: CGI / Registry question gorbor@my-deja.com
    Re: Closures? <stephen.pillar@cableinet.co.uk>
    Re: cookies. <russ_jones@rac.ray.com>
    Re: cookies. <j_bandi@yahoo.com>
        Creating and writing new file from within prog. ssesar@mindspring.com
    Re: Creating and writing new file from within prog. <tina@streetmail.com>
    Re: database for large number of keys? (Greg Bacon)
        DBD::mysql can't find ld -lz <grichard@uci.edu>
    Re: DBI export to file <jeff@vpservices.com>
    Re: Extracting a number of lines in a text file <lr@hpl.hp.com>
    Re: Extracting a number of lines in a text file (Abigail)
    Re: Extracting a number of lines in a text file (Abigail)
    Re: Generalized "User Database"? (Nobody)
    Re: How do I insert a carriage return? (Greg Bacon)
    Re: Implicit passing of arrays with prototypes (Anno Siegel)
        Ingres Servers In DBI gavin_gibson@my-deja.com
    Re: Just another silly post. (Abigail)
    Re: legal date <lr@hpl.hp.com>
    Re: Local install of perl modules (Abigail)
    Re: newbie:? string sub through an array (Teodor Zlatanov)
    Re: Perl/MySQL vs ASP/MS-SQL (Nobody)
    Re: Please wait... [was: Perl - Blinking Text] (Greg Bacon)
    Re: Preserving HTML entities when HTML:: parsed <elephant@squirrelgroup.com>
    Re: Problems with installing Win32-api module <weberr2202@my-deja.com>
    Re: RegEx zejames@yahoo.fr
    Re: robot <russ_jones@rac.ray.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 25 Aug 2000 08:14:52 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: @_ as array
Message-Id: <m11yzdtlsj.fsf@halfdome.holdit.com>

>>>>> "Amir" == Amir E Aharoni <amir_e_a@netvision.net.il> writes:

Amir> Whoops, my bad.

Amir> print @keanu; # it doesn't print 3, it prints all the array's members.

Amir> print scalar @keanu; # will print 3.

Amir> the "scalar" keyword is often optional, depending on context.

Well, you don't have to make it sound so whimsical.

  Use "scalar" when you have a list context, but you want the scalar
  meaning for an operator.

That's very well defined.  "print LIST" takes a list.  So if you want
the scalar meanign of "@a", you gotta put scalar there.

I'm always puzzled by people that think there's no rhyme or reason to
this stuff.  Context is completely deterministic, and doesn't take a
rocket scientist.  Just ask... "is it looking for a list or a scalar
here" and if you got the wrong one, throw in the scalar or the
(...)[0] tricks.  And don't over use those.  I see this all the time:

        $n = scalar @a;

Bleh!  That's a bit like strapping training wheels onto your training
wheels.  Just because we talk about "scalar @a" as an operation
doesn't mean you have to literally type s c a l a r in front of @a.
You merely need to get it into a scalar context, which it frequently
is!

OK, Amir, this isn't directed at you, so much as the rest of the
readers.  Just trying to do some triage, helping the people that
aren't quite dead yet. :)

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Fri, 25 Aug 2000 15:14:52 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: CGI / Registry question
Message-Id: <MPG.14112ae1108d4ba49896f2@localhost>

gorbor@my-deja.com <gorbor@my-deja.com> wrote ..
>Anyone know how to write a CGI script that will read the registry to
>determine the name and location of the data file in order to upload it
>... ???

having a CGI script executed with enough privilege to read the registry 
is fraught with danger

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 25 Aug 2000 17:02:26 GMT
From: gorbor@my-deja.com
Subject: Re: CGI / Registry question
Message-Id: <8o68qj$17a$1@nnrp1.deja.com>

That's true, I hadn't thought about it quite that way.
Maybe I SHOULD talk the client out of it!!
Thanks a lot.



In article <MPG.14112ae1108d4ba49896f2@localhost>,
  jason <elephant@squirrelgroup.com> wrote:
> gorbor@my-deja.com <gorbor@my-deja.com> wrote ..
> >Anyone know how to write a CGI script that will read the registry to
> >determine the name and location of the data file in order to upload
it
> >... ???
>
> having a CGI script executed with enough privilege to read the
registry
> is fraught with danger
>
> --
>   jason -- elephant@squirrelgroup.com --
>


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


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

Date: Fri, 25 Aug 2000 15:15:10 GMT
From: "Rachel" <stephen.pillar@cableinet.co.uk>
Subject: Re: Closures?
Message-Id: <24wp5.1744$NR3.245179@news1.cableinet.net>

I assume you are hand knitting.Try knitting a test piece over about 10 st
using both methods and see whgich is best for you.Yes it'll take a few
minutes but believe me it will save hours of stress later!
<mr_curmudgeon@my-deja.com> wrote in message
news:8o5qig$f3a$1@nnrp1.deja.com...
> Is it
>
> knit 1, perl 2
>
> or
>
> perl 1, knit 2
>
> I'm never gonna get this sweater done unless I figure it out!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.167 / Virus Database: 80 - Release Date: 29/06/00




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

Date: Fri, 25 Aug 2000 11:36:00 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: cookies.
Message-Id: <39A6A070.6BF50660@rac.ray.com>

Abigail wrote:
> 
> 
> And the relevance of your posting to Perl is what exactly?
> 

C is for cookie, it's good enough for me. Cookie cookie cookie, good
enough for me. - C. Monster
-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: Fri, 25 Aug 2000 17:29:23 GMT
From: shalu892 <j_bandi@yahoo.com>
Subject: Re: cookies.
Message-Id: <sqdb7jbat9160@corp.supernews.com>

Actually I set a cookie as username in my script. After a cookie
is set, if I want to retrieve the cookie ,does it get it from 
the server or from the script? To test that I changed the cookie
value in cookies.txt file and tried to print the cookie value.
And it retrieved the earlier value and not the changed value.Looked like it
retrieved from the script and not from the server.
To setthe cookie : $cookie = $query->cookie(-name=>'xx',
                                            -value=>'yy');
print $query->header(-cookie=>$cookie);
To get the cookie :  $query->cookie(-name=>'xx');
I don't know where Iam going wrong. I would be grateful if you could help
me out.

Thanks.
Abigail wrote:
> 
> 
> shalu892 (j_bandi@yahoo.com) wrote on MMDL September MCMXCIII in
> <URL:news:sqbbuh44t9157@corp.supernews.com>:
> \\ Hi,
> \\ I want to know where the cookies are stored on a client's
> \\ browser. I know that in netscape it is stored in 
> \\ .netscape/cookies file but what about other browsers? I would
> \\ appreciate if you answer my question.
> 
> 
> And the relevance of your posting to Perl is what exactly?
> 
> 
> 
> Abigail
> -- 
> perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'


--
Posted via CNET Help.com
http://www.help.com/


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

Date: Fri, 25 Aug 2000 15:49:30 GMT
From: ssesar@mindspring.com
Subject: Creating and writing new file from within prog.
Message-Id: <8o64i2$rn6$1@nnrp1.deja.com>

Here's a snippet:


while (<>);

 #taking an input file and re-formatting it;

print "prepend", if @prepend;
print $1, "\n";


The above writes the new record to STDOUT, but what I want to do create
new file from the output, and print "File Created Successfully" to
STDOUT



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


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

Date: 25 Aug 2000 17:08:16 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Creating and writing new file from within prog.
Message-Id: <8o6960$a131e$3@ID-24002.news.cis.dfn.de>

hi,
ssesar@mindspring.com wrote:
> while (<>);

> print "prepend", if @prepend;
> print $1, "\n";

> The above writes the new record to STDOUT, but what I want to do create
> new file from the output, and print "File Created Successfully" to
> STDOUT

read 
perldoc -f open
about opening/creating files.

open NEW, ">newfile" or die $!;
print NEW $something;
close NEW;

tina

-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \__,_\___/\___/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: Fri, 25 Aug 2000 15:18:14 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: database for large number of keys?
Message-Id: <sqd3hm87t9153@corp.supernews.com>

In article <39a584b4.656e$3bb@news.op.net>,
    Mark-Jason Dominus <mjd@plover.com> wrote:

: Try using CDB_File instead.

C D B?

N-R-E S E-N X.  N-R-E S N X-T-C.

ObPerl: ummm.. Text::Soundex? :-)

Greg
-- 
Never call a man a fool.  Borrow from him.


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

Date: Fri, 25 Aug 2000 10:12:07 -0700
From: "Gabe" <grichard@uci.edu>
Subject: DBD::mysql can't find ld -lz
Message-Id: <8o69nf$onl$1@news.service.uci.edu>

I'm trying to install DBD::mysql but when I run make I get a message saying
ld can't find -lz. I guess ld is part of some binutil package, so I tried to
install the rpm for the latest release but I got a bunch of errors about
files conflicting. I looked up the man page for ld and I saw a -l switch but
no -z or -lz switch. Anyone know how to help me install DBD::mysql?

Thanks,
Gabe




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

Date: Fri, 25 Aug 2000 10:22:04 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DBI export to file
Message-Id: <39A6AB3C.9B8332DC@vpservices.com>

loadc wrote:
> 
>        What do I use to export to a text file in the DBI?  I have seen
> examples for lo_export, this is the large object export with format
> options for BLOBs (as far as I am aware).  Can I use 'export'?  If so,
> what are the format options, do I need any (apparently I do, it failed
> without)?  Thanks for any help,

It depends entirely on what database and what kind of file you are
talking about.  Some databases have their own methods for importing and
exporting that run stand-alone, others have commands that can be passed
through DBI.  If there is nothing specific in your database, then you
can use DBD::RAM which allows you to import from any other DBI
accessible database, then export to any supported file format
(CSV,XML,Fixed-width,tab or pipe "delimited", and others).

-- 
Jeff


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

Date: Fri, 25 Aug 2000 10:12:31 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Extracting a number of lines in a text file
Message-Id: <MPG.141048d91065da1398ace1@nntp.hpl.hp.com>

In article <39A63BAB.F56B825E@orga.com> on Fri, 25 Aug 2000 11:26:03 
+0200, Ulrich Ackermann <uackermann@orga.com> says...

 ...

> while (<INFILE>) {
> 	$_ =~ /^+(.*)/;
      ^^^^^^
That is just noise; use the defaults when available.

> 	$what_you_where_looking_for = $1 . "\n";
> 	# write line into new file
> }

In addition to the other problems already discussed:

Randal Schwartz must be looking the other way, or he would take you to 
task for using the result of a pattern match without first checking that 
the match succeeded.  All the other responders in this thread got that 
right.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 25 Aug 2000 17:45:32 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Extracting a number of lines in a text file
Message-Id: <slrn8qdc4g.tj3.abigail@alexandra.foad.org>

Minh Le (lem@ocean.com.au) wrote on MMDLI September MCMXCIII in
<URL:news:8o5drh$b91$1@perki.connect.com.au>:
;; Hi,
;; I have been strucgling, from my perl script,  to extract a number of text
;; lines from a file and them to a new file.
;; The text string that I would like to extract,  always starts with a + sign
;; and then has a whitespace then the rest is a text  (ie +  hello I need
;; help..)
;; and when it writes to these text strings to a new file, I need to drop the
;; "+" sign and only add the rest of the text strings to the new file.
;; Please help !!!


$ perl -wne "print \$' if /^\+(?=\s)/" oldfile > newfile


Note that the first \ is interpreted by the shell.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


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

Date: 25 Aug 2000 17:47:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Extracting a number of lines in a text file
Message-Id: <slrn8qdc7h.tj3.abigail@alexandra.foad.org>

Hasanuddin Tamir (hasant@trabas.co.id) wrote on MMDLII September MCMXCIII
in <URL:news:slrn8qcqfi.nh3.hasant@borg.intern.trabas.co.id>:
|| On Fri, 25 Aug 2000 13:21:45 +0200, Ulrich Ackermann <uackermann@orga.com>
|| wrote:
|| ## Ulrich Ackermann wrote:
|| ## > 
|| ## > 
|| ## > while (<INFILE>) {
|| ## >         $_ =~ /^+(.*)/;
|| ##                  ^^^
|| ## 
|| ## of course, here is a backslash missing:
|| ##          $_ =~ /^\+(.*)/;
|| ## 
|| 
|| Not enough, the OP wanted a single whitespace after
|| the + to be eliminated as well.


The OP writes:

    I need to drop the "+" sign and only add the rest of the text
    strings to the new file.


which in my book he needs to eliminate the "+" sign, and nothing else.



Abigail
-- 
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;        
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";


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

Date: 25 Aug 2000 15:50:40 GMT
From: nobody@contract.East.Sun.COM (Nobody)
Subject: Re: Generalized "User Database"?
Message-Id: <8o64kg$c64$1@eastnews1.east.sun.com>

In article <slrn8q8vad.ma.mgjv@verbruggen.comdyn.com.au>,
Martien Verbruggen <mgjv@comdyn.com.au> wrote:
>On Wed, 23 Aug 2000 09:36:00 -0500,
>	Matt Kruse <mkruse@netexpress.net> wrote:
>> Martien Verbruggen <mgjv@tradingpost.com.au> wrote
>> > sounds like /etc/passwd with some extended GCOS information.
>> 
>> Well, since /etc/passwd is just a flat file containing information, I
>> suppose so :)
>> 
>> > Alternatively, use a combination of DBI, DBD::CSV, or another file based
>> > DBI driver. Use the crypt builtin to do password hashing stuff.
>> 
>> Yup, I know how to accomplish the end task. But I was asking if anyone had
>> already done the job of building it, creating methods to update the
>> "database", handle file locking, etc.
>> 
>> > > I thought this would be common! :)
>> > Very common.

Isn't this something that LDAP can handle?

Anita


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

Date: Fri, 25 Aug 2000 15:19:39 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: How do I insert a carriage return?
Message-Id: <sqd3kbsst9128@corp.supernews.com>

Stealth Cc!  Bad poster! :-(

Greg
-- 
Must one first batter their ears, that they may learn to hear with
their eyes? Must one clatter like kettledrums and penitential
preachers? Or do they only believe the stammerer?
    -- Nietzsche


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

Date: 25 Aug 2000 15:05:06 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Implicit passing of arrays with prototypes
Message-Id: <8o61v2$8n2$1@lublin.zrz.tu-berlin.de>

Jordan Katz  <katz@underlevel.net> wrote in comp.lang.perl.misc:
>"John J. Lee" <phrxy@csv.warwick.ac.uk> writes:

>> foo(@list);
>      ^^ You're passing a plain array.
>
>> sub foo(\@) {
>          ^^ function `foo' expects a reference to an array, not just
>             an array.

No.  Did you run a few tests to confirm what you are saying?

The prototype \@ tells the compiler to silently replace an array
passed in this position by a reference to the array.  The OP's
expectation was quite correct, the error is something else (and
explained in another posting).

>I hope that helps,

I'm afraid it doesn't.

Anno


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

Date: Fri, 25 Aug 2000 15:36:20 GMT
From: gavin_gibson@my-deja.com
Subject: Ingres Servers In DBI
Message-Id: <8o63pi$qtc$1@nnrp1.deja.com>

I'm trying to write a perl script, which via DBI, logs on to each dbms
server in turn and queries that servers statistics. I can't export
variables as I would normally as they are specific to my enviroment. Is
there any DBI variable that means I can define not only which node and
database I attatch to but also via which server. Mmmmmmmm... Anyone any
answers please. I'll be really grateful.


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


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

Date: 25 Aug 2000 17:02:47 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Just another silly post.
Message-Id: <slrn8qd9ka.tj3.abigail@alexandra.foad.org>

Martien Verbruggen (mgjv@tradingpost.com.au) wrote on MMDLI September
MCMXCIII in <URL:news:slrn8qciud.5ap.mgjv@martien.heliotrope.home>:
`` On 25 Aug 2000 07:25:16 GMT,
`` 	Abigail <abigail@foad.org> wrote:
`` > Martien Verbruggen (mgjv@verbruggen.comdyn.com.au) wrote on MMDLI
`` > September MCMXCIII in <URL:news:slrn8qbn6n.ma.mgjv@verbruggen.comdyn.com.au
`` > -: dirx(grep !m!/\.\.?$!, glob("$_/* $_/.*"))
`` > 
`` > Eh, no, that will filter out some perfectly legal filenames.
`` 
`` I hesitate to doubt your word, but, as I see it; all it will filter
`` out is
`` 
`` $_/.
`` $_/..


No, it won't. It's a common misconception that $ matches the end of a
string. It might, but it doesn't have to. $ matches the end of a *line*.
And it can do so before a newline. Hence, ".\n" and "..\n", which are
perfectly valid filenames, will be filtered out by the grep.



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";`$@`'


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

Date: Fri, 25 Aug 2000 10:07:11 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: legal date
Message-Id: <MPG.14104795a24863d998ace0@nntp.hpl.hp.com>

In article <slrn8qcjfh.27o.marcel@gandalf.local> on Fri, 25 Aug 2000 
10:44:59 GMT, Marcel Grunauer <marcel@codewerk.com> says...
> On Fri, 25 Aug 2000 08:53:33 GMT, eastking@my-deja.com
> <eastking@my-deja.com> wrote:
> 
> >I want to get a legal day most close(forward) to the day encrypted by
> >the three variable '19990931'. In this case it should be '19990930'.
> 
> If you want the next _forward_ date, shouldn't it be '19991001'?

Not according to the explicit example given.

> Anyway, localtime and Time::Local's timelocal() do that for you:

I might simply have referred the poster to perlfaq4: "How do I find 
yesterday's date?"  But as you chose to post code, you might as well get 
it right.

 ...

>     ($day, $month, $year) =
> 	(localtime(timelocal(0, 0, 0, $day, $month - 1, $year - 1900)))[3..5];

You forgot to subtract one day.  I would set the time to local noon (to 
deal with the inevitable summer-time nit-pickers), then subtract 
24*60*60 from the value returned by timelocal().

I feel subversive in pointing out that this call to timelocal actually 
introduces a potential century ambiguity, and that the correct result is 
guaranteed by using the full four-digit year.  For the hideous details, 
see:

    perldoc Time::Local

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 25 Aug 2000 17:49:42 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Local install of perl modules
Message-Id: <slrn8qdcca.tj3.abigail@alexandra.foad.org>

Mark Williams (mark@orctel.co.uk) wrote on MMDLI September MCMXCIII in
<URL:news:39A63A7A.87C6C27B@orctel.co.uk>:
-: Is it possible to install perl modules in a local directory?

Have you read the FAQ?

-: My problem is my cgi host will not install modules that I need. Can I
-: install modules on my local machine in a local directory and copy them
-: up to my host into a local directory?
-: Am I talking rubbish?

You're talking before you listened.



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


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

Date: 25 Aug 2000 11:59:39 -0500
From: tzz@iglou.com (Teodor Zlatanov)
Subject: Re: newbie:? string sub through an array
Message-Id: <39a697eb$1_1@news.iglou.com>

<39A56562.8DCE0842@texas.net>:Tom Briles (sariq@texas.net):comp.lang.perl.misc:Thu, 24 Aug 2000 13:11:46 -0500:quote:
: Teodor Zlatanov wrote:
: > 
: > <8o0uof$s04$1@nnrp1.deja.com>:coughlan@gothaminteractive.com:comp.lang.perl.misc:Wed, 23 Aug 2000 16:39:46 GMT:quote:
: > : What's the easiest way to do a string subtritution of "A" for "B"
: > : throughout an array @myarray?
: > 
: > I like both
: > map { s/A/B/ } @myarray;
: > and
: > s/A/B/ foreach @myarray;
: > 
: > depending on the context they can both be useful.
: 
: Both of those are *much* slower than Larry Rosler's previously posted
: solution, which uses the 'tr' operator.

Absolutely.  The OP asked for "string substitution," though, so I thought
I'd give a general solution rather than the more limited but faster tr.  For
the particular example given, my advice was not optimal.

-- 
Teodor Zlatanov <tzz@iglou.com>
"Brevis oratio penetrat colos, longa potatio evacuat ciphos." -Rabelais


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

Date: 25 Aug 2000 15:47:42 GMT
From: nobody@contract.East.Sun.COM (Nobody)
Subject: Re: Perl/MySQL vs ASP/MS-SQL
Message-Id: <8o64eu$c2b$1@eastnews1.east.sun.com>

In article <8o09v8$394$1@nnrp1.deja.com>,  <af778@iname.com> wrote:
>Thank you very much Malcom and Steve.
>My hosting provider only support the "bundle" CGI-Perl/MySQL or
>ASP/MSSQL, but I always loved the freedom and I feel that MS is
>anything but freedom.
>But the lack of subselects in MySQL is frustrating...
>I hope it will be supported in next version of the engine. (I saw it
>somewhere)...
>Do you know of any "big-real-and-know" implementation using MySQL?
>Thank you again
>

Well, I can't point you to any commercial sites, but I have built
an entire intranet system for one of my consulting clients using
Perl and MySQL on Solaris servers.  They are a company of about
500-600 employees who use the intranet for everything from booking
conference rooms and scheduling vacations to automating ISO procedures.
No performance problems so far, and we haven't needed transactions,
triggering, etc.  For larger scale applications, though, I would
recommend a 'heftier' database.  I wouldn't base an intranet at a large
company like IBM or Sun on anything less than an Oracle or Sybase database.
If you're just doing it for your own small purpose, than MySQL is probably
more than sufficient.  Besides, doing Perl/DBI in conjunction with CGI
has kept me employed for the past 4 years :-)  

Anita




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

Date: Fri, 25 Aug 2000 15:11:23 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Please wait... [was: Perl - Blinking Text]
Message-Id: <sqd34rt6t9163@corp.supernews.com>

In article <slrn8qb0k2.tj3.abigail@alexandra.foad.org>,
    Abigail <abigail@foad.org> wrote:

: Greg Bacon (gbacon@HiWAAY.net) wrote on MMDL September MCMXCIII in
: <URL:news:sqadh2gut91134@corp.supernews.com>:
:
: @@ How about this?
: @@ 
: @@     sub bubbles {
: @@         [...]
: @@     }
: 
: That seems to need a $| = 1.

Yeah, and a call to bubbles() while we're at it.  I thought they were
understood. :-)

Greg
-- 
People should think first, then wave with awards.
    -- Abigail


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

Date: Fri, 25 Aug 2000 15:25:03 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Preserving HTML entities when HTML:: parsed
Message-Id: <MPG.14112d4020771ed39896f3@localhost>

Ian McDonald at No Fuss Websites.com <ianm@nofusswebsites.com> wrote ..
>This deletes the HTML entities;
>
>$tree = HTML::Parse::parse_html( $text );
>$text = $tree->as_HTML;
>
>What can I do to preserve them?

for a start - don't use a deprecated module (even if the doco calls it 
depreciated ;)

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 25 Aug 2000 17:21:06 GMT
From: Ralf Weber <weberr2202@my-deja.com>
Subject: Re: Problems with installing Win32-api module
Message-Id: <8o69t9$2n3$1@nnrp1.deja.com>

Hi David,

> I am new to Perl. Sorry if this is an old, well known problem.
> Trying to use functions from Win32::FileOp module. Get error messages
(see
> below). Attempts to run 'ppm install Win32-api' result in error:
"could not
> locade ppd file".
> Using Win98 with Active Perl build 613.

Got the same problem with other Modules (DBI etc...)
You have to unzip the zip files in a directory of @INC (/perl/site/lib)
go there in the DOS-Box and then type:
ppm install MODULE.ppd

Only for zips!!!

If you have only a ppd-file, do the same, but then, connect to the
internet and then call in the @INC directory:
ppm install MODULE.ppd.

This just worked fien with mine.

Ralf
> Any help is appreciated.
>
> David Shtern
>
> ====================================
> C:\Perl\Projects>perl mapi.pl
> Can't locate Win32/AbsPath.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/l
> ib .) at C:/Perl/lib/Win32/FileOp.pm line 15.
> BEGIN failed--compilation aborted at C:/Perl/lib/Win32/FileOp.pm line
15.
> Compilation failed in require at mapi.pl line 3.
> BEGIN failed--compilation aborted at mapi.pl line 3.
> =====================================
>
>

--
Ralf  Weber
Klingenstr. 18
70186 Stuttgart
E-Mail: weberr@machno.hbi-stuttgart.de
Internet: http://machno.hbi-stuttgart.de/~weberr


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


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

Date: Fri, 25 Aug 2000 15:06:20 GMT
From: zejames@yahoo.fr
Subject: Re: RegEx
Message-Id: <8o620r$ojd$1@nnrp1.deja.com>



Hi,


> The match attempt stops after the first of the four above, so
> the other three aren't even considered.  The regular expression
> engine takes the first (leftmost) match it finds, making it as
> long as possible.

Ok. But then I don't really understand what greedy means: I thought the
engine would take the last pattern that matches, and so take the fourth
case.


> By the way, I think Martien Verbruggen misunderstood what you
> were doing above -- unless I did.  I'm assuming the four lines
> are listing possible matches (marked by parentheses) for the
> parenthesized part of the regex m#/(.*)#.

Yeah, that is what I meant!!

> If you're really interested in the details of regular
> expressions, you might want to get Jeffrey E.F. Friedl's book
> "Mastering Regular Expressions" (O'Reilly).  It doesn't include
> the newer features in Perl regular expressions, though.

I think I have to buy it :-))


Thank you for your answers


James


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


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

Date: Fri, 25 Aug 2000 11:41:26 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: robot
Message-Id: <39A6A1B6.4437DDE@rac.ray.com>

zchanggun@my-deja.com wrote:
> 
> hello
> i'm new in this group
> first, i wanna know how the web robot is made and moreover  the examples
> thanks


Okay, first you gotta get a positronic brain from somewhere. Then you
gotta memorize these laws:

First Law: 

A robot may not injure a human being, or, through inaction, allow a
human being to come to harm. 

Second Law: 

A robot must obey orders given it by human beings, except where such
orders would conflict with the First
Law. 

Third Law: 

A robot must protect its own existence as long as such protection does
not conflict with the First or Second
Law. 

Then you might look at the LWP modules. 
-- 
R. Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

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


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