[19929] in Perl-Users-Digest
Perl-Users Digest, Issue: 2124 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 13 14:10:44 2001
Date: Tue, 13 Nov 2001 11:10:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1005678619-v10-i2124@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 13 Nov 2001 Volume: 10 Number: 2124
Today's topics:
pid and system (Bill Ketzeback)
Re: pid and system <rereidy@indra.com>
pretty-print perl code? (Mike Eggleston)
Re: pretty-print perl code? <mmanso@yahoo.com>
Problem printing numbers <blake.brezeale@usa.alcatel.com>
Re: Problem printing numbers (John J. Trammell)
Re: Random element from array? (Wiliam Stephens)
Reading from a hash list <robert_loui@yahoo.com>
Re: Reading from a hash list <bernard.el-hagin@lido-tech.net>
Re: Reading from a hash list <robert_loui@yahoo.com>
Re: Reading from a hash list <Tassilo.Parseval@post.rwth-aachen.de>
Re: Reserve memory for array? <pne-news-20011113@newton.digitalspace.net>
Re: Reserve memory for array? <Tassilo.Parseval@post.rwth-aachen.de>
Re: SOAP::Lite - print SOM object as string? news@roaima.freeserve.co.uk
Sourcing with a twist of Parsing ? slightlysprintingdog@ntlworld.com
Re: String Length <bernard.el-hagin@lido-tech.net>
Re: String Length <pne-news-20011113@newton.digitalspace.net>
system(), PERL5SHELL won't work <kestrel@mit.edu>
system(), PERL5SHELL won't work <kestrel@mit.edu>
Re: Unencoding (Anno Siegel)
Re: Unencoding <ffoeg@geoffball.net>
Re: Unencoding <Tassilo.Parseval@post.rwth-aachen.de>
Re: Unencoding <ffoeg@geoffball.net>
Re: Unencoding <echang@netstorm.net>
Re: Unencoding <Tassilo.Parseval@post.rwth-aachen.de>
Re: UNIX answer to obl <djberge@qwest.com>
Re: web page editing with browser (Chas Friedman)
Re: web page editing with browser zentara@highstream.net
Re: Why Perl For Database Handling? <darkon@one.net>
Re: Why Perl For Database Handling? <bart.lateur@skynet.be>
Re: Why Perl For Database Handling? <bart.lateur@skynet.be>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 13 Nov 2001 08:43:01 -0800
From: bketzeback@hotmail.com (Bill Ketzeback)
Subject: pid and system
Message-Id: <cab93421.0111130843.71c704d9@posting.google.com>
How do I determine the pid of a process started by a system call? I
would like to block a later part of my code until that process exits/
dies...
example:
$cmd = "./my_C_program";
system("$cmd");
:
:
:
waitpid(PID,0);
:
:
but how do I determine PID?
------------------------------
Date: Tue, 13 Nov 2001 10:04:08 -0700
From: Ron Reidy <rereidy@indra.com>
Subject: Re: pid and system
Message-Id: <3BF15288.C1721763@indra.com>
Bill Ketzeback wrote:
>
> How do I determine the pid of a process started by a system call? I
> would like to block a later part of my code until that process exits/
> dies...
>
> example:
>
> $cmd = "./my_C_program";
> system("$cmd");
> :
> :
> :
> waitpid(PID,0);
> :
> :
>
> but how do I determine PID?
The system() call waits for execution to complete - see perldoc -f
system.
--
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
------------------------------
Date: Tue, 13 Nov 2001 17:01:59 GMT
From: mikee@kensho.eggtech.com (Mike Eggleston)
Subject: pretty-print perl code?
Message-Id: <slrn9v2kg8.bqg.mikee@kensho.eggtech.com>
Is there a way, outside of emacs, to pretty-print perl code?
Mike
------------------------------
Date: Tue, 13 Nov 2001 17:22:28 +0000
From: "Miguel Manso" <mmanso@yahoo.com>
Subject: Re: pretty-print perl code?
Message-Id: <pan.2001.11.13.17.22.28.679.32293@yahoo.com>
perltidy is your friend
In article <slrn9v2kg8.bqg.mikee@kensho.eggtech.com>, "Mike Eggleston"
<mikee@kensho.eggtech.com> wrote:
> Is there a way, outside of emacs, to pretty-print perl code?
>
> Mike
--
Miguel Manso - <mmanso@prodigio.com>
Departamento Técnico
Prodigio - Produções Digitais Online, S.A.
Tel: +351 22 0106000 - Fax: +351 22 0106001
------------------------------
Date: Tue, 13 Nov 2001 09:55:21 -0600
From: "Blake Brezeale" <blake.brezeale@usa.alcatel.com>
Subject: Problem printing numbers
Message-Id: <3bf1409e@news.alcatel.com>
I am currently running Mandrake 8.1 with the default shell (Bash) and I
cannot get Perl scripts to print numbers to the terminal. For example if I
have the following code:
#!/usr/bin/perl
use warnings;
use strict;
print 5;
I would expect the output to be 5(prompt) but instead I get nothing. The
only way that I can get the Perl script to print a number to the screen is
to append a newline character to the output. For example if I change the
above code to print 5,"\n"; 5 will be outputted to the screen.
If I change my shell to Bourne or Korn, I get the correct output. If I
change my prompt in the Bash shell to include a newline character I get the
correct output. If I try to print a string I get the correct output. I
read in the Perl documentation that output is buffered but that by default
output to a terminal is in line buffered mode so I shouldn't have to turn
buffering off using $| = 1;
Can anyone tell me what is happening and how to fix the problem without
changing my shell. Any information would be appreciated.
Blake,
------------------------------
Date: Tue, 13 Nov 2001 10:10:27 -0600
From: trammell@haqq.hypersloth.invalid (John J. Trammell)
Subject: Re: Problem printing numbers
Message-Id: <slrn9v2hic.8lr.trammell@haqq.el-swifto.com>
On Tue, 13 Nov 2001 09:55:21 -0600, Blake Brezeale wrote:
> I am currently running Mandrake 8.1 with the default shell (Bash) and I
> cannot get Perl scripts to print numbers to the terminal. For example if I
> have the following code:
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> print 5;
>
> I would expect the output to be 5(prompt) but instead I get nothing. The
> only way that I can get the Perl script to print a number to the screen is
> to append a newline character to the output. For example if I change the
> above code to print 5,"\n"; 5 will be outputted to the screen.
What happens when you capture the output into a file?
% perl myscript.pl > foo.txt
My guess is the output is there, but your prompt is clobbering it
somehow.
------------------------------
Date: 13 Nov 2001 08:39:23 -0800
From: wil@fbagroup.co.uk (Wiliam Stephens)
Subject: Re: Random element from array?
Message-Id: <39e3e00a.0111130839.6a5677d1@posting.google.com>
Bart
> How do you run it in telnet? Do you use
>
> perl index.cgi
>
> or
>
> ./index.cgi
>
> ?
>
> Because maybe, just maybe, your shebang line is pointing to the wrong
> perl binary, maybe even perl4.
Thanks for your suggestions. In the end I managed to trace the error
to a human error by myself. The first line of my code read:
#/usr/local/bin/perl -w
instead of:
#!/usr/local/bin/perl
I missed out on the !. Took me days to work that one out! <g>.
Cheers
Wil
------------------------------
Date: Tue, 13 Nov 2001 15:35:06 +0100
From: "Robert" <robert_loui@yahoo.com>
Subject: Reading from a hash list
Message-Id: <9sr9qm$gej$1@newstoo.ericsson.se>
Hi
I have som beginner qustions. I dont know how can i read the data from these
two different variables.
my $inputvar = {
"Linda" =>"4412456678",
"Michel" =>"4233456678",
"Sharon" =>"6633456678",
};
my %hashlist =(
"Andre" =>{
"Address" =>"The äddress her",
"Phone" =>"33312143",
},
"Peter" =>{
"Address" =>"The äddress her",
"Phone" =>"33312143",
},
);
Thanks Robert
------------------------------
Date: 13 Nov 2001 14:54:58 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: Reading from a hash list
Message-Id: <slrn9v2g34.3il.bernard.el-hagin@gdndev25.lido-tech>
On Tue, 13 Nov 2001 15:35:06 +0100, Robert <robert_loui@yahoo.com> wrote:
> Hi
>
> I have som beginner qustions. I dont know how can i read the data from these
> two different variables.
>
> my $inputvar = {
> "Linda" =>"4412456678",
> "Michel" =>"4233456678",
> "Sharon" =>"6633456678",
> };
This creates a reference to a hash and places it in $inputvar.
To get information out of this reference you need to dereference it.
For example, to get Linda's number try:
print $inputvar->{Linda};
Read about references in perldoc perlreftut.
> my %hashlist =(
>
> "Andre" =>{
> "Address" =>"The äddress her",
> "Phone" =>"33312143",
> },
>
> "Peter" =>{
> "Address" =>"The äddress her",
> "Phone" =>"33312143",
> },
> );
This is a hash of hashes. Each key's value is a reference to a
hash. So to get at Andre's address you need to dereference
the key Andre:
print $hashlist{Andre}->{Address};
Again, you really need to read perldoc perlreftut.
Cheers,
Bernard
------------------------------
Date: Tue, 13 Nov 2001 16:01:39 +0100
From: "Robert" <robert_loui@yahoo.com>
Subject: Re: Reading from a hash list
Message-Id: <9srbce$k5h$1@newstoo.ericsson.se>
Thanks for your replay,
how could i read the data if i use a for loop or foreach or while loop.
------------------------------
Date: Tue, 13 Nov 2001 16:31:22 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Reading from a hash list
Message-Id: <9sreca$9ha$04$1@news.t-online.com>
On Tue, 13 Nov 2001 16:01:39 +0100, Robert wrote:
> Thanks for your replay,
> how could i read the data if i use a for loop or foreach or while loop.
Assuming $hash_ref is the reference to a hash of hashes:
1 for my $key (keys %{$hash_ref}) { # or just %$hash_ref
2 print "$key: \n";
3 for (keys %{$hash_ref->{$key}}) {
4 print "\t", $hash_ref->{$key}{$_}, "\n";
5 }
6 }
In line 3 you can't shortcut this to %$hash_ref->{$key} since Perl would
mess up the precedence.
Alternatively in live 4: '$hash_ref->{$key}->{$_}'
Tassilo
--
Accordion, n.:
A bagpipe with pleats.
------------------------------
Date: Tue, 13 Nov 2001 18:42:28 +0100
From: Philip Newton <pne-news-20011113@newton.digitalspace.net>
Subject: Re: Reserve memory for array?
Message-Id: <blk2vtgmo5ikb5n3mje99rli5hvgjcurlq@4ax.com>
On Mon, 12 Nov 2001 20:50:54 +0100, "Tassilo v. Parseval"
<Tassilo.Parseval@post.rwth-aachen.de> wrote:
> I don't exactly know how Perl organizes the data stored in an array
> or a hash. I suppose it uses several layers of pointers pointing to
> the respective SV.
Google for "perlguts illustrated" if you're interested.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 13 Nov 2001 19:46:33 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Reserve memory for array?
Message-Id: <9srpq9$nj9$02$2@news.t-online.com>
On Tue, 13 Nov 2001 18:42:28 +0100, Philip Newton wrote:
> On Mon, 12 Nov 2001 20:50:54 +0100, "Tassilo v. Parseval"
><Tassilo.Parseval@post.rwth-aachen.de> wrote:
>
>> I don't exactly know how Perl organizes the data stored in an array
>> or a hash. I suppose it uses several layers of pointers pointing to
>> the respective SV.
>
> Google for "perlguts illustrated" if you're interested.
Ah, by Gisle Aas. The whole time I vaguely remembered having once read
this very article. Just that I could no longer remember its title and
author (I suspected Simon Cozens). Thanks for this memory-refreshment so
that I can finally add it to my Perl-bookmarks.
Tassilo
--
The typewriting machine, when played with expression, is no more
annoying than the piano when played by a sister or near relation.
-- Oscar Wilde
------------------------------
Date: 13 Nov 2001 14:25:11 GMT
From: news@roaima.freeserve.co.uk
Subject: Re: SOAP::Lite - print SOM object as string?
Message-Id: <3bf12d47@news.netserv.net>
rlyacht <robt@aya.yale.edu> wrote:
> If $s is the result of a SOAP call (using SOAP::Lite), how can I
> obtain a string representation of $s? I'm sure that there's some sort
> of asString method somwhere so that I can just say
> $xml = $s->asString();
> but I can't find it. Thanks.
It's "result", as shown on the very first page of the documentation:
use SOAP::Lite;
print SOAP::Lite
-> uri('http://www.soaplite.com/Temperatures')
-> proxy('http://services.soaplite.com/temper.cgi')
-> f2c(32)
-> result;
Chris
------------------------------
Date: Tue, 13 Nov 2001 14:17:11 +0000
From: slightlysprintingdog@ntlworld.com
Subject: Sourcing with a twist of Parsing ?
Message-Id: <3BF12B67.33DDA9BC@ntlworld.com>
I've got some files (cov_sourceme and prot_sourceme) that need sourcing
before a program is called.
When sourced each one makes the program behave differently and I'd like
to be able to switch "modes" with a Perl script.
I've tried :
| system ($source_cov, $run_sim);
where $source_cov contains the string to source cov_sourceme and
$run_sim contains the string to execute the program - in this case a
simulator i.e. :
| $source_cov = "source /path/cov_sourceme";
|
| $run_sim = "<long line of swtiches>";
The file cov_sourceme contains a load of 'setenv' and 'set' commands.
I get errors because cov_sourceme also sources some files itself when
run. In bash this would be okay but the system command doesn't like it.
Now, I've written environmental variable parsers before that pick out
the 'setenv' and 'set' commands and make use of %ENV in perl.
I wondered whether I'd be better to write a somewhat more complicated
version which searches out 'source' commands, locates the files they
source and applies the environment parsing on them until everything is
parsed. This could be quite complicated looking a little deeper into
the files.
I was wondering what you guys/girls thought of this, is there another
way ?
Any advice / help would be much appreciated.
Andy - Computers are like air conditioners,
- They stop working when you open Windows.
------------------------------
Date: 13 Nov 2001 14:08:13 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: String Length
Message-Id: <slrn9v2dbg.3il.bernard.el-hagin@gdndev25.lido-tech>
On Tue, 13 Nov 2001 08:58:37 -0500, Joseph Kezar <jkezar@doc.state.vt.us>
wrote:
> Sorry for the begginer question:
> How do I determine the length(number of charecters) of a given string.
> I am coming from a Java background int x = StringName.length();
The ludicrously named 'length' function should do the trick.
Cheers,
Bernard
------------------------------
Date: Tue, 13 Nov 2001 18:42:29 +0100
From: Philip Newton <pne-news-20011113@newton.digitalspace.net>
Subject: Re: String Length
Message-Id: <upk2vtchjsvb588eaj4be6pj323l40evtq@4ax.com>
On 13 Nov 2001 14:08:13 GMT, Bernard El-Hagin
<bernard.el-hagin@lido-tech.net> wrote:
> On Tue, 13 Nov 2001 08:58:37 -0500, Joseph Kezar <jkezar@doc.state.vt.us>
> wrote:
> > Sorry for the begginer question:
> > How do I determine the length(number of charecters) of a given string.
> > I am coming from a Java background int x = StringName.length();
>
> The ludicrously named 'length' function should do the trick.
And `perldoc perlfunc` will tell you all about Perl's built-in
functions. At the beginning, there is an index organised by topic, and
then a description of each function in (nearly[1]) ASCIIbetical order.
Cheers,
Philip
[1] The exceptions that come to mind are the get/set/end* family of
functions
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 13 Nov 2001 12:12:00 -0500
From: "J" <kestrel@mit.edu>
Subject: system(), PERL5SHELL won't work
Message-Id: <3bf15460$0$3950$b45e6eb0@senator-bedfellow.mit.edu>
Greetings,
I cannot get the system() function to work. I always get an error message
like: "Can't spawn cmd.exe: No such file or directory at [current perl
script folder]." I'm running ActivePerl v5.6.1 build 628 on Windows 2000.
(Note: scripts without system() or backticks run smoothly -- even those with
exec() commands -- but now I have a need to use system calls.)
Days of searching and experimentation have yielded little. The problem
appears to be that Perl can't find the command shell (cmd.exe), even though
it's sitting in the default location c:\WINNT\system32 (which *is* in my
PATH).
My last hope was ENV{PERL5SHELL}, which the perlwin32 and perlrun manpages
say can be used to control the shell that perl uses to run system() and
backtick commands. However, I set that to
C:\\WINNT\\system32\\cmd.exe\ /x/c
(and verified it interpolates to "C:\WINNT\system32\cmd /x/c")
and it still didn't work. Then I found that the perlport manpage goes on to
say that "As an optimization, system(LIST) may not call the command shell
specified in $ENV{PERL5SHELL}." Can this "optimization" be disabled or
circumvented?
Any ideas? I don't know why this problem arose (maybe an installation
problem I didn't notice till I tried system() calls), and even if I can get
ENV{PERL5SHELL} recognized, I have no idea if it will fix this.
Thanks,
-- J
------------------------------
Date: Tue, 13 Nov 2001 13:13:20 -0500
From: "J" <kestrel@mit.edu>
Subject: system(), PERL5SHELL won't work
Message-Id: <3bf162c1$0$3927$b45e6eb0@senator-bedfellow.mit.edu>
Greetings,
I cannot get the system() function to work. I always get an error message
like: "Can't spawn cmd.exe: No such file or directory at [current perl
script folder]." I'm running ActivePerl v5.6.1 build 628 on Windows 2000.
(Note: scripts without system() or backticks run smoothly -- even those with
exec() commands -- but now I have a need to use system calls.)
Days of searching and experimentation have yielded little. The problem
appears to be that Perl can't find the command shell (cmd.exe), even though
it's sitting in the default location c:\WINNT\system32 (which *is* in my
PATH).
My last hope was ENV{PERL5SHELL}, which the perlwin32 and perlrun manpages
say can be used to control the shell that perl uses to run system() and
backtick commands. However, I set that to
C:\\WINNT\\system32\\cmd.exe\ /x/c
(and verified it interpolates to "C:\WINNT\system32\cmd /x/c")
and it still didn't work. Then I found that the perlport manpage goes on to
say that "As an optimization, system(LIST) may not call the command shell
specified in $ENV{PERL5SHELL}." Can this "optimization" be disabled or
circumvented?
Any ideas? I don't know why this problem arose (maybe an installation
problem I didn't notice till I tried system() calls), and even if I can get
ENV{PERL5SHELL} recognized, I have no idea if it will fix this.
Thanks,
-- J
------------------------------
Date: 13 Nov 2001 14:38:51 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Unencoding
Message-Id: <9srb9r$5lo$2@mamenchi.zrz.TU-Berlin.DE>
According to Geoff <geoff@REMOVETHISgeoffball.net>:
> "Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
> > He won't understand.
>
> Well, we're beyond statements like "real mature," but that's quite a
> libelous statement. You have no idea whatsoever how much I know or don't
> know, so I don't see how you can make that claim.
We've seen you perform.
Anno
------------------------------
Date: Tue, 13 Nov 2001 14:52:52 GMT
From: "Geoff" <ffoeg@geoffball.net>
Subject: Re: Unencoding
Message-Id: <8taI7.50001$i4.8025967@news0.telusplanet.net>
"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:9srb9r$5lo$2@mamenchi.zrz.TU-Berlin.DE...
> > > He won't understand.
> >
> > Well, we're beyond statements like "real mature," but that's quite a
> > libelous statement. You have no idea whatsoever how much I know or
don't
> > know, so I don't see how you can make that claim.
>
> We've seen you perform.
>
> Anno
For example?
------------------------------
Date: Tue, 13 Nov 2001 16:21:26 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Unencoding
Message-Id: <9srdpm$ioo$01$1@news.t-online.com>
On Tue, 13 Nov 2001 14:52:52 GMT, Geoff wrote:
> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> news:9srb9r$5lo$2@mamenchi.zrz.TU-Berlin.DE...
>> We've seen you perform.
>>
>> Anno
>
> For example?
For example this very thread. Just because you misunderstood a few of
those things that people gave you as answer you became offending after a
while. This time it hit Martien.
Perhaps you visit amazon and do a search for 'Martien Verbruggen' and
you'll see by whom you had actually been killfiled and consider the
probability that the author of a Perl book can be so totally wrong that
you insist on your opinion.
Tassilo
--
There's so much plastic in this culture that vinyl leopard skin is
becoming an endangered synthetic.
-- Lily Tomlin
------------------------------
Date: Tue, 13 Nov 2001 15:46:06 GMT
From: "Geoff" <ffoeg@geoffball.net>
Subject: Re: Unencoding
Message-Id: <2fbI7.50123$i4.8044357@news0.telusplanet.net>
"Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de> wrote in
message news:9srdpm$ioo$01$1@news.t-online.com...
> On Tue, 13 Nov 2001 14:52:52 GMT, Geoff wrote:
> > "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> > news:9srb9r$5lo$2@mamenchi.zrz.TU-Berlin.DE...
>
> For example this very thread. Just because you misunderstood a few of
> those things that people gave you as answer you became offending after a
> while. This time it hit Martien.
I didn't misunderstand them. I comprehended what was said.
I have to point out that he was offensive toward me too.
> Perhaps you visit amazon and do a search for 'Martien Verbruggen' and
> you'll see by whom you had actually been killfiled
Are you saying that because he's an author, it makes him better than anyone?
I respect his skills as a writer, but that doesn't set him at a higher
standard as far as what has gone on here.
> and consider the probability that the author of a Perl book can be so
totally wrong that
> you insist on your opinion.
Nowhere in my posts did I claim he was wrong about anything.
> Tassilo
I don't respect a lot of what I said, but I don't respect a lot of what he
said, either.
I apologize to everyone who had to read my posts, especially Martien. It
was uncalled for, and can understand the fact that it is probably too late
for apologies. I hope you are able to look at this from my perspective;
maybe you'll see where I was coming from.
Geoff
------------------------------
Date: Tue, 13 Nov 2001 16:36:26 GMT
From: "E.Chang" <echang@netstorm.net>
Subject: Re: Unencoding
Message-Id: <Xns9158771ADC580echangnetstormnet@207.106.92.86>
"Geoff" <ffoeg@geoffball.net> wrote in
news:8taI7.50001$i4.8025967@news0.telusplanet.net:
> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> news:9srb9r$5lo$2@mamenchi.zrz.TU-Berlin.DE...
>> > > He won't understand.
>> >
>> > Well, we're beyond statements like "real mature," but that's
>> > quite a libelous statement. You have no idea whatsoever how
>> > much I know or don't know, so I don't see how you can make that
>> > claim.
>>
>> We've seen you perform.
>>
>> Anno
>
> For example?
One example:
On alt.perl you made the totally incorrect assertion "You are trying to
add all of WOUT to an entire array, which you can't do (you can't add
anything to an array as a whole). You must add each line of WOUT to
each compartment of an array ($lines[0], $lines[1], etc...)." And when
one writer (who has shown himself many, many times to be very
knowledgeable about Perl) pointed you to the documentation, you advised
him to read _Programming Perl_, implying that he had not done so. You
ought to read it more thoroughly yourself, especially the discussion of
context (beginning on page 69) and the discussion of the angle operator
(beginning on page 80) which includes the example
$one_line = <MYFILE>; # Get first line.
@all_lines = <MYFILE>; # Get the rest of the lines.
This is not intended to be a slam, just a reply to your question and a
lead-in to some friendly advice. Many of the regulars on this
newsgroup know far more about Perl than you or I can ever hope to
learn. Lurk a while, and browse throgh a few weeks of back articles,
to find out who they are (you tangled with a couple in this thread);
then read their articles in a spirit of discovering and learning.
Incidentally, I find that the most interesting and informative threads
are those that pick up on some point in a question or response and
delve more deeply into it, as this one did on the EBCDIC topic.
--
EBC
------------------------------
Date: Tue, 13 Nov 2001 19:46:34 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Unencoding
Message-Id: <9srpqa$nj9$02$3@news.t-online.com>
On Tue, 13 Nov 2001 15:46:06 GMT, Geoff wrote:
> I apologize to everyone who had to read my posts, especially Martien. It
> was uncalled for, and can understand the fact that it is probably too late
> for apologies. I hope you are able to look at this from my perspective;
> maybe you'll see where I was coming from.
Perhaps Martien sees my follow-up with the above quoted text and unplonks
you. :-)
Anyway, you now know that the tone in this newsgroup can sometimes be a
little harsh, yet it is the best source of Perl-knowledge you can get
besides the perldocs and those legendary books by Larry Wall, Randal L.
Schwartz and some others. So be sure to always be a good boy towards
those competent people in this group. ;-)
Ok, EOT from me.
Tassilo
--
Any sufficiently advanced technology is indistinguishable from a rigged demo.
- Andy Finkel, computer guy
------------------------------
Date: Tue, 13 Nov 2001 11:46:59 -0600
From: "Mr. Sunblade" <djberge@qwest.com>
Subject: Re: UNIX answer to obl
Message-Id: <tYcI7.253$xn1.81484@news.uswest.net>
"peter" <peter_icaza@REMOVE2REPLYuhc.com> wrote in message
news:3BF11DF5.187CB70A@REMOVE2REPLYuhc.com...
> http://www.thinkgeek.com/stuff/apparel/57b2.shtml
> i rather liked this one and in no way am i associated with this website
> or company.
> peter
Oh, that's sweet! A bunch of us are going to make that our "Friday" shirt.
:)
Regards,
Mr. Sunblade
------------------------------
Date: Tue, 13 Nov 2001 14:23:19 GMT
From: friedman@math.utexas.edu (Chas Friedman)
Subject: Re: web page editing with browser
Message-Id: <3bf12c74.55845908@news.itouch.net>
On 12 Nov 2001 20:34:53 -0800, ip@dot-solutions.net (Ifan Payne)
wrote:
>Could anyone suggest a free PERL script that enables editing of web
>pages via a browser? I am looking for a way for users to edit/add
>information to their web pages with thier browsers.
There is an example of such a script in the book "Instant Perl
Modules", Sparling and Wiles, Osborne.
(Online HTML Editor, Ch 13.)
chas friedman
------------------------------
Date: Tue, 13 Nov 2001 10:08:05 -0500
From: zentara@highstream.net
Subject: Re: web page editing with browser
Message-Id: <qod2vtg4cjrplbah9h5fggojq14sij78je@4ax.com>
On 12 Nov 2001 20:34:53 -0800, ip@dot-solutions.net (Ifan Payne)
wrote:
>Could anyone suggest a free PERL script that enables editing of web
>pages via a browser? I am looking for a way for users to edit/add
>information to their web pages with thier browsers.
There is a perl script called "ispy.cgi" which allows you
to run shell commands and edit text files thru your
browser. It is password protected, but there is no
guarantee it's secure.
It runs nice.
http://www.nisoftware.com/ispy.cgi/
------------------------------
Date: Tue, 13 Nov 2001 15:51:31 -0000
From: David Wall <darkon@one.net>
Subject: Re: Why Perl For Database Handling?
Message-Id: <Xns91586E44AE208darkononenet@207.126.101.97>
Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote on 13 Nov 2001:
> On Tue, 13 Nov 2001 05:14:15 -0500, Ann Thompson
> <annthompson2000USA@yahoo.com> wrote:
>> I'm a SQL person, but my boss wants me to do this in Perl. I'm
>> thinking of resigning.
[snip]
>>
>> I'm spending a lot of time figuring this out at www.perl.com, but
>> can't find any helpful topic on this.
>
> There are modules that will help you with this. Check out:
>
>
> http://search.cpan.org/
also http://dbi.perl.org/
I found the book _Programming the Perl DBI_ to be helpful, although it's
not essential. (But it's mentioned prominently in the URL above)
--
David Wall
darkon@one.net
------------------------------
Date: Tue, 13 Nov 2001 16:43:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Why Perl For Database Handling?
Message-Id: <6aj2vtghfmlql8so7eikf7njhh8c7o4mer@4ax.com>
Ann Thompson wrote:
>In SQL, I do:
...
Then why not keep using SQL, through DBI.
>I'm spending a lot of time figuring this out at www.perl.com, but can't find
>any helpful topic on this.
Well, start with the DBI homepage: <http://dbi.symbolstone.org>. And let
your boss pay for the O'Reilly book "programming the Perl DBI".
--
Bart.
------------------------------
Date: Tue, 13 Nov 2001 16:44:49 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Why Perl For Database Handling?
Message-Id: <6gj2vtoa7a1fslr6ip45tunvfsi46t3fhn@4ax.com>
Logan Shaw wrote:
>Fear not, Perl will not force you to use something weird. It uses SQL
>just like everybody else
But SQL *is* weird!
:-)
--
Bart.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 2124
***************************************