[17218] in Perl-Users-Digest
Perl-Users Digest, Issue: 4640 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 17 06:05:26 2000
Date: Tue, 17 Oct 2000 03:05:11 -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: <971777110-v9-i4640@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 17 Oct 2000 Volume: 9 Number: 4640
Today's topics:
Can not substitute a "\n" with a regular expression! desperate5011@my-deja.com
Re: Can not substitute a "\n" with a regular expression (Clay Irving)
Re: CGI.pm - questions on file creation (Clay Irving)
Re: Create a copy of a variable <ddjones@speakeasy.org>
Errors ??? <Christian.Oehring@de.bosch.com>
Re: Errors ??? <R.Matzke@haushahn-as.de>
Re: Errors ??? <Christian.Oehring@de.bosch.com>
Re: Errors ??? <Rainer.Matzke@gmx.de>
Re: Errors ??? <Christian.Oehring@de.bosch.com>
Re: Errors ??? <Rainer.Matzke@gmx.de>
Re: Errors ??? (Philip Lees)
Re: Help about simple patten matching <chjie@ms23.url.com.tw>
Re: IO::Socket falls over under Perl 5.6.0 <ralawrence@my-deja.com>
Re: Looking for older versions od PERL modules <krahnj@acm.org>
Make this regex neater, anyone? (Philip Lees)
Re: Make this regex neater, anyone? (Rafael Garcia-Suarez)
Re: MS Access c_glensmith@my-deja.com
Perl works but not PerlScript - Need Help <bwats@ticnet.com>
Re: POV-Ray file parsing, digestion, and excretion? <bart.lateur@skynet.be>
Re: Regex substitution question... <nickco3@yahoo.co.uk>
Re: Regex substitution question... <ctucker@no.omenmedia.spam.com>
Re: Regex substitution question... <ctucker@no.omenmedia.spam.com>
Taking credit cards though perl jon_uk@my-deja.com
Why doesn't PERL like Gunnar <peter.prinz@siemens.at>
Re: Why doesn't PERL like Gunnar <moell@ID-PRO.de>
Re: Why doesn't PERL like Gunnar (Bernard El-Hagin)
Re: Why doesn't PERL like Gunnar (Rafael Garcia-Suarez)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 17 Oct 2000 09:23:42 GMT
From: desperate5011@my-deja.com
Subject: Can not substitute a "\n" with a regular expression!
Message-Id: <8sh5qq$73h$1@nnrp1.deja.com>
Hello everybody,
my problem is to substitute some '\n' in a string which i read in with a
perl-script.
I have to substitute them with the HTML-Tag '<br>' and then store that
string in a DB. I tried it whith this:
$string =~ s/\n/<br>/gs; and with
$string =~ s/\n/<br>/gm;
Well, to my surprise the regular expression DID NOT substitute the '\n'.
Nope, in my DB there was after this a '\n<br>'. The RegExp ADDED the
'<br>' to the '\n'.
After a lot of reading in perl documentation (and newsgroups ) i still
don't know what i am doing wrong. Can anybody out there tell me why that
%$&%(§! RegExp doesn't work?
Thanks
Michael Engels
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 17 Oct 2000 09:53:17 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: Can not substitute a "\n" with a regular expression!
Message-Id: <slrn8uo8cd.ig0.clay@panix6.panix.com>
On Tue, 17 Oct 2000 09:23:42 GMT, desperate5011@my-deja.com
<desperate5011@my-deja.com> wrote:
>my problem is to substitute some '\n' in a string which i read in with a
>perl-script.
>
>I have to substitute them with the HTML-Tag '<br>' and then store that
>string in a DB. I tried it whith this:
>
>$string =~ s/\n/<br>/gs; and with
>
>$string =~ s/\n/<br>/gm;
>
>Well, to my surprise the regular expression DID NOT substitute the '\n'.
>
>Nope, in my DB there was after this a '\n<br>'. The RegExp ADDED the
>'<br>' to the '\n'.
>
>After a lot of reading in perl documentation (and newsgroups ) i still
>don't know what i am doing wrong. Can anybody out there tell me why that
>%$&%(§! RegExp doesn't work?
You don't provide enough information. For example:
#!/usr/local/bin/perl5.6.0
while (<DATA>) {
s/\n/<br>/gs;
print;
}
__DATA__
This is a test.
This is only a test.
Result:
This is a test.<br>This is only a test.<br>
What did you do differently?
--
Clay Irving <clay@panix.com>
1 million-million microphones: 1 megaphone
------------------------------
Date: 17 Oct 2000 09:57:11 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: CGI.pm - questions on file creation
Message-Id: <slrn8uo8jn.ig0.clay@panix6.panix.com>
On Tue, 17 Oct 2000 16:44:57 +1300, Dave <eweb.support@esolutions.co.nz> wrote:
>Thanks for replies to the following, however does anyone have any code
>snippets using the CGI.pm libs?
Look at the documentation that came with the Perl distribution.
perldoc CGI
result:
CGI(3) User Contributed Perl Documentation CGI(3)
NAME
CGI - Simple Common Gateway Interface Class
SYNOPSIS
# CGI script that creates a fill-out form
# and echoes back its values.
use CGI qw/:standard/;
print header,
start_html('A Simple Example'),
h1('A Simple Example'),
start_form,
"What's your name? ",textfield('name'),p,
"What's the combination?", p,
checkbox_group(-name=>'words',
-values=>['eenie','meenie','minie','moe'],
-defaults=>['eenie','minie']), p,
"What's your favorite color? ",
popup_menu(-name=>'color',
-values=>['red','green','blue','chartreuse']),p,
submit,
end_form,
hr;
if (param()) {
print "Your name is",em(param('name')),p,
"The keywords are: ",em(join(", ",param('words'))),p,
"Your favorite color is ",em(param('color')),
hr;
}
[ snip ]
>Or what function would one use to create a file?
perldoc open
--
Clay Irving <clay@panix.com>
The chief product of an automated society is a widespread and deepening
sense of boredom.
- Cyril Parkinson
------------------------------
Date: Tue, 17 Oct 2000 09:21:19 GMT
From: Daniel Jones <ddjones@speakeasy.org>
Subject: Re: Create a copy of a variable
Message-Id: <8a6ousk5chqrpcviefbc76qjjfs66kta8l@4ax.com>
On Tue, 17 Oct 2000 01:36:45 GMT, tjla@guvfybir.qlaqaf.bet
(Gwyn Judd) wrote:
>>sub RemoveInstructor {
>> my($Name, $Class) = @_;
>>
>> my $Instructors = $ClassRoster{$Class};
>>
>> for(my $i = 0; $i < @$Instructors; $i++) {
>> if (${@$Instructors}[$i] eq $Name) {
>> splice(@$Instructors, $i, 1);
>> last;
>> }
>> }
>>}
>Well if you ever find yourself searching though an array like this then
>you really should be using a hash. ie. %ClassRoster should be a hash of
>hashes rather than a hash of arrays. Once you do that, the removal
>function becomes simple:
>delete $ClassRoster{$Class}{$Name};
Each array is small - the smallest only two names, the
largest about fifteen, so it doesn't take that long to step
through the array. We normally serve three year tours, so
names aren't removed that often. Finally, the order of the
names in the array is significant. Taking these details
into account, it seemed like an array was the best choice.
Dan
------------------------------
Date: Tue, 17 Oct 2000 09:09:25 +0200
From: Christian Oehring <Christian.Oehring@de.bosch.com>
Subject: Errors ???
Message-Id: <8sgu0g$ds3$1@proxy.fe.internet.bosch.de>
In the following script there are Errors at Line 34 near "else if" and line
40 near "}". See anybody these Errors ???
#!/usr/bin/perl
# input und output files öffnen
open (F1,"<file1");
open (F2,"<file2");
open (Fo,">outfile");
# user-liste laden
while (<F2>)
{
push (@users,$_);
}
# datei 1 durchgehen
while (<F1>)
{
# wenn Section-Marker...
if (substr($_,0,1) eq "[")
{
# ... Zeile ausgeben
print $Fo $_;
# wenn Section=global, dann $dodump auf 1, ansonsten auf 0
if ($_ eq "[Global]")
{
$dodump=1;
}
else
{
$dodump=0;
}
}
# Wenn $dodump==1
else if ($dodump)
{
# Zeile ausgeben
# hier muß noch der Filter eingebaut werden
print $Fo, $_;
}
}
------------------------------
Date: Tue, 17 Oct 2000 09:31:01 +0200
From: "Rainer Matzke" <R.Matzke@haushahn-as.de>
Subject: Re: Errors ???
Message-Id: <39ebff5c$0$21921@businessnews.de.uu.net>
use "elsif" (not "else if")
------------------------------
Date: Tue, 17 Oct 2000 09:38:32 +0200
From: Christian Oehring <Christian.Oehring@de.bosch.com>
Subject: Re: Errors ???
Message-Id: <8sgvn2$jlg$1@proxy.fe.internet.bosch.de>
Thanx, but the Errors in the last both Lines at "}" and "}" are already
exists. Why there are Errors with these both Lines ??
Thanx.
"Rainer Matzke" <R.Matzke@haushahn-as.de> wrote in message
news:39ebff5c$0$21921@businessnews.de.uu.net...
> use "elsif" (not "else if")
>
>
------------------------------
Date: Tue, 17 Oct 2000 09:52:38 +0200
From: "Rainer Matzke" <Rainer.Matzke@gmx.de>
Subject: Re: Errors ???
Message-Id: <39ec0635$0$21905@businessnews.de.uu.net>
okay, you wrote:
print $Fo, $_;
but this does not send output into file "outfile" because of the comma
use:
print $Fo $_;
bye
------------------------------
Date: Tue, 17 Oct 2000 10:00:08 +0200
From: Christian Oehring <Christian.Oehring@de.bosch.com>
Subject: Re: Errors ???
Message-Id: <8sh0vj$o33$1@proxy.fe.internet.bosch.de>
Tankx Rainer, but, the Problem with the Error of the both last "}"
continues.
My Script now with your Help, and the Problem in the last both Lines, I do
not understand :-(( the Error :
#!/usr/bin/perl
# input und output files öffnen
open (F1,"<file1");
open (F2,"<file2");
open (Fo,">outfile");
# user-liste laden
while (<F2>)
{
push (@users,$_);
}
# datei 1 durchgehen
while (<F1>)
{
# wenn Section-Marker...
if (substr($_,0,1) eq "[")
{
# ... Zeile ausgeben
print $Fo $_;
# wenn Section=global, dann $dodump auf 1, ansonsten auf 0
if ($_ eq "[Global]")
{
$dodump=1;
}
else
{
$dodump=0;
}
}
# Wenn $dodump==1
elseif ($dodump)
{
# Zeile ausgeben
# hier muß noch der User-Filter eingebaut werden
print $Fo $_;
}
}
------------------------------
Date: Tue, 17 Oct 2000 10:12:47 +0200
From: "Rainer Matzke" <Rainer.Matzke@gmx.de>
Subject: Re: Errors ???
Message-Id: <39ec0926$0$21921@businessnews.de.uu.net>
the error with else if remains!
elsif NOT!!! elseif
hope this helps
------------------------------
Date: Tue, 17 Oct 2000 08:44:25 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: Errors ???
Message-Id: <39ec106e.68835149@news.grnet.gr>
On Tue, 17 Oct 2000 09:09:25 +0200, Christian Oehring
<Christian.Oehring@de.bosch.com> wrote:
>In the following script there are Errors at Line 34 near "else if" and line
>40 near "}". See anybody these Errors ???
Try elsif instead of else if.
Phil
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer
------------------------------
Date: Tue, 17 Oct 2000 15:35:31 +0800
From: Charles Jie <chjie@ms23.url.com.tw>
Subject: Re: Help about simple patten matching
Message-Id: <39EC0143.3BB70179@ms23.url.com.tw>
The ".*" in your RE wil eat everything up to ')', exclusive.
It should be this:
s/.*?(\w+\@\w+(\.\w+)+)\W.*$/$1/os;
Regent Linus wrote:
> Hi I have a problem about extracting email address.
>
> -------------------------------------------------------------------------
> $_=q~
> Regent Linus <regent@regent.com> (Regent's Lab.)
> ~;
>
> s/.*?(\w+\@.*?(?:\..*)+)\W.*?/$1/os;
> print;
>
> -------------------------------------------------------------------------
>
> It returns :
> regent@regent.com> (Regent's Lab.)
>
> why the non-word character \W can't match '>'?
> Could anybody amend my code for me so that I could get
> regent@regent.com?
>
> Thanks
--
===============================================================
Charles Jie/Keya Tech.
===============================================================
------------------------------
Date: Tue, 17 Oct 2000 08:20:54 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Re: IO::Socket falls over under Perl 5.6.0
Message-Id: <8sh254$4fk$1@nnrp1.deja.com>
In article <slrn8ulk60.4tc.trammell@nitz.hep.umn.edu>,
trammell@nitz.hep.umn.edu (John J. Trammell) wrote:
> On Mon, 16 Oct 2000 16:54:14 GMT, Richard Lawrence
> <ralawrence@my-deja.com> wrote:
> >Consider this line:
> >
> > $socket = IO::Socket::INET->new( PeerAddr => $site,
> > PeerPort => $port,
> > Proto => "tcp",
> > Type => SOCK_STREAM
> > Timeout => 5 );
> >
> >under Perl 5 it worked fine.
>
> Wow, Perl knows how to insert missing commas? Who'da thunk it?
Actually, although no-one is going to believe me, this code has been
working fine (without the comma!) since the 23rd May 2000 and has had
over 5000 executions.
I've not touched it in the slightest until today to add the comma!!
Am i going mad?
Rich
>
> --
> John J. Trammell
> johntrammell@yahoo.com
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 17 Oct 2000 01:47:18 -0700
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Looking for older versions od PERL modules
Message-Id: <39EC1216.72BF494A@acm.org>
twod@my-deja.com wrote:
>
> Does anyone know of an online source for CPAN modules from mid-1998,
> which is when this installation was created ?
>
> Are there archives of CPAN out there ?
Walnut Creek might still have some stuff but I'm not sure. I have some
of their Perl CDROMs.
> Some examples:
>
> cpan version 1.225
Oldest I have is 1.40
> DBI version 0.93
Have it
> Data::Dumper version 2.081
Have it
> Thanks
Your welcome
So, do you want me to e-mail them to you?
John
------------------------------
Date: Tue, 17 Oct 2000 08:54:16 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Make this regex neater, anyone?
Message-Id: <39ec1232.69287369@news.grnet.gr>
Hi. I have strings of the form
IDT1PAT1ADM12ECG5
and I need to extract the _last_ group of letters - ECG in the above
example. The regex also needs to handle the simplest case, i.e. IDT4
gives IDT.
At the moment the letter groups are all three letters long, but I
don't want to depend on this, nor on the numbers being single digits.
After playing around a bit I came up with
s/(^|.+?)(\D+)\d+$/$2/
which does what I want. However, I feel there should be a neater (and
shorter) way of doing it. Any ideas from the regex wizards here?
Phil
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer
------------------------------
Date: Tue, 17 Oct 2000 09:24:19 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Make this regex neater, anyone?
Message-Id: <slrn8uo73q.fco.rgarciasuarez@rafael.kazibao.net>
Philip Lees wrote in comp.lang.perl.misc:
>Hi. I have strings of the form
>
>IDT1PAT1ADM12ECG5
>
>and I need to extract the _last_ group of letters - ECG in the above
>example. The regex also needs to handle the simplest case, i.e. IDT4
>gives IDT.
>
>At the moment the letter groups are all three letters long, but I
>don't want to depend on this, nor on the numbers being single digits.
>
>After playing around a bit I came up with
>
>s/(^|.+?)(\D+)\d+$/$2/
You don't need to anchor at the beginning.
$_ = 'IDT1PAT1ADM12ECG5';
($x) = /(\D+)\d*$/;
-> $x contains 'ECG'
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Tue, 17 Oct 2000 09:44:49 GMT
From: c_glensmith@my-deja.com
Subject: Re: MS Access
Message-Id: <8sh72g$7ub$1@nnrp1.deja.com>
Thanks Jeff
I had done a search but without finding anything I could
understand (part due to 'noise', "access" is a rather
common word!)
After posting I carried on and found somestuff ( including links
to Activestate and an ODBC implementation).
I am stuck with Access because that is what the company uses and
database already exists.
Now I need to find a basic SQL tutorial!
Regards
Chris
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 17 Oct 2000 03:56:36 -0500
From: "BW" <bwats@ticnet.com>
Subject: Perl works but not PerlScript - Need Help
Message-Id: <05E6D48B0D18199E.1A8FA1C256E1D6AB.5D9186A40D9F8776@lp.airnews.net>
I'm using Apache 1.3.14/Win95/ActivePerl
The setup for Apache went ok, and Perl works fine with CGI scripts.
But PerlScript doesn't work.
The Docs say that it's an option during the install, But I didn't see any
options for PerlScript.
Of course the docs didn't tell any method to invoke the option.
???
Anyone know the secret to this option?
Here's what the Docs say:
Requirements: (These are met)
Windows 95
Microsoft Windows Installer 1.1+ (available from
http://download.microsoft.com/download/platformsdk/wininst/1.1/W9X/EN-US/Ins
tMsi.exe)
Internet Explorer 5 (available from http://windowsupdate.microsoft.com)
DCOM for Windows 95 (available from
http://www.microsoft.com/com/resources/downloads.asp)
MSVCRT (available from ftp://ftp.microsoft.com/softlib/mslfiles/msvcrt.exe
From the ActivePerl Docs:
==========================================
Windows Specifics:
What do I need to run PerlScript?
ActivePerl
an ActiveX scripting host (see above)
Perl scripts!
----------------------------------------------------------------------------
----
How do I install PerlScript?
When you launch the ActivePerl installer, PerlScript is one of the
components you can optionally install. You must install, or have previously
installed, ActivePerl to use PerlScript.
==========================================
OK, all this is cool, my Paths are set, permissions are set for my cgi-bin
directory.
Examples from the ActiveState distribution:
==========================
This doesn't work:
<HTML>
<HEAD>
<TITLE>PerlScript Hello World!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>PerlScript Hello world! (See Below)</H1>
<SCRIPT LANGUAGE="PerlScript">
$window->document->write('Hello world!');
</SCRIPT>
</BODY>
</HTML>
============================
This works:
#!C:/perl/bin/perl
use CGI ':standard';
print header;
print start_html('A Simple Example'),
h1('A Simple Example'),
start_form,
"What's your name? ",textfield('name'),
p,
"What's the combination?",
p,
checkbox_group(-name=>'words',
-values=>['eenie','meenie','minie','moe'],
-defaults=>['eenie','minie']),
p,
"What's your favorite color? ",
popup_menu(-name=>'color',
-values=>['red','green','blue','chartreuse']),
p,
submit,
end_form,
hr;
if (param()) {
print
"Your name is: ",em(param('name')),
p,
"The keywords are: ",em(join(", ",param('words'))),
p,
"Your favorite color is: ",em(param('color')),
hr;
}
print a({href=>'../cgi_docs.html'},'Go to the documentation');
print end_html;
==========================
Any help would be appreciated =)
------------------------------
Date: Tue, 17 Oct 2000 08:32:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: POV-Ray file parsing, digestion, and excretion?
Message-Id: <0g3ousghktunhn9b6ufi3gq3qf8gus40jl@4ax.com>
David Steuber wrote:
>I'm wondering if anyone has done any kind of Perl code that reads,
>processes, and generates POV-Ray code.
I've looked into POV-Ray a few years ago. For what I remember, the
desciption files were a language, pretty much like a programming
language. So it seems reasonable to me that using a prgramming language
parsing tool would be the most obvious option. Of those,
Parse::RecDescent seems to be the best established tool.
--
Bart.
------------------------------
Date: Tue, 17 Oct 2000 09:21:49 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: Regex substitution question...
Message-Id: <39EC0C1D.7D74B73B@yahoo.co.uk>
Colin Tucker wrote:
> As for common sense - if you had any, you would have replied originally with
> a post like the good Ian Boreham has, a post that is helpful and answers
> my original questions.
Godzilla is a troll. Ignore her.
------------------------------
Date: Tue, 17 Oct 2000 19:20:45 +1100
From: "Colin Tucker" <ctucker@no.omenmedia.spam.com>
Subject: Re: Regex substitution question...
Message-Id: <39ec0c32$0$11630$7f31c96c@news01.syd.optusnet.com.au>
Godzilla!,
Have you perhaps consulted a physician about your disorder? I really am
concerned that it may be getting to a dangerous level in need of medical
attention. Here I am, trying my best to program something that someone
else might just find useful, something that *I* might find useful, I have a
little problem with it, come to a public newsgroup asking for assistance,
and I receive your load of drivel.
What, do you actually believe that someone comes to a newsgroup, posts a
request for assistance with something, just in the hope of starting an
argument? Oh my dear, you are sorely in need of a checkup. I'm really
saddened that you have got to a stage where all you can offer is lame
sarcasm and brutal insults to others who are only asking for *AND OFFERING*
assistance (yes, I've read your other posts: all the same).
Besides, what you generally post is completely unhelpful, rude, and WRONG.
Take this, for instance, in your last reply:
"Do users write these command calls as you would have them,
for these examples cited? Seems to me, users write predefined
safe pseudo-variables for these circumstances, not actual
command calls which are evaluated and executed."
What a lot of ROT. Do you actually think that a programmer, say, when
creating a page using the PHP hypertext processing engine would define all
of the dynamic content of the page in a heap of variables, or
"pseudo-variables" as you call them, and then substitute them in with
variable references? Oh gee, why is there reams and reams of command
reference pages at http://www.php.net/ ? Oh, I don't know...
You seem to make out that you are an expert, that you are experienced in the
subject matter discussed here, but in fact I believe that you know very
little indeed about Perl or any other language for that matter - this is
indicated by what you have said in this reply, pure UTTER ROT. Basically,
it seems you think you can get away with using lengthy words and complicated
sentences - well FRANKly you're not fooling anyone. Why don't you just
crawl back under your rock, where it's nice and cold for you, and have a
nice life.... BTW, *sigh* see my comments below.....
--
Colin Tucker
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:39EBF030.E0EEAAA5@stomp.stomp.tokyo...
> No, you are looking to start an argument.
Whatever.
> What I suggested does precisely and perfectly
> what you ask, in the most simplistic of ways.
> My suggestion is exceptionally logical compared
> to about which you wish to argue.
>
> My suggestion is clean, simple, requires less coding
> and, quite importantly, does not require these users,
> "non-programmers" of yours, to write complex code,
> which ironically, they do not know how to do per
> your statements. Why would you have people who know
> nothing about Perl, write command calls?
NO, it does NOT do what I asked. I believe I said this:
"At the moment, I have it scanning for occurrences of square brackets with
anything between them, which it then evaluates as a function, and
substitutes the function's return value into the HTML, but the problem is
illustrated above - I want to be able to substitute "nested" commands."
Your code does nothing of the sort. All it is doing is throwing some
variables into HTML - yawn, anyone can do that. Also, I said the users
may not be PERL programmers. They will most likely be HTML coders
with some experience in generating dynamic web content.
> No, you are here to start an argument if possible.
> This is not possible with me. It is possible to
> annoy me to a point of subjecting you to barbed
> commentary.
Whatever. *yawn*
> If this notion is too deep for you, it is clear
> you should not be trying to write a program as
> you describe; you do not know enough about Perl.
> It is impossible to pump in these random variables
> of which you speak, without your script having
> predefined parameters, predefined variables and
> predefined script actions to deal with this input.
> You have no choice but to use predefined variables.
No, it's basically just you drivelling on with shite again,
and I really couldn't be bothered reading it.
> Uh huh. "They may not even be Perl programmers."
> You expect these people to write Perl command calls?
THEY ARE NOT PERL COMMAND CALLS - as I have already
stated, they are METHOD calls of an OBJECT package
that I have created. I couldn't care less if they've
never even heard of a computer - that's what
documentation is for!
> Yes there is a way to do this and, you already know
> how this is done.
NO, I know how to do NON-NESTED method invocations.
As I have already said (jeez, tired of repeating myself) I
want to do N E S T E D calls.
> Do users write these command calls as you would have them,
> for these examples cited? Seems to me, users write predefined
> safe pseudo-variables for these circumstances, not actual
> command calls which are evaluated and executed.
I believe I already rebutted this one above. Christ, I've never
heard such a load of faeces in all my life...
> You said you don't know how to do this. Now you say you
> already have working code and know how to do this. Goodness,
> reads like an inadvertent Freudian slip of a confession
> alluding to practicing deceit; a Freudian slip of your
> ego tongue. Terminal Testosterone Poisoning?
>
> This is equally senseless. First you state people who know
> nothing about Perl programming will write this 'stuff' and,
> now you say as long as they write command calls correctly,
> no problem. Common sense dictates non-programmers will be
> writing bad code consistently and constantly.
>
> Hello? Knock.. Knock.. anyone in there?
*sigh* AS I HAVE SAID, I KNOW HOW TO DO SINGULAR METHOD
INVOCATIONS, I ******DON'T KNOW HOW TO DO NESTED ONES******
As for your testosterone comment, it's obvious that you are
one very sexist female indeed - have you been hurt in the past
by men? Please - consult a doctor... for your own good...
> > As for common sense - if you had any, you would have replied
> > originally with a post like the good Ian Boreham has, a post
> > that is helpful and answers my original questions.
>
> Ahhhh, po' boy. You are breaking my wittle heart,
> truly you are, Frank.
WTF is this Frank stuff? WTF is your signature about? Just do
us all a favour and go away, please - for God's sake!!
------------------------------
Date: Tue, 17 Oct 2000 19:21:28 +1100
From: "Colin Tucker" <ctucker@no.omenmedia.spam.com>
Subject: Re: Regex substitution question...
Message-Id: <39ec0d90$0$11608$7f31c96c@news01.syd.optusnet.com.au>
Hehe - I've learnt that pretty quick! Filters set to KILL!
</Connick>
"Nick Condon" <nickco3@yahoo.co.uk> wrote in message
news:39EC0C1D.7D74B73B@yahoo.co.uk...
> Godzilla is a troll. Ignore her.
------------------------------
Date: Tue, 17 Oct 2000 09:50:33 GMT
From: jon_uk@my-deja.com
Subject: Taking credit cards though perl
Message-Id: <8sh7d9$82r$1@nnrp1.deja.com>
Hi Everyone,
My company has asked me to design a "simple" online shopping site for
them. I have done everything so far and its looking quite good. Now I
am at the stage where you ask the person for these credit card details.
We need to store the credit card details in a file for a member of
staff to read at a later date. The perl script which writes it to the
file is based on a secure server of course.
What is the best way of storing the information on the server? How
would you do it?
Thanks,
Jon
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 17 Oct 2000 09:48:06 +0200
From: Peter Prinz <peter.prinz@siemens.at>
Subject: Why doesn't PERL like Gunnar
Message-Id: <39EC0436.63A4D007@siemens.at>
Hi there!
The following script tries to match two different strings with
themselves.
The first string ("\\Johannes") matches itself, the second string
("\\Gunnar") does not!
Can anyone tell me why?
#!/usr/bin/perl
$A = "\\Johannes";
$B = "\\Gunnar";
print "$A: ", ($A =~ $A);
print "\n";
print "$B: ", ($B =~ $B);
print "\n";
If the problem is caused by the fact that '\G' is a special caracter for
regular expressions,
how can I match the string "\\Gunnar" ??
Greatings Peter
_____
Peter Prinz
Siemens AG Austria
peter.prinz@siemens.at
------------------------------
Date: Tue, 17 Oct 2000 10:03:28 +0200
From: Volker Moell <moell@ID-PRO.de>
Subject: Re: Why doesn't PERL like Gunnar
Message-Id: <39EC07D0.AAD25942@ID-PRO.de>
Peter Prinz wrote:
>
> If the problem is caused by the fact that '\G' is a special caracter
> for regular expressions,
Yes it is: If running your code under perl5.6 with "-w" you get:
/\Johannes/: Unrecognized escape \J passed through at x.pl line 6.
\Johannes: 1
\Gunnar:
> how can I match the string "\\Gunnar" ??
Puh... I pass the question. :-)
maybe you can try it with "eq"?
-volker
--
Volker Moell <moell@ID-PRO.de> (Products & Developement)
* ID-PRO Deutschland GmbH * Am Hofgarten 20 * D-53113 Bonn
* Tel. +49 (0) 2 28-4 21 54-0 * Fax -3 59
* http://open-for-the-better.com
------------------------------
Date: 17 Oct 2000 08:10:19 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Why doesn't PERL like Gunnar
Message-Id: <slrn8uo2d4.pin.bernard.el-hagin@gdndev25.lido-tech>
On Tue, 17 Oct 2000 09:48:06 +0200, Peter Prinz <peter.prinz@siemens.at> wrote:
>
>Hi there!
>
>The following script tries to match two different strings with
>themselves.
>The first string ("\\Johannes") matches itself, the second string
>("\\Gunnar") does not!
>Can anyone tell me why?
-------------------------
#!/usr/bin/perl -w
use strict;
my $A = "\\\\Johannes";
my $B = "\\\\Gunnar";
print "$A: ", ($A =~ $A);
print "\n";
print "$B: ", ($B =~ $B);
print "\n";
-------------------------
Result:
\\Johannes: 1
\\Gunnar: 1
Cheers,
Bernard
--
perl -le'
($B,$e,$r,$n,$a,$r,$d)=q=$B$e$r$n$a$r$d==~m;
\$(.);xg;print$B.$e.$r.$n.$a.$r.$d;'
------------------------------
Date: Tue, 17 Oct 2000 08:43:06 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Why doesn't PERL like Gunnar
Message-Id: <slrn8uo4mg.f7l.rgarciasuarez@rafael.kazibao.net>
Peter Prinz wrote in comp.lang.perl.misc:
>
>Hi there!
>
>The following script tries to match two different strings with
>themselves.
>The first string ("\\Johannes") matches itself, the second string
>("\\Gunnar") does not!
>Can anyone tell me why?
>
>#!/usr/bin/perl
>
>$A = "\\Johannes";
>$B = "\\Gunnar";
>
>print "$A: ", ($A =~ $A);
>print "\n";
>print "$B: ", ($B =~ $B);
>print "\n";
>
>If the problem is caused by the fact that '\G' is a special caracter for
>regular expressions,
>how can I match the string "\\Gunnar" ??
Quote it:
print "$A: ", ($A =~ quotemeta $A);
print "\n";
print "$B: ", ($B =~ quotemeta $B);
print "\n";
(See perldoc -f quotemeta)
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
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 4640
**************************************