[12222] in Perl-Users-Digest
Perl-Users Digest, Issue: 5822 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 28 20:07:46 1999
Date: Fri, 28 May 99 17:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 28 May 1999 Volume: 8 Number: 5822
Today's topics:
Re: A better way then flock? (Sitaram Chamarty)
Re: Can someone help me on this challenging problem? <ppith@my-deja.com>
Re: Can someone help me on this challenging problem? <uyv_IGNORE_r@hotmail.com>
Re: Can someone help me on this challenging problem? <uyv_IGNORE_r@hotmail.com>
Re: Commercial Perl Debugger/Development for Unix (Tad McClellan)
Re: Database manipulation <rick.delaney@home.com>
Re: directory file list into html conversion (Sitaram Chamarty)
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <webmaster@chatbase.com>
Re: Help! need fraction of a second time function (Tad McClellan)
Re: Im not asking for much (Tad McClellan)
Re: LOG base setting in Perl5 (Larry Rosler)
lwp - getting images <morlee@s277-4.CS.Berkeley.EDU>
Moving tags via regexp (Ethan Straffin)
Re: Moving tags via regexp (Ethan Straffin)
Re: Nested Data in MySQL.. getting at it with DBI.. <tedstruk@toledotel.com>
Network programming tutoriall? (Doug O'Leary)
Re: Put my() inside or outside a loop? (Larry Rosler)
Running a Background Process from CGI (Mark R.)
Re: scalar refs and m/(pat)/ <rick.delaney@home.com>
Re: Thanks man....HOWS THIS? <uri@sysarch.com>
Re: Thanks man....HOWS THIS? <uri@sysarch.com>
Re: Thanks man....HOWS THIS? (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 May 1999 23:27:50 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: A better way then flock?
Message-Id: <slrn7ktkp3.24l.sitaram@diac.com>
On Thu, 27 May 1999 17:31:38 -0700, $Richy Rich$ <rich_guy@hotmail.com> wrote:
>how it works, when someone enters into an active session, it creates a
>session file for them, based on a session.$number. the files are limited
>to how many users can access at one time, so it starts at session.1
>(first user's session file is created), and ends at session.25 (if
>there's a 25 user limit at the time). that's easy enough, but when this
>server gets deathly slow, i notice that sometimes it will print "Bob has
>entered into an active session as user #5", and directly after appended
>in the log, it will say "Sarah has entered into an active session as
>user #5", which shouldn't be happening. the user's session file is there
As I see it, you still need flock. You ought to be doing
something like this:
# somewhere set $limit - let's say it's 25
$success=0;
foreach $userno (1 .. $limit)
{
open(SESSIONFILE, ">session.$userno") or die "fill in the
blanks here...";
$success=1, next if flock(SESSIONFILE, LOCK_EX|LOCK_NB);
close SESSIONFILE;
}
if ($success)
...
...
This would get the cases where you had all 25 logged in and user
#4 logged out. You can use other methods to eliminate the brute
force searching for a lockable session number - perhaps maintain
some other file (flock again) with this information.
But for small $limit, with LOCK_NB, this should be OK, I think.
I'm assuming here that your session file doesnt contain any actual
data - since every new user would clobber it. If it contains
actual data, you may have to use sysopen and truncate to defer the
clobber until *after* you get the lock (see perlfaq5 for an
example).
------------------------------
Date: Fri, 28 May 1999 21:48:24 GMT
From: Howard Jow <ppith@my-deja.com>
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <7in2v8$7nr$1@nnrp1.deja.com>
In article <7imo8c$bu8@dfw-ixnews11.ix.netcom.com>,
"Ralph Emerson" <uyv_IGNORE_r@hotmail.com> wrote:
> I don't know about wasting. Yea, I know I need these concepts, but
now I
> can network 2-3 diffrent OS's, program 4 diffrent languages, pass the
MCSE
> test, and know about things like firewalls and winsock. 3 years ago I
<SNIP> etc. Yes, but there are some things that are very
difficult to teach in a newsgroup. How can you learn about
graph theory in a newsgroup when colleges offer one or three
semester courses just on that topic? Learning the basics of
graph searching using depth first and breadth first search
could be learned on the Internet...if you were signed up for
a "distance learning" course. I think this thread needs
to die now. Seek a teacher or book. <gong noise>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 17:11:10 -0500
From: "Ralph Emerson" <uyv_IGNORE_r@hotmail.com>
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <7in4cl$4v2@sjx-ixn10.ix.netcom.com>
The closest library (that has a desent collection of computer books
{>10-13}) is out of my parents driving range.
adamfman@my-deja.com wrote in message <7imf64$oqk$1@nnrp1.deja.com>...
><snip> ... but because of
>> reasons out of my control, I will not be getting any new books for a
>long
>> time + I don't allready have an algorithm book.
>
>Why not try the library? *Algorithms in C* by Robert Sedgewick is a
>classic. It should be at most good libraries.
>
>-- Adam Fineman
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 17:25:44 -0500
From: "Ralph Emerson" <uyv_IGNORE_r@hotmail.com>
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <7in57s$5dd@sjx-ixn10.ix.netcom.com>
> How can you learn about
>graph theory in a newsgroup when colleges offer one or three
>semester courses just on that topic?
I'm not asking about graph theory, only an answer to my problem. You say
this problem is graph theory, so? That's only a name. I won't put a
limitation on my ability to learn from words, are you going to put a limit
on your ability to teach with them?
> Learning the basics of
>graph searching using depth first and breadth first search
>could be learned on the Internet...if you were signed up for
>a "distance learning" course.
What and where? Also, are they free? If they are, I would be happy to
spend any amount of time.
> Seek a teacher or book.
There are no people in the real world that know programming that are willing
to teach.
> I think this thread needs
> to die now. <gong noise>
No, no no. Darn it I'm tired of waiting. In elementary school I was told
to stop learning because I'd learn algebra in Middle school. In middle
school nobody would teach me Calculus or show me the works of Machiavelli or
Conrad because those were "advanced subjects" for high school or college
people. Now people tell me to wait because "Well, that's only for real
programmers" or "I don't know, ask Mr. X" or "You'll learn all about that in
college". I'm tired of waiting. I'm tired of stoping. I'm tired of
letting knowledge "Die". <gong>
------------------------------
Date: Fri, 28 May 1999 14:41:52 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Commercial Perl Debugger/Development for Unix
Message-Id: <g1omi7.3nq.ln@magna.metronet.com>
Andrew Wilson Falgout (afalgout@ocean.otr.usm.edu) wrote:
: Does anyone know of a Commercial Development Package for
What is a "Commercial Development Package"?
You need that sort of thing on toy computers that have a
hard time multitasking.
No such problem under most Unix-like OSes.
: programming/debugging perl under the unix platform?
: (Specifically AIX and Linux)
for programming: vi or emacs
for debugging: print statements or perl -d
But I get the feeling you are wanting something more.
What would that be?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 28 May 1999 23:43:02 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Database manipulation
Message-Id: <374F29B6.E71B645C@home.com>
[posted & mailed]
Gary Yerby wrote:
>
> I am constructing a series of functions that help me add/remove/read
> from a fixed length Random Access Database.
>
> #I am using code similar to this:
> #for writing i open the file like so
>
> open(HANDLE, "+>>filename); #this is okay
This is not okay. Check out the new perlopentoot manpage. You can find
it at
http://language.perl.com/newdocs/pod/perlopentut.html
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Fri, 28 May 1999 23:27:53 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: directory file list into html conversion
Message-Id: <slrn7ktlhi.24l.sitaram@diac.com>
On Fri, 28 May 1999 06:53:25 GMT, junsc@sysic.hei.co.kr
<junsc@sysic.hei.co.kr> wrote:
>Hi, All
>
>Our intranet web server administrator has forbidden plain directory
>browsing by the web browser.
>
>I have quite large directory hierarchy structure that are full of
>document and reference files and I want to avoid making index file in
>each directory manually. Is there any easy way to convert file structure
>in a directory into html index file?
Untested, quick and dirty - run this in each directory (use find
or find2pl if needed)
dir2html.pl
-----------
#!/usr/bin/perl -w
@files= grep !/^index.html$/, glob("*");
open(STDOUT, ">index.html") or die "couldnt open index.html: $!";
for (@files)
{
print "<a href=$_>$_</a><br>\n";
}
------------------------------
Date: Fri, 28 May 1999 12:46:53 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <374EF2AD.9278B729@chatbase.com>
finsol@ts.co.nz wrote:
>
> In article <374d6545@cs.colorado.edu>,
> tchrist@mox.perl.com (Tom Christiansen) wrote:
>
> > There are idiots everywhere. What's your point?
> > --tom
> >
> That's my point exactly. Idiot's or not, don't expect perfection from
> programmers, we're only human. Ask any user who has to put up with our
> arrogance, ego, bugs, delays, budget over-runs, optimism (based on
> wishful thinking not past experience) and our inability to communicate
> and understand their needs. Or do you live in a different world?
You say "we" and "our", as if you knew what you were talking about,
which you obviously do not. Try not to "group" yourself in with the rest
of us who *do* know what they are talking about. I'm sorry that you
found some misleading info somewhere at some point, but you are now (and
have been) being told by "experts" (yes, the *real* one's!), that your
assumptions are not correct.
>
> It is particularly likely mistakes will be made when a programming
> language such as Perl, is so easy to mis-use.
Perhaps without proper knowledge, which needs to be obtained in the
proper manner, from a reliable source. Hence your confusion from the
lack of a proper source at some point.
> We need to be working
> actively on Y2K awareness, not denial, if we are going to mitigate some
> of the worst eventualities.
My point yet again about you and your "assumptions". This is *not* an
issue, but your belligerent naive-ness is.
--
Regards,
Tim Greer: chatmaster@chatbase.com / software@linkworm.com
Chat Base: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripting in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, Sciences.
------------------------------
Date: Fri, 28 May 1999 14:16:37 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help! need fraction of a second time function
Message-Id: <5immi7.alq.ln@magna.metronet.com>
Greg Fields (greg.fields@infoadvan.com) wrote:
: Is there any such thing?
Such a thing as what?
: Is there anything out there that would allow me to track hundredths or
: thousandths of a second?
Perl FAQ, part 8:
"How can I measure time under a second?"
: Thanks,
Uh huh.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 28 May 1999 14:29:34 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Im not asking for much
Message-Id: <eanmi7.3nq.ln@magna.metronet.com>
jknoll@my-deja.com wrote:
: I just wanted to try and learn this language from the ground up. I
: wanted to make sure I knew WHY things happened when they did, not just
: how to make it look right. I guess this wasnt the right place to start,
: no one here really seems to want to give me a hint, so I am not real
: optimistic about my next request; If I can't get help here, does anyone
: have any idea where a starting perl programmer should start?
Try it again, but craft a coherent question, and include the
code that you tried, and what you want it to do instead of
what it is doing.
We are not likely to apologize for not being able to read your mind.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 28 May 1999 16:04:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: LOG base setting in Perl5
Message-Id: <MPG.11b8c0bbd6cdc81d989b2b@nntp.hpl.hp.com>
In article <7iml5d$dif$1@vixen.cso.uiuc.edu> on 28 May 1999 17:52:45
GMT, Daniel S. Lewart <d-lewart@uiuc.edu> says...
> "J. Stephen Downie" <jdownie@uiuc.edu> writes:
> > What is the easiest way to take the log of number to Base 2 rather than
> > Base e in perl? It has me stumped.
>
> log($x)/log(2)
I was going to carp about perhaps repeatedly computing the constant
log(2) when I decided to measure it. To my surprise, I found no
significant difference in speed between using a literal, a variable, or
a call to a built-in function. Perl overhead dominates the speedy C
library yet again.
All my 'naive' C expectations are shot down once again. Hmmmmph!
(Tthis might not be true for a s-l-o-o-o-w function. But who knows?
Maybe a smart implementation caches the results.)
#!/usr/local/bin/perl -w
use strict;
use Benchmark;
my $log2 = log 2;
timethese(1 << (shift || 0), {
Cntrl => sub { 0.693147180559945 },
Once => sub { $log2 },
Raw => sub { log 2 },
});
__END__
Benchmark: timing 262144 iterations of Cntrl, Once, Raw...
Cntrl: 6 secs ( 3.49 usr 0.04 sys = 3.53 cpu)
Once: 4 secs ( 3.44 usr -0.02 sys = 3.42 cpu)
Raw: 7 secs ( 3.45 usr 0.03 sys = 3.48 cpu)
Benchmark: timing 1048576 iterations of Cntrl, Once, Raw...
Cntrl: 3 wallclock secs ( 3.70 usr + -0.02 sys = 3.69 CPU)
Once: 4 wallclock secs ( 4.08 usr + 0.00 sys = 4.08 CPU)
Raw: 3 wallclock secs ( 3.69 usr + 0.00 sys = 3.69 CPU)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 28 May 1999 16:44:25 -0700
From: MORRIS LEE <morlee@s277-4.CS.Berkeley.EDU>
Subject: lwp - getting images
Message-Id: <Pine.GSO.3.96.990528163828.8602C-100000@s277-4.CS.Berkeley.EDU>
How do I retrieve an image using http and the LWP module? I've tried the
following code on Windows 95, ActivePerl version 5.005_02.
$ua = new LWP::UserAgent;
$req = new HTTP::Request 'Get' => $URL;
$req->header('Accept' => 'image/jpg');
$res = $ua->request($req, "temp.jpg");
I get back '501 Method Not Implemented'.
Thanks for any help.
Morris Lee
molee@uclink4.berkeley.edu
------------------------------
Date: Fri, 28 May 1999 16:39:11 -0700
From: drumz@best.com (Ethan Straffin)
Subject: Moving tags via regexp
Message-Id: <drumz-2805991639110001@lsjumb.stanford.edu>
Hi,
I'm wondering if there are any regular expression wizards out there who
could help me with an interesting challenge. I'm working on an SGML->HTML
parser in Perl. The HTML is going to contain a number of <A NAME> anchors
that will serve as targets for cross-references. The challenge is, I need
to move all of these anchors *back* by n characters (where n is a
constant, let's say 100) from the point where they are originally placed.
(The goal is to make the beginning of the text to which the
cross-reference refers appear slightly below the top of the browser
window, rather than exactly at the top.) Furthermore, the regexp must not
allow the anchor to be placed within another HTML tag (<...>), or within a
second kind of tag that we use for dynamic markup ([[...]]). Ideally, the
count of n characters should not include characters within tags, though
I'm willing to drop this restriction if it makes the problem
easier/possible to solve.
Here's a visual representation of the problem, with n = 20:
+-------------------------------------------------+
| |
| +--------+-------+
v | |
word word word <HTML tag> word [[DTL tag]] word <A NAME="foo"></A> word
Can this be done with a regular expression via s///, or do I need to use
the (far less efficient) approach of looping over the individual
characters and using flags to keep track of whether I'm within the scope
of a tag?
Many thanks,
Ethan Straffin
------------------------------
Date: Fri, 28 May 1999 16:45:47 -0700
From: drumz@best.com (Ethan Straffin)
Subject: Re: Moving tags via regexp
Message-Id: <drumz-2805991645470001@lsjumb.stanford.edu>
As a further restriction -- I knew there was something else! -- the anchor
cannot be placed within an entity (&...;). Yikes.
Ethan
In article <drumz-2805991639110001@lsjumb.stanford.edu>, drumz@best.com
(Ethan Straffin) wrote:
> Hi,
>
> I'm wondering if there are any regular expression wizards out there who
> could help me with an interesting challenge. I'm working on an SGML->HTML
> parser in Perl. The HTML is going to contain a number of <A NAME> anchors
> that will serve as targets for cross-references. The challenge is, I need
> to move all of these anchors *back* by n characters (where n is a
> constant, let's say 100) from the point where they are originally placed.
> (The goal is to make the beginning of the text to which the
> cross-reference refers appear slightly below the top of the browser
> window, rather than exactly at the top.) Furthermore, the regexp must not
> allow the anchor to be placed within another HTML tag (<...>), or within a
> second kind of tag that we use for dynamic markup ([[...]]). Ideally, the
> count of n characters should not include characters within tags, though
> I'm willing to drop this restriction if it makes the problem
> easier/possible to solve.
>
> Here's a visual representation of the problem, with n = 20:
>
> +-------------------------------------------------+
> | |
> | +--------+-------+
> v | |
> word word word <HTML tag> word [[DTL tag]] word <A NAME="foo"></A> word
>
> Can this be done with a regular expression via s///, or do I need to use
> the (far less efficient) approach of looping over the individual
> characters and using flags to keep track of whether I'm within the scope
> of a tag?
>
> Many thanks,
> Ethan Straffin
------------------------------
Date: Fri, 28 May 1999 17:18:14 -0700
From: "Tedstruk" <tedstruk@toledotel.com>
Subject: Re: Nested Data in MySQL.. getting at it with DBI..
Message-Id: <7inabl$b1o$1@nntp.or.nw.verio.net>
goto home.thirdage.com, if your not a member become one. look up my
homesite at Computers/tedstruk.
Use the link "Cybernecton One" near the end of the page.
My new database extension enables 64k instead of 128k twice as fast as a
standard database update. Works by retrieving database information by user
specifications only limited by html programmer experience. Just check it
out.
>
> ptrainor@title14.com (key: www.title14.com/pgp/pat.key)
> Programming Rates: I do it: $20 You watch: $40 You help: $80
>
------------------------------
Date: Sat, 29 May 1999 05:41:20 -0500
From: dkoleary@mediaone.net (Doug O'Leary)
Subject: Network programming tutoriall?
Message-Id: <MPG.11b9804e6f264145989695@nntp.ce.mediaone.net>
Hi;
I've got what's probably a newbie question. I'm a self taught C
programmer, although I haven't touched a line of code in a number of
years. That helped quite a bit when I needed to pick up perl in order to
support some unix sysadmin functionality that I was looking for.
Now, I'm taking on a project that involves some network programming with
which I have absolutely no familiarity - never had to do that in C or any
other language, so I never bothered to learn it.
I looked through the information in the Perl Cookbook, and I understood
most of it; however, I know that when I start typing in my first program
that I'm in for a steep learning curve.
Is there a tutorial or something similar that covers the basics of
network programming - something on the order of the Learning Perl book?
What variables need to be set, what functions to call, when, etc, etc?
If all else fails, I can dust off my "Advanced Programming in the UNIX
Environment"; but, that seems like trying to kill a fly with a
thermonuclear device.
Thanks for any hints/pointers.
Doug
--
==============
Douglas K. O'Leary
Senior System Admin
dkoleary@mediaone.net
dolear@acxiom.com
==============
------------------------------
Date: Fri, 28 May 1999 15:04:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Put my() inside or outside a loop?
Message-Id: <MPG.11b8b2c0b0d5d563989b2a@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7iljp0$b9r@news.service.uci.edu> on Fri, 28 May 1999
08:23:35 GMT, Steve Shreeve <shreeve@uci.edu> says...
> When I use my() variables, should I put the my() statement inside of a loop or
> outside? I would *think* that by putting the my() outside of the loop it would
> be quicker because it would not be "called" over and over... Yet, look at the
> following results (at the end).
>
> Can someone explain why it's better to put the my() inside the loop?
> Furthermore, why is Try3 as good as or better than Try1? This all seems sort
> of odd to me...
>
> Please let me know you comments by sending me email directly as well as
> replying to this post...
No problem, because you asked so politely.
...
> Benchmark: timing 1000 iterations of Name1, Name2, Name3, Name4...
> Try1: 3 secs ( 2.64 usr 0.00 sys = 2.64 cpu)
> Try2: 3 secs ( 3.21 usr 0.00 sys = 3.21 cpu)
> Try3: 2 secs ( 2.62 usr 0.00 sys = 2.62 cpu)
> Try4: 4 secs ( 3.16 usr 0.00 sys = 3.16 cpu)
<SNIP of lengthy benchmark>
I eliminated a lot of overhead from your benchmark code, to emphasize
the problem. It is quite counter-intuitive to me also.
A couple of years ago, I thought I measured this and came to the
opposite conclusion. I guess I was wrong.
Someone familiar with the implementation should try to answer your
question. My conjectures would be no more than that -- conjectures.
#!/usr/local/bin/perl -w
use strict;
use Benchmark;
timethese(1000, {
'Try1' => sub {
for (1 .. 1000) {
my($l,$m,$n,$o,$p,$q,$r) = (10 .. 20);
}
},
'Try2' => sub {
my($l,$m,$n,$o,$p,$q,$r);
for (1 .. 1000) {
($l,$m,$n,$o,$p,$q,$r) = (10 .. 20);
}
},
});
__END__
Benchmark: timing 1000 iterations of Try1, Try2...
perl 5.005_03 (Windows NT):
Try1: 9 wallclock secs ( 8.86 usr + 0.00 sys = 8.86 CPU)
Try2: 21 wallclock secs (21.22 usr + 0.00 sys = 21.22 CPU)
perl 5.004_03 (HP PA_RISC) (a shared webserver):
Try1: 79 secs (34.95 usr 0.25 sys = 35.20 cpu)
Try2: 136 secs (68.25 usr 0.47 sys = 68.72 cpu)
perl 5.002 (HP PA_RISC) (a dedicated workstation):
Try1: 34 secs (34.07 usr 0.00 sys = 34.07 cpu)
Try2: 78 secs (77.60 usr 0.01 sys = 77.61 cpu)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 28 May 1999 22:45:37 GMT
From: markro@nortelnetworks.com (Mark R.)
Subject: Running a Background Process from CGI
Message-Id: <374f1abe.6679253@carnews0>
Hi there,
I am pretty new to Perl so this may be an easy question.
I am running Solaris 2.6 Perl 5.004.
I have a Perl-CGI script which makes a call to another script (not a
Perl script). I want the script which is called from the Perl script
to be run in the background. Is there any easy way to do this?
Presently, using the "system" command to make the call, the procedure
must be fully completed before the user sees the response page. The
procedure that I want in the background eventually emails the user
something. The reason I want it in the background is because it
updates web pages of data and depending on what the user selects, it
could take a very long time.
Any help would be greatly appreciated.
Mark Robinson
markro@nortelnetworks.com
------------------------------
Date: Fri, 28 May 1999 23:08:38 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: scalar refs and m/(pat)/
Message-Id: <374F2197.6EEF2996@home.com>
[posted & mailed]
Eli the Bearded wrote:
>
> Is there some way to get m/(pat)/ type things to return scalar
> refs instead of just read-only copies of what was matched?
If you're just doing simple matches you could do something like:
$one = \substr($_, index($_, $1), length($1)) if /(pat)/;
You might be able to extend this technique to $two, $three, etc. or m//g
but it would get ugly pretty quick.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 28 May 1999 18:02:43 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Thanks man....HOWS THIS?
Message-Id: <x7n1yohmyk.fsf@home.sysarch.com>
>>>>> "IRAA" == I R A Aggie <fl_aggie@thepentagon.com> writes:
IRAA> 'perldoc perl' is your friend. Once you have become familiar
IRAA> with it, and learnt how to 'grep' its wisdom, you'll be able to
IRAA> come up with your own solutions in a much more rapid fashion
IRAA> than relying upon usenet, making you look smart *and* handsome,
IRAA> causing the PHB to give you a raise and promotion (without any
IRAA> real reason), and having babes chase you down and beg you to be
IRAA> the father of their children...
hey, that doesn't happen to me and i am a close personal friend of the
perl docs!
:-(
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 28 May 1999 18:09:30 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Thanks man....HOWS THIS?
Message-Id: <x7k8tshmn9.fsf@home.sysarch.com>
>>>>> "j" == jknoll <jknoll@my-deja.com> writes:
j> I just wanted to know how to return down a few lines after some text- so
j> it isnt all bunched up.
maybe i was grouchy but it still begs the question, what are you talking
about?
just look at that sentence and please explain what it means? what does
"return down a few lines" mean? what is bunched up? where is the text
you want to put something after? we all speak english here (sorta) but
that sentence is from another planet.
when i said you aren't being clear, i meant it. i have no friggin' idea
if you are talking about a file, a screen, a printout, a protocol, or what!
when you are asked to clarify something, you don't just repeat it in
another post, you expand it so we can see what you really mean and
want. you haven't gotten an answer yet since you haven't aske the right
question(s). and we can't help you figure out what they are. that is the
first clause of your side of the usenet bargain. ask a question that can
be asnwered.
i am not grouchy. i have a personality deficiency.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Fri, 28 May 1999 14:38:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Thanks man....HOWS THIS?
Message-Id: <mrnmi7.3nq.ln@magna.metronet.com>
jknoll@my-deja.com wrote:
: I just wanted to know how to return down a few lines after some text- so
: it isnt all bunched up.
Here are 7 ways. There are several more.
Don't know which is best for your situation because you
have not told us what your situation is.
-----------------------
#!/usr/bin/perl -w
use strict;
print 'WORDSWORDS
WORDSWORDS
';
print "-------------------\n";
print "WORDSWORDS
WORDSWORDS
";
print "-------------------\n";
print "WORDSWORDS\n\nWORDSWORDS\n";
print "-------------------\n";
print qq(WORDSWORDS\n\nWORDSWORDS\n);
print "-------------------\n";
print <<ENDSTUFF;
WORDSWORDS
WORDSWORDS
ENDSTUFF
print "-------------------\n";
print join("\n\n", 'WORDSWORDS', 'WORDSWORDS'), "\n";
print "-------------------\n";
{ local $, = "\n\n";
print 'WORDSWORDS', 'WORDSWORDS'; print "\n";
}
print "-------------------\n";
-----------------------
Choose whichever one you like the most.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 V8 Issue 5822
**************************************