[8083] in Perl-Users-Digest
Perl-Users Digest, Issue: 1702 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 22 12:17:23 1998
Date: Thu, 22 Jan 98 09:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 22 Jan 1998 Volume: 8 Number: 1702
Today's topics:
piping to postmail? tricer@hiwaay.net
Re: Book review wanted <pdcawley@bofh.org.uk>
Re: Byte Ordering using Perl <jdporter@min.net>
Can I format emails send using POST, mailto? <osullm@cork.cig.mot.com>
Re: Can I format emails send using POST, mailto? (Clay Irving)
CGI_Lite under NT <kennedym@spectranet.ca>
CGIWRAP & cookies <andrew.spiers@virgin.net>
Re: converting string to function reference <jdporter@min.net>
Re: Freidl's book mystery (Gabor)
Re: HTTP debugger. Does that exist? <francois.piette@ping.be>
Re: I need a man to lick me in to a frenzy!!! <jdporter@min.net>
Re: Installing and compiling modules (SGI, IRIX 6.2) (Nathan V. Patwardhan)
Re: Newer than New . . . :-)) <jdporter@min.net>
Re: Outlook 97 and perl scripts (Lutz Albers)
Re: perl -- a language for LEARNING programming? <jdporter@min.net>
Re: perl equivalent of stty...? (Andrew M. Langmead)
PERL Rookie Problem <nemanja@nortel.ca>
Re: PERL Rookie Problem (Clay Irving)
perl to delete Unix accts (Randy Rokosz)
Re: perl5 and Sybase dblibs mpeppler@mbay.net
Re: Please help me!! (Andrew Williams)
References to parent objects (Dan Sumption)
Re: Reg Expression, can it be improved? poster3001@hotmail.com
site Search version 2.00b Released (Krishnan Jayakrishnan)
Re: source into binary code <merlyn@stonehenge.com>
Re: sysread vs <> and others (Andrew M. Langmead)
update with ora_open <marcop@unipg.it>
URL-getting when User-Agent demanded (Charles Packer)
Re: What am I missing here? <jdporter@min.net>
Re: Why shift ? (Gabor)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Jan 1998 09:51:32 -0600
From: tricer@hiwaay.net
Subject: piping to postmail?
Message-Id: <885483476.388759566@dejanews.com>
I am having a problem with getting full perl functionality with iis.
>From the command line, the following works great, however it doesn't do a
thing if called from a browser. (yes, this is just a small portion of
code in a perl script, the rest works just fine but this doesn't do
anything, and returns no error message.
open (MAIL, "| c:\\postmail\\postmail.exe -s"hello there"
-Hmailer.address.edu tricer@hiwaay.net");
print MAIL, "hello again";
close MAIL;
Anybody got any ideas why? Also this chunk works just fine in unix (only
I use sendmail instead of postmail)
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 22 Jan 1998 14:47:09 +0000
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: Book review wanted
Message-Id: <54iurch8gi.fsf@gunnar.aladdin.net>
Mon, 19 Jan 1998 01:37:00 -0500 comdog@computerdog.com (brian d foy) comp.lang.perl.misc
> In article <34C2C63E.71029C2B@mail.uca.edu>, Cameron Dorey <camerond@mail.uca.edu> posted:
>
> >Save the $20, spend it on books from O'Reilly (no, I don't work for
> >them, but I would be glad to accept a free copy of a title for the
> >unsolicited plug - the ones I have are all very good).
>
> O'Reilly would quickly go out of business if they gave a free book
> per unsolicited plugs :)
Heh. I got one once upon a long time ago. I don't think they bother
any more though.
--
Piers Cawley -- Systems Genie for Aladdin
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one. -- John Barrow
------------------------------
Date: Thu, 22 Jan 1998 11:18:26 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Byte Ordering using Perl
Message-Id: <34C77152.5E28@min.net>
dave porter wrote:
>
> Clinton Pierce <cpierce1@cp500.fsic.ford.com> wrote in article
> > There's time efficiency...
> > ..and then there's porter & maintainer efficiency...
>
> and clearly, porter efficiency is the only thing that
> matters in this world (well, at least as far as I'm
> concerned, it is).
2nd!
------------------------------
Date: Thu, 22 Jan 1998 15:34:36 +0000
From: Michael O'Sullivan <osullm@cork.cig.mot.com>
Subject: Can I format emails send using POST, mailto?
Message-Id: <34C7670B.4C3FA8C4@cork.cig.mot.com>
Hi there,
I operate an electronic helpdesk and want to allow my users to email
this helpdesk via a web page.
This is easy using POST and mailto in the HTML form but I need to format
the email so that words like "Priority Urgent" are on the first line.
Using mailto does something like:
Priority=Urgent
I can do it via a cgi-bin script easily but the mail gets sent from
"nobody".
How can I send the formatted email as the user who completed the form?
Thanks in advance,
Mike.
--
_/ \_/ \_ Michael O'Sullivan | 'Phone : +353-21-511204
/ \_/ \_/ \ Motorola Ireland Ltd. | Fax : +353-21-357635
\_/ \_/ \_/ Mahon Industrial Estate | Email : osullm@cork.cig.mot.com
/ \ / \ / \ Blackrock, Cork, Ireland.| POST : QCOR150@email.mot.com
------------------------------
Date: 22 Jan 1998 11:47:01 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Can I format emails send using POST, mailto?
Message-Id: <6a7t65$avn@panix.com>
In <34C7670B.4C3FA8C4@cork.cig.mot.com> Michael O'Sullivan <osullm@cork.cig.mot.com> writes:
>I operate an electronic helpdesk and want to allow my users to email
>this helpdesk via a web page.
>This is easy using POST and mailto in the HTML form but I need to format
>the email so that words like "Priority Urgent" are on the first line.
>Using mailto does something like:
>Priority=Urgent
>I can do it via a cgi-bin script easily but the mail gets sent from
>"nobody".
>How can I send the formatted email as the user who completed the form?
This doesn't sound like a Perl question, but it would help if you post
the code that you are having a problem with. Otherwise everyone will have
to take wild-ass guesses why you are having a problem. :)
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Thu, 22 Jan 1998 09:50:29 -0500
From: Michael Kennedy <kennedym@spectranet.ca>
Subject: CGI_Lite under NT
Message-Id: <34C75CB5.6391@spectranet.ca>
I've got the exact same script running on both platforms. All includes
available (there's only 1) and it's super simple.
Here's a synopsis (I've left out all the HTML stuff)
use CGI_Lite; <-- publicly available CGI library
$cgi = new CGI_Lite();
%formdata = $cgi->parse_form_data();
foreach $key (sort keys(%formdata)) {
print "$key - $formdata{$key}";
}
exit;
NOW, under the UNIX environment, this works like a charm. But under NT
it's frazzled, it doesn't seem to be able to read the form data.
Any suggestions?
Michael K
------------------------------
Date: Thu, 22 Jan 1998 16:29:22 +0000
From: Andrew Spiers <andrew.spiers@virgin.net>
Subject: CGIWRAP & cookies
Message-Id: <34C773E2.EE5F60E7@virgin.net>
I am trying to set a cookie to stop a user doing something twice. The
problem is that all of my CGI scripts have be run using CGIWRAP. This
means the cookies end up coming from my ISP instead of me. I am
therefore unable to check to se if the cookies exist. Any ideas how I
can get round this ?
Many thanks,
------------------------------
Date: Thu, 22 Jan 1998 11:03:28 -0500
From: John Porter <jdporter@min.net>
Subject: Re: converting string to function reference
Message-Id: <34C76DD0.7933@min.net>
Jim Abraham wrote:
>
> try something like this:
>
> my $x = "foo";
> &{$x}; # or &{foo}
>
> sub foo {
> print "Perl's cool!";
> }
No, that doesn't quite answer his question.
He wants a reference to the sub; you're calling the sub.
It's simple of course:
$name = 'foo';
$fref = \&{ $name };
------------------------------
Date: 22 Jan 1998 15:00:55 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: Re: Freidl's book mystery
Message-Id: <slrn6cendn.nos.gabor@vinyl.quickweb.com>
In comp.lang.perl.misc, Joseph N. Hall <joseph@5sigma.com> wrote :
# m{/\*(.*?)\*/} is correct. However, it wasn't that simple before
# the advent of *?. There are a couple of points being made. (1)
# it is very difficult to express certain "non-greedy" constructs
# with greedy regular expressions, and (2) which one is more efficient
# is not necessarily obvious.
Actually, it's not correct. Try something with a comment delimiter
embedded.
/*
puts("hello */ world");
*/
------------------------------
Date: 22 Jan 1998 16:39:45 GMT
From: "Frangois Piette" <francois.piette@ping.be>
Subject: Re: HTTP debugger. Does that exist?
Message-Id: <01bd274f$eb0f73c0$1f41a1c0@fpiette.chrlg.be>
> I'm looking for a program to view all the HTTP communication between my
> browser and my server to see what my CGI scripts and browser are really
> doing. Does something like that exist?
I use Precision Guesswork LANWATCH program running on a PC connected on the
same network as my PC. It's a LAN traffic analyser which shows you
everything passing on the cable. http://www.guesswork.com
--
francois.piette@ping.be
The freeware Internet Component Suite maker
Download from http://www.rtfm.be/fpiette/indexuk.htm
------------------------------
Date: Thu, 22 Jan 1998 11:16:22 -0500
From: John Porter <jdporter@min.net>
Subject: Re: I need a man to lick me in to a frenzy!!!
Message-Id: <34C770D6.3E16@min.net>
What section would that be in? 1? 3? My system doesn't seem
to have it either. ;-)
John Porter
------------------------------
Date: 22 Jan 1998 14:41:20 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Installing and compiling modules (SGI, IRIX 6.2)
Message-Id: <6a7lqg$pv9@fridge.shore.net>
Lance Turner (lance@junto.net) wrote:
: I guess I also need a more basic question answered: is compilation
: necessary for the installation of all perl modules?
No, you don't have to "compile" all modules, meaning -- not all
modules require compilation of C code. Many modules rely on
MakeMaker; you'll probably need to make these. You should probably
refer to the h2xs, perlmod, perlxstut, and perlxs manpages to see what
I'm talking about.
Yes, you can use gcc as an alternate compiler: perl Makefile.PL CC=gcc
(or whatever). And yes, you can compile Perl with gcc. I prefer to
build my own Perl because I like to add support for things like sfio.
Whether or not you choose to build your own probably will depend on
what your p/c version does/doesn't do for you.
--
Nathan V. Patwardhan
------------------------------
Date: Thu, 22 Jan 1998 11:20:36 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Newer than New . . . :-))
Message-Id: <34C771D4.234@min.net>
The best place to start is www.Perl.com. At least, if you have web
access.
Go there. It has book reviews and recommendations, tutorials, faqs,
software, etc. etc.
------------------------------
Date: 22 Jan 1998 06:56:59 GMT
From: lutz@tavari.muc.de (Lutz Albers)
Subject: Re: Outlook 97 and perl scripts
Message-Id: <6a6qjr$p30@morranon.tavari.muc.de>
In article <6a50a8$8vr$2@mainsrv.main.nc.us>,
scott@softbase.com writes:
> Tony Arnold (tony.arnold@mcc.ac.uk) wrote:
> There *is* a MAPI.Session Automation object which you can use from
> Perl. ***BUT*** it is totally undocumented. This is probably because it
> is unsupported and does not work. Various sources allude to it, but it
> is not formally documented. By guessing, based on the MAPI
Sorry to buzz in, but this IS documented, once you find Microsoft's
name for it. Search for 'Active Messaging Libarary 1.1'. It has
changed it's name to something called 'Collabarative *' and a
new version number (1.2). I'm using this stuff at work (albeit with
VisualBasic, bleech). BTW, if you REALLY, really want, then you
can control Outlook itself ...
ciao
lutz
--
Lutz Albers, lutz@muc.de
Do not take life too seriously, you will never get out of it alive.
------------------------------
Date: Thu, 22 Jan 1998 11:41:29 -0500
From: John Porter <jdporter@min.net>
Subject: Re: perl -- a language for LEARNING programming?
Message-Id: <34C776B9.64F9@min.net>
Casper Kvan Clausen wrote:
>
> The way I see it, C is only good for writing compilers/interpreters
> for useful languages (that oughtta net me some flames :).
Yes indeedee! [about the flames]
C is -- as I always say -- a high-level assembly language.
C is A Better Assembly Language.
When you program in C, you know what the real machine is going
to do. You know that a function call in C sets up a call frame
on the real stack, and that the arguments and local variables are
allocated in the call frame. You know that global (and other
static) variables are allocated in the DATA segment, and are
initialized at program start. And so on.
What you get from using C is the same (or nearly) run-time
efficiency you expect to get from assembly.
Clearly, it is important for every professional programmer to know
this stuff, along with computer architecture and organization.
C is the best language for this. Why would anyone recommend PL/1
or Forth over C?
But for other types of essential knowledge, other langauges are
appropriate. Perl might be good for teaching other aspects of
programming, such as functional and object-oriented.
Problem is, Perl obviates the need for hand-coding some things,
such as data structures, that kids should in fact learn how to do.
That said, Perl is the first language I would teach.
John Porter
------------------------------
Date: Thu, 22 Jan 1998 16:09:41 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: perl equivalent of stty...?
Message-Id: <En70w6.t@world.std.com>
mmj@masskara.philonline.com.ph (Michael J. Maravillo) writes:
>I have the following line in my code:
> system("/bin/stty echo -raw > /dev/ttyS0 < /dev/ttyS0");
>Is there such equivalent in "pure" perl?
stty is a command line interface to controlling the terminal
driver. In perl you can use POSIX::Termios.
Since "-raw" is a shortcut to a bunch of different settings, take a
look at the stty man page for which settings it is made up of.
--
Andrew Langmead
------------------------------
Date: Thu, 22 Jan 1998 10:11:55 -0500
From: Nemanja Dundjerovic <nemanja@nortel.ca>
Subject: PERL Rookie Problem
Message-Id: <34C761BB.15E32ABF@nortel.ca>
This is a multi-part message in MIME format.
--------------0D19A576DDB58A6E614C0129
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
HI!
I have a question for all the perl pros on this group. I intend to use a
WIN95 PC for compiling (don't laugh, I haven't a UNIX station). I
downloaded the CGI.pm module, which has (to my chagrin) been tarred and
gzipped. Apparently, there is a way to extract the module in WIN95, but
the CPAN page gave me a cold shoulder as far as that is concerned. I'm
left to my own devices, so, lazy as I am, I figured there are people who
know how to do this, or who will tell me that I'm a fool to compile perl
on WIN95.
Either way, if you know the answer to my problem, please let me know.
Thanks a bundle.
Nemanja (nemanja@nortel.ca)
--------------0D19A576DDB58A6E614C0129
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Nemanja Dundjerovic
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Nemanja Dundjerovic
n: Dundjerovic;Nemanja
org: Northern Telecom
adr: 14 Central Park Drive;;;Ottawa;Ontario;K2C 3Z9;Canada
email;internet: nemanja@nortel.ca
tel;work: (613) 724-7025
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------0D19A576DDB58A6E614C0129--
------------------------------
Date: 22 Jan 1998 11:39:28 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: PERL Rookie Problem
Message-Id: <6a7so0$ado@panix.com>
In <34C761BB.15E32ABF@nortel.ca> Nemanja Dundjerovic <nemanja@nortel.ca> writes:
Please read this information on how to choose a good subject for a post:
<URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>
>This is a multi-part message in MIME format.
>--------------0D19A576DDB58A6E614C0129
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
Yeeck! MIME in a newsgroup!
>HI!
>I have a question for all the perl pros on this group. I intend to use a
>WIN95 PC for compiling (don't laugh, I haven't a UNIX station). I
>downloaded the CGI.pm module, which has (to my chagrin) been tarred and
>gzipped. Apparently, there is a way to extract the module in WIN95, but
>the CPAN page gave me a cold shoulder as far as that is concerned. I'm
>left to my own devices, so, lazy as I am, I figured there are people who
>know how to do this, or who will tell me that I'm a fool to compile perl
>on WIN95.
WinZIP will handle tar.gz files just fine.
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: 22 Jan 1998 08:45:03 -0700
From: rokosz@ug2.plk.af.mil (Randy Rokosz)
Subject: perl to delete Unix accts
Message-Id: <6a7phv$bpq$1@ug2.plk.af.mil>
I'm trying to write a setuid perl script that deletes Unix accounts, but
it either gets an insecure dependency error in trying to delete the home
directory, or, with an attempt at doing a 'userdel':
UX: userdel: ERROR: Permission denied.
This script can edit the passwd and shadow files, create home directories
in the same partition - just seems strange to me that now I can't go a few
steps further. I do untaint any variables I've tried to use:
if ($username =~ /^([-\@\w.]+)$/) {
$username = $1;
}
system "/usr/sbin/userdel -r $username";
Thanks in advance!
Randy Rokosz
------------------------------
Date: Thu, 22 Jan 1998 09:35:52 -0600
From: mpeppler@mbay.net
Subject: Re: perl5 and Sybase dblibs
Message-Id: <885482977.406847495@dejanews.com>
In article <01bd26ca$9fb17b60$6b01a8c0@pperroud.interlog.com>,
"Patrick Perroud" <pperroud@interlog.com> wrote:
>
> I posted an article to comp.lang.perl.misc back in Oct 97, asking if there
> was a
> perl beast that could give me access to both our Sybase and Oracle db's.
>
> I received several responses pointing me to the CPAN sites (Thank-you very
> much by the way) . I downloaded perl5.004_04-tial4, DBI-0.90,
> DBD::Oracle-0.47, DBD::Sybase-0.04
> compiled, tested and installed the modules.
>
> The only problem I have is DBD::Sybase uses ctlibs, I am running Sybase 4.x
>
> which uses dblibs.
A version of DBD::Sybase that uses the Sybase DBlibrary API will probably
be available fairly soon (no, don't ask exactly when - I don't know
yet...)
>
> Oracle and perl are installed on a Sun Ent3000 running solaris 2.5.1 and
> Sybase is installed on a sun sparc running 4.1.x.
Are you expecting to run your perl scripts on the Solaris 2.5.1 machine?
If so you're probably going to need the Sybase libraries for Solaris 2.x,
unless the binary compatibility feature works better than I thought...
>
> I had a look at the CPAN sites and noticed that sybperl-2.08 under MEWP
> includes modules for Sybase::DBlib, Sybase::BCP, Sybase::sybperl,
> Sybase::CTlib. The readme indicates I require perl5.002.
>
> My question is if I get sybperl-2.08 can I install Sybase::DBlib running
> perl5.004_04-trial4 and is there anything special I need to do?
No - it should build just fine - except for the caveat about libraries and
OS versions above.
>
> Does this use the DBI?
No - the sybperl modules are Perl implementations of the Sybase APIs.
Michael
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 22 Jan 1998 15:48:43 GMT
From: andrew@edoc.com (Andrew Williams)
Subject: Re: Please help me!!
Message-Id: <34c76a0a.61766984@news.clark.net>
On 22 Jan 1998 04:36:28 GMT, shailkumar@aol.com (SHAILKUMAR) wrote:
>Hi,
>
>I'm a novice in perl. I wrote a script which takes in student info like email,
>phone
>and name and the info is stored in a text file. The various fields are stored
>in one
>line seperated by |
>
>Now, what if I have to store large informations like a resume, paragraph etc.
>How should I do that and then the way to extract it?
Use null characters \0 to seperate the data. They're almost guranteed
not to appear in data if it is something that the user types. then
it's really easy to split on nulls, rather than having to do any
parsing.
------------------------------
Date: Thu, 22 Jan 1998 16:32:45 GMT
From: dan@gulch.demon.co.uk (Dan Sumption)
Subject: References to parent objects
Message-Id: <34c77225.31485503@news.demon.co.uk>
I am creating an application which uses fairly complex (to me at
least) structures/objects to carry out a range of tasks.
I have hit a point where I have an object which needs to reference
some of its parent's properties, and although I can't see any problems
with this on thinking it through, I have niggling doubts in the back
of my mind, and I'd be grateful if someone could confirm to me one way
or the other.
The situation is thus:
- I have a page object, which contains a number of properties (e.g.
title, author, content)
- The page object may also have a number of unspecified file objects,
each of which holds different ways of representing the data within the
page.
- For the file object to write its own particular version of the page,
it needs to access the page's data (title etc.), and the best way I
can see of doing this is by storing a reference to the parent object
within the file structure.
e.g.
$page = new (page);
$page{TITLE} = "Gobbledigook"
$page->{FILES}[0] = new (file);
$page->{FILES}[1] = new (file);
$page->{FILES}[0]{PARENT} = \$page;
$page->{FILES}[1]{PARENT} = \$page;
foreach $file (@{$page->{FILES}}) {
print "The title for this file's is $file->{PARENT}{TITLE}\n";
}
BTW this is just a rubbish example which I just made up to save boring
you with thousands of lines of code. Please don't send me emails
telling me that there are simpler ways of doing the above - I'm well
aware of that!
TIA.
Dan Sumption
http://www.hardnet.co.uk/dan/
------------------------------
Date: Thu, 22 Jan 1998 10:22:39 -0600
From: poster3001@hotmail.com
Subject: Re: Reg Expression, can it be improved?
Message-Id: <885485702.546897926@dejanews.com>
In article <885395443.1027342350@dejanews.com>,
rlee@spcbrass.com wrote:
>
> Okay, here we go...
>
> The routine below will change all lines to lowercase EXCEPT words
> enclosed in double quotes.
>
> The below code works and I'm posting it here to show off (rofl) NOT! I
> would like a second option. (I really want a perl one-liner to do the
> same thing and get rid of the match variables).
>
> Thanks
>
> Bert
>
> #!/usr/bin/perl -wT
>
> my $rec = "";
> my $a;
>
> $_ = "This is a TEST \"Sammy 1st Birthday\" and \"SUZZY\" ABCdef019Ab";
>
# This works but gives "uninitialized" warnings with -w:
s/
([^"]*) # Optional sequence of charcaters not containing '"'.
("[^"]*")? # Optional sequence of charcaters enclosed in '"'.
/
\L$1\E # Replace first subpattern forced to lowercase.
$2 # Replace second subpattern as is.
/gx; # Global subsitution.
# This works without warnings: s/ ([^"]*) # Optional sequence of
charcaters not containing '"'. ("[^"]*")? # Optional sequence of
charcaters enclosed in '"'. / (defined($1) ? "\L${1}" : "") # Replace
first subpattern, if defined, forced to lowercase. . (defined($2) ? $2
: "") # Replace second subpattern, if defined, as is. /egx;
# This works without warnings, with embedded escaped '\"': s/
((?:\\"|[^"])*) # Optional sequence of charcaters not containing '"'.
("(?:\\"|[^"])*")? # Optional sequence of charcaters enclosed in '"'. /
(defined($1) ? "\L$1" : "") # Replace first subpattern, if defined,
forced to lowercase. . (defined($2) ? $2 : "") # Replace second
subpattern, if defined, as is. /egx;
print $_ . "\n";
>
> exit(0);
Ray.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 22 Jan 1998 16:26:53 GMT
From: saljxk@dix.agl.uh.edu (Krishnan Jayakrishnan)
Subject: site Search version 2.00b Released
Message-Id: <6a7s0d$f1m$1@Masala.CC.UH.EDU>
site Search version 2.00-beta is now available and can be downloaded from
the web-site http://www.agl.uh.edu/~saljxk/site_Search. site Search is
shareware but the author maintains a copyright over the use of site Search.
Key Features of site Search version 2.00b:-
----------------------------------------------------------------------------
# Can Perform Searches of three types, "As a Phrase", "Any Search Term",
and "All Search Terms".
# Can display "n" hits per page, where "n" is any set of numbers configured
by the web-administrator on the search form.
*# Displays the number of occurrences of each search term.
*# Displays the first 3 lines from the file containing the search term(s).
# Displays the title and description of each successful hit, each of
which are extracted from HTML tag of the file.
# Can Display an alternative description which can be included from
a text file. Description can also be a hypertext link.
*# Can be customized to include/exclude sets of files/directories in
the search path.
*# Can be configured to include a separate form at the end of each search
output which searches only the successful hits to narrow down the possibility.
# Fast & extremely customizable.
------------------------------------------------------------------------------
*Indicates features not present in previous versions.
This version (version 2.00b) is a beta version. Hence I would appreciate
comments, suggestions, bug reports etc. Please send them to
krishnan@bayou.uh.edu.
---
Sincerely
Krishnan Jayakrishnan
Systems Analyst
Allied Geophysical Labs
University of Houston
------------------------------
Date: 22 Jan 1998 08:59:35 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Chris Abajian <chris@geospiza.com>
Subject: Re: source into binary code
Message-Id: <8cn2goebyw.fsf@gadget.cscaper.com>
>>>>> "Chris" == Chris Abajian <chris@geospiza.com> writes:
Chris> isn't anybody going to answer the original question?
It's been asked and answered. Over and over again. About
3 or 4 times a month by my recollection.
It's a FAQ. It's found in the PerlFAQ. Which everyone should have
read before posting here. But most don't. So that still gives us
something to complain about. :-) :-)
And even if it wasn't answered in the PerlFAQ, some simple searches
with www.dejanews.com or www.reference.com would have found the
repeated questions *and* answers on this very subject, as well as
hundreds of others.
#ifdef SOAPBOX
But it seems that most people want to squander this great Usenet
resource for themselves, getting the personal attention that they
think they deserve for having successfully downloaded and installed a
very popular free product *without* so much as even skimming the 600
pages of documentation that COMES with it. Not to mention what a few
quick Usenet searches (or even web searches) would reveal.
#endif
<Sigh>, OK, getting back off my soapbox. Back to the task at hand of
completing my next O'Reilly book.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 222 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 22 Jan 1998 15:36:32 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: sysread vs <> and others
Message-Id: <En6zCw.KK8@world.std.com>
ml@gondwanaland.com (Mike Linksvayer) writes:
>Now I have just one more question: Is there any reason to use read
>instead of sysread unless you are doing multiple reads on the file?
>They both return undef on failure, so I wouldn't think that there
>is a safety reason.
For regular disk files, sysread will turn into a huge performance
killer if the blocks you are reading are not multiples of the
filesystems blocksize.
--
Andrew Langmead
------------------------------
Date: Thu, 22 Jan 1998 17:00:42 +0100
From: Pallotta Marco <marcop@unipg.it>
Subject: update with ora_open
Message-Id: <34C76D2A.41C6@unipg.it>
Hi !!!!
I've a big problem with ora_open. In particular the sql command "update"
doesn't work with ora_perl statment ora_open.
It's strange, as with the other sql commands it works very well.
Is there anyone can help me??????
Thanks.
Bye
Marco (greetings from Italy :)))))))))
\||||/
(o o)
_______________oOOOo_(__)_oOOOo_________________
__________| ****************** |__________
\ | * Marco Pallotta * | /
\ | ****************** | /
\ | | /
\ | 1st e-mail: marcop@unipg.it | /
\ | 2nd e-mail: marcop@rp.unipg.it | /
/ | | \
/ | http://www.unipg.it/~marcop | \
/ | http://cronos.rp.unipg.it/~marcop/welcome.html | \
/ |________________________________________________| \
/____________) |___| |___| (_____________\
| | | |
ooooO Ooooo
------------------------------
Date: 22 Jan 1998 15:47:32 GMT
From: packer@fermi.gsfc.nasa.gov (Charles Packer)
Subject: URL-getting when User-Agent demanded
Message-Id: <slrn6ceqio.mec.packer@fermi.gsfc.nasa.gov>
I've been using Jack Lund's Perl program for fetching documents
from the Web with great success. Now, however, I'm up against
a Web site that requires "browser/proxy identification,"
according to the explanatory material it sends back when I
have the debug option set. Defining said proxy seems to
involve setting an environmental variable pointing to my
own site in URL form. But then Lund's program appears to
access my location as a Web site and fail with error
"Error 154 opening port 80 on fermi.gsfc.nasa.gov: Bad file number"
I found a document
http://www.pku.edu.cn/on_line/w3html/Proxies/
that seems to address the concept, but it's a theoretical treatment
and I don't understand it. So at this point I can't figure out
whether it was correct to set http_proxy to my node address, and
I just don't have a daemon running that I should, or whether
setting http_proxy has nothing to do at all with sending
proxy identification to the target remote site.
------------------------------
Date: Thu, 22 Jan 1998 11:23:45 -0500
From: John Porter <jdporter@min.net>
Subject: Re: What am I missing here?
Message-Id: <34C77291.57F4@min.net>
Brandi Weed wrote:
>
> To my eyes, this subroutine looks okay, but it always returns true.
> Can anybody help me?
>
> sub all_needed_fields {
> $missing = 0;
> $missing = 1 if (not param('name'));
> $missing = 1 if (not param('address'));
> $missing = 1 if (not param('city'));
> $missing = 1 if (not param('state'));
> $missing = 1 if (not param('zipcode'));
> $missing = 1 if (not param('email'));
> return $missing;
> }
>
Could it be that you're always missing at least one of these
parameters?
Let us see more of your program!
Thanks,
John Porter
------------------------------
Date: 22 Jan 1998 15:14:54 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: Re: Why shift ?
Message-Id: <slrn6ceo80.nos.gabor@vinyl.quickweb.com>
In comp.lang.perl.misc, Eyal <eyalb@bvr.co.il> wrote :
# Hi,
#
# from the Programming Perl book (P. 118) :
#
#
# $rec = get_rec(\*STDIN);
#
# sub get_rec {
# my $fh = shift;
# return scalar <$fh>;
# }
#
# why use shift ?
What would you suggest?
my $fh = $_[0]; # bloody ugly
my ($fh) = @_;
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 1702
**************************************