[16621] in Perl-Users-Digest
Perl-Users Digest, Issue: 4033 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 16 11:10:41 2000
Date: Wed, 16 Aug 2000 08:10:19 -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: <966438619-v9-i4033@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 16 Aug 2000 Volume: 9 Number: 4033
Today's topics:
perl 5.6 <dwb1@home.com>
Re: perl 5.6 <gellyfish@gellyfish.com>
Re: Perl 5/Red Hat 6.1 h2ph problem <gellyfish@gellyfish.com>
Permission issues dave_fu@my-deja.com
Re: Permission issues (Anno Siegel)
Re: Permission issues <timewarp@shentel.net>
Re: Permission issues <nickco3@yahoo.co.uk>
Re: Pipe on WinNT <guenther.degenfelder@datev.de>
redirection problems <pete@alphanetcoms.co.uk>
Re: redirection problems (Rafael Garcia-Suarez)
Replacing lines in a file <lincolnmarr@europem01.nt.com>
Re: Replacing lines in a file (Rafael Garcia-Suarez)
Re: Replacing lines in a file <lincolnmarr@nospam.europem01.nt.com>
Re: Replacing lines in a file <timewarp@shentel.net>
Re: Replacing lines in a file <red_orc@my-deja.com>
Re: Replacing lines in a file (Rafael Garcia-Suarez)
Re: Replacing lines in a file <abe@ztreet.demon.nl>
Re: Someone help!!! <gellyfish@gellyfish.com>
Re: Trouble finding keys of multidimesional array <abe@ztreet.demon.nl>
Re: Trouble finding keys of multidimesional array nobull@mail.com
Re: Trouble finding keys of multidimesional array (Teodor Zlatanov)
Use NT Logins in Perl? <micheal@nospam_usa.net>
Win 98 and getting input <searchresult@btinternet.com>
Re: Win 98 and getting input ()
Xemacs Perl menu <jhijas@yahoo.es>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 16 Aug 2000 10:44:02 GMT
From: <dwb1@home.com>
Subject: perl 5.6
Message-Id: <Pine.LNX.4.20.0008160554320.9939-100000@ethyl.addictmud.org>
Hello,
I'm about to upgrade some servers from perl 5.005_03 to 5.6. I'm
wondering if there are any traps I should watch out for. We have
an aweful lot of source code written in perl, (near 200000 lines
of code), so I'm naturally concerned.
Any opinions/feedback/warnings would be greatly appreciated.
Thanks,
Dan.
------------------------------
Date: Wed, 16 Aug 2000 11:40:06 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl 5.6
Message-Id: <q4vm5.68$NE3.6646@news.dircon.co.uk>
On Wed, 16 Aug 2000 10:44:02 GMT, dwb1@home.com Wrote:
>
> Hello,
>
> I'm about to upgrade some servers from perl 5.005_03 to 5.6. I'm
> wondering if there are any traps I should watch out for. We have
> an aweful lot of source code written in perl, (near 200000 lines
> of code), so I'm naturally concerned.
>
Search the archives of this group for discussion about any Modules you
use but on the whole things should just work.
/J\
------------------------------
Date: Wed, 16 Aug 2000 14:37:13 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl 5/Red Hat 6.1 h2ph problem
Message-Id: <tGxm5.106$NE3.7448@news.dircon.co.uk>
On Tue, 15 Aug 2000 19:48:26 +0100, John Duffy Wrote:
> Hi.
>
> Firstly, apologies if this is not to the most appropriate news group. The
> problem is a Red Hat 6.1 and/or Perl 5 problem, but I don't know which.
>
> I want to use the standard library module Sys::Syslog.
>
You will have to edit the offending file to remove the bogus line which is
( I think ) caused by spme crap in the appropriate include file. A better
solution would be to upgrade to 5.6.0 where Sys::Syslog uses XS to get the
constants rather than .ph files ....
/J\
------------------------------
Date: Wed, 16 Aug 2000 09:56:25 GMT
From: dave_fu@my-deja.com
Subject: Permission issues
Message-Id: <8ndog5$8o5$1@nnrp1.deja.com>
Hi,
I am running redhat 6 and Apache: Apache runs as nobody:
My problem is that I have a file that must be 777 for a perl cgi to
write to it: When I chmod the file to 777 that is fine however as soon
as the file is wriiten to it's permissions resort to 755 even though
this is not specified in the script: The directory is 777 and the
owners/group is nobody
Anyone shed any light on why this might happen?
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Aug 2000 13:02:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Permission issues
Message-Id: <8ne3cv$jd2$1@lublin.zrz.tu-berlin.de>
<dave_fu@my-deja.com> wrote in comp.lang.perl.misc:
>Hi,
>I am running redhat 6 and Apache: Apache runs as nobody:
>
>My problem is that I have a file that must be 777 for a perl cgi to
Your file needs execute permission for user, group and world? Well,
I guess it doesn't hurt much.
>write to it: When I chmod the file to 777 that is fine however as soon
>as the file is wriiten to it's permissions resort to 755 even though
>this is not specified in the script: The directory is 777 and the
>owners/group is nobody
If nobody owns the file you don't need any permissions for world
on the file.
>Anyone shed any light on why this might happen?
Well, you aren't offering much to shine light on, not showing any
code, so all I can offer is speculation. If a file exists and is
overwritten by a program its permissions remain what they were.
Probably your cgi script plays it safe and updates a copy of the
file, which is created with default permissions. If this is later
moved over the original file, the default permissions remain.
See perldoc -f umask for how to change the default permissions, or
perldoc -f chmod for how to adjust the permissions after the fact.
Anno
------------------------------
Date: Wed, 16 Aug 2000 10:08:56 -0400
From: Albert Dewey <timewarp@shentel.net>
Subject: Re: Permission issues
Message-Id: <399AA077.DA0408E9@shentel.net>
Anno -
Not sure if this helps but if you really, really , really must have that
file chmoded (sp? . . . whatever) to 777 you can always use this line to
make that happen in your code after writing to the file in question -
chmod (0777,"myfile.txt");
I can't see why you would want to do this but there it is anyway just in
case you do have a reason.
Albert Dewey
Anno Siegel wrote:
> <dave_fu@my-deja.com> wrote in comp.lang.perl.misc:
> >Hi,
> >I am running redhat 6 and Apache: Apache runs as nobody:
> >
> >My problem is that I have a file that must be 777 for a perl cgi to
> >write to it: When I chmod the file to 777 that is fine however as soon
> >as the file is wriiten to it's permissions resort to 755 even though
> >this is not specified in the script: The directory is 777 and the
> >owners/group is nobody
> >Anyone shed any light on why this might happen?
------------------------------
Date: Wed, 16 Aug 2000 15:40:08 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: Permission issues
Message-Id: <399AA7C8.6FBD4936@yahoo.co.uk>
dave_fu@my-deja.com wrote:
> Hi,
> I am running redhat 6 and Apache: Apache runs as nobody:
>
> My problem is that I have a file that must be 777 for a perl cgi to
> write to it: When I chmod the file to 777 that is fine however as soon
> as the file is wriiten to it's permissions resort to 755 even though
> this is not specified in the script: The directory is 777 and the
> owners/group is nobody
>
> Anyone shed any light on why this might happen?
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
It's not Perl, or Apache. Have a look at your man page for 'umask'.
------------------------------
Date: Wed, 16 Aug 2000 16:45:45 +0200
From: "Guenther Degenfelder" <guenther.degenfelder@datev.de>
Subject: Re: Pipe on WinNT
Message-Id: <399aa99c$1@news.datev.de>
"Peter Gunreben" <pgunreben@lucent.com> schrieb im Newsbeitrag
news:3993E4B7.F5738FC6@lucent.com...
> Hi,
>
> I'm currently trying to port some perl scripts to
> WinNT (ActivePerl5.09). The mechanism to catch a
> pipe worked well under UNIX, but it seems that
> it doesn't work under WinNT. Does anyone know how
> to overcome this issue.
>
> Example:
>
> open(UP,"update.pl |") || die "Can't spawn update";
> while($i = <UP>) {
> print "Got $i\n";
> }
> close(UP);
>
> Behavior:
>
> The second script "update.pl" is executed just normal
> and runs without any problems. The above script waits
> until the "update.pl" exits but it doesn't receive any
> input from <UP>.
>
> Can anyone help
You should use
perl -S update.pl
and not only
update.pl
------------------------------
Date: Wed, 16 Aug 2000 14:13:22 +0100
From: "pete" <pete@alphanetcoms.co.uk>
Subject: redirection problems
Message-Id: <399a9782.0@energise.enta.net>
Hi everyone,
I'm having problems with the following script:
#!/usr/bin/perl5
#
print "Content-type: text/html\n\n";
open(MYSQL,"|/usr/local/bin/mysql -u usrname -p paswrd < go.txt");
close(MYSQL);
What it is supposed to do is to run a few insert statements, which reside in
'go.txt', through MySQL.The Insert statements are having no effect and no
error seems to be returned by the web server when I run the script.
'Go.txt' has been placed in 'usr/local/bin' and 'usr/bin', but still having
problems.
Any suggestions?
Thanks in advance, Pete
------------------------------
Date: Wed, 16 Aug 2000 13:26:40 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: redirection problems
Message-Id: <slrn8pl5v1.71o.rgarciasuarez@rafael.kazibao.net>
pete wrote in comp.lang.perl.misc:
>Hi everyone,
>
>I'm having problems with the following script:
>
> #!/usr/bin/perl5
> #
>
> print "Content-type: text/html\n\n";
>
> open(MYSQL,"|/usr/local/bin/mysql -u usrname -p paswrd < go.txt");
the | character indicates that the mysql command will be run with the
standard input redirected from the MYSQL filehandle of the perl program.
Thus, other redirections ('< go.txt') will be ignored.
You want to use:
system('/usr/local/bin/mysql -u usrname -p paswrd < go.txt');
(documentation: perldoc -f system).
[...]
>'Go.txt' has been placed in 'usr/local/bin' and 'usr/bin', but still having
>problems.
There directories are for executables, not for data files. The system()
call will spawn a shell that will look for go.txt in the current
directory ('.'), and only in this directory. Specify the full path of
go.txt in your command. You can't ensure what the current directory will
be at all times, except if you hardcode it with a chdir into your
script.
It looks like you're writing a CGI program. Don't interpolate variables
that hold external data into your command string ! This can open a huge
security hole. Use the -T switch to perl, and read the perlsec manpage.
--
Rafael Garcia-Suarez
------------------------------
Date: Wed, 16 Aug 2000 12:11:24 +0200
From: "Marr, Lincoln [HOOF:4713:EXCH]" <lincolnmarr@europem01.nt.com>
Subject: Replacing lines in a file
Message-Id: <399A68CC.D4E0B468@europem01.nt.com>
I am having a problem. I have a scalar $key which is time(). I have a
pipe delimited text file (using it as a database) and each record is
separated by a newline. The first field of each record is $key (ie a
unique index).
I want my script to look through the file, line by line (@input =
<FILE>;), then @split = split(/\|/,$_) and if $split[0] eq $key, then
remove that line. I've looked at the perlfaq5 (How do I change one line
in a file...) which didn't help me too much.
If you do have a suggestion it would be great, and I'm on perl 5.004.
Thanks a lot.
------------------------------
Date: Wed, 16 Aug 2000 11:40:01 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Replacing lines in a file
Message-Id: <slrn8pkvn3.6mv.rgarciasuarez@rafael.kazibao.net>
Marr, Lincoln [HOOF:4713:EXCH] wrote in comp.lang.perl.misc:
>I am having a problem. I have a scalar $key which is time(). I have a
>pipe delimited text file (using it as a database) and each record is
>separated by a newline. The first field of each record is $key (ie a
>unique index).
>I want my script to look through the file, line by line (@input =
><FILE>;), then @split = split(/\|/,$_) and if $split[0] eq $key, then
>remove that line. I've looked at the perlfaq5 (How do I change one line
>in a file...) which didn't help me too much.
Don't read the whole file in a big array in memory.
Here's a one-liner that will do the job:
perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
See the perlrun manpage if you don't understand the -nie switches.
--
Rafael Garcia-Suarez
------------------------------
Date: Wed, 16 Aug 2000 15:21:31 +0200
From: "Lincoln Marr" <lincolnmarr@nospam.europem01.nt.com>
Subject: Re: Replacing lines in a file
Message-Id: <8ne4fs$bid$1@qnsgh006.europe.nortel.com>
> perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
that didn't help either; am I doing something wrong? :
#!/bin/perl
$file = "file.txt";
open(FILE,"$file") || die "error opening file, $!\n";
perl -nie 'BEGIN{$key='key1'} print if /^$key|\/';
close(FILE);
I made the file (file.txt) and put in the first line
'key1|field|text|here|...' and then chmodded it to 777 (just to be safe) but
the test script says:
String operator found where operator expected at temp.cgi line 4, near "nie
'BEGIN{$key='" (Do you need to predeclare nie?)
syntax error....
Bad name after key1:: at temp.cgi line 4.
Any ideas??
Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in message
news:slrn8pkvn3.6mv.rgarciasuarez@rafael.kazibao.net...
> Marr, Lincoln [HOOF:4713:EXCH] wrote in comp.lang.perl.misc:
> >I am having a problem. I have a scalar $key which is time(). I have a
> >pipe delimited text file (using it as a database) and each record is
> >separated by a newline. The first field of each record is $key (ie a
> >unique index).
> >I want my script to look through the file, line by line (@input =
> ><FILE>;), then @split = split(/\|/,$_) and if $split[0] eq $key, then
> >remove that line. I've looked at the perlfaq5 (How do I change one line
> >in a file...) which didn't help me too much.
>
> Don't read the whole file in a big array in memory.
> Here's a one-liner that will do the job:
>
> perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
>
> See the perlrun manpage if you don't understand the -nie switches.
>
> --
> Rafael Garcia-Suarez
------------------------------
Date: Wed, 16 Aug 2000 10:01:44 -0400
From: Albert Dewey <timewarp@shentel.net>
Subject: Re: Replacing lines in a file
Message-Id: <399A9EC8.937C43AF@shentel.net>
Lincoln -
I cannot say for sure because I am not familiar with Rafael's line of code
(though I have seen other posts of his and I believe he knows more about this
Perl stuff than I do) but I do see one thing that appears obvious to me and that
is you are not opening the file so you can write to it. Leaving out the '>'
means that you are reading the file only. Try the following and see if this
works -
#!/bin/perl
$file = "file.txt";
open(FILE,">$file") or print "ERROR: 404<br>Cannot open $file because $!<br>";
perl -nie 'BEGIN{$key='key1'} print if /^$key|\/';
close(FILE);
As an aside, I have been told that using 'die' on a failure is not as good as
using a print error message as I have done above. Not sure why, but this is what
I have been led to believe so this is what I do and I have no problems with it.
Perhaps because the 'because $!' gives some sort of reason why the file could
not be opened which indeed it will if there is a problem.
Albert Dewey
Lincoln Marr wrote:
> > perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
>
> that didn't help either; am I doing something wrong? :
>
> #!/bin/perl
> $file = "file.txt";
> open(FILE,"$file") || die "error opening file, $!\n";
> perl -nie 'BEGIN{$key='key1'} print if /^$key|\/';
> close(FILE);
>
> I made the file (file.txt) and put in the first line
> 'key1|field|text|here|...' and then chmodded it to 777 (just to be safe) but
> the test script says:
>
> String operator found where operator expected at temp.cgi line 4, near "nie
> 'BEGIN{$key='" (Do you need to predeclare nie?)
> syntax error....
> Bad name after key1:: at temp.cgi line 4.
>
> Any ideas??
>
> Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in message
> news:slrn8pkvn3.6mv.rgarciasuarez@rafael.kazibao.net...
> > Marr, Lincoln [HOOF:4713:EXCH] wrote in comp.lang.perl.misc:
> > >I am having a problem. I have a scalar $key which is time(). I have a
> > >pipe delimited text file (using it as a database) and each record is
> > >separated by a newline. The first field of each record is $key (ie a
> > >unique index).
> > >I want my script to look through the file, line by line (@input =
> > ><FILE>;), then @split = split(/\|/,$_) and if $split[0] eq $key, then
> > >remove that line. I've looked at the perlfaq5 (How do I change one line
> > >in a file...) which didn't help me too much.
> >
> > Don't read the whole file in a big array in memory.
> > Here's a one-liner that will do the job:
> >
> > perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
> >
> > See the perlrun manpage if you don't understand the -nie switches.
> >
> > --
> > Rafael Garcia-Suarez
------------------------------
Date: Wed, 16 Aug 2000 14:11:47 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Replacing lines in a file
Message-Id: <8ne7eh$p6j$1@nnrp1.deja.com>
In article <8ne4fs$bid$1@qnsgh006.europe.nortel.com>,
"Lincoln Marr" <lincolnmarr@nospam.europem01.nt.com> wrote:
> > perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
>
> that didn't help either; am I doing something wrong? :
>
> #!/bin/perl
> $file = "file.txt";
> open(FILE,"$file") || die "error opening file, $!\n";
> perl -nie 'BEGIN{$key='key1'} print if /^$key|\/';
this one-liner is written to execute from the command line, not from
within a program.
you might want to look this question up in perlfaq5:
"How do I change one line in a file/delete a line in a file/insert a
line in the middle of a file/append to the beginning of a file?"
if perl is installed on your system, you can read the perlfaq locally,
otherwise, you can find it at http://www.cpan.org
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 16 Aug 2000 14:21:16 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Replacing lines in a file
Message-Id: <slrn8pl95e.73q.rgarciasuarez@rafael.kazibao.net>
Lincoln Marr wrote in comp.lang.perl.misc:
>> perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
>
>that didn't help either; am I doing something wrong? :
This is not a line of perl code, this is a shell command.
The equivalent perl script would be:
#!/usr/bin/perl -ni
BEGIN{$key='THEKEY'} print if /^$key|\/
Note the switches on the #! line.
Once again, read the perlrun manpage. On unix system, this is done by
entering 'man perlrun' at the shell prompt (if your sysadmin has
correctly configured the MANPATH. If this does not work, ask your
sysadmin.)
--
Rafael Garcia-Suarez
------------------------------
Date: Wed, 16 Aug 2000 16:51:18 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Replacing lines in a file
Message-Id: <d49lpsg9nibuaqon2foeme024dm130me24@4ax.com>
[ Please do not quote all previous messages at the bottom of your post ]
On Wed, 16 Aug 2000 15:21:31 +0200, "Lincoln Marr"
<lincolnmarr@nospam.europem01.nt.com> wrote:
> > perl -nie 'BEGIN{$key='THEKEY'} print if /^$key|\/';
>
> that didn't help either; am I doing something wrong? :
>
> #!/bin/perl
> $file = "file.txt";
> open(FILE,"$file") || die "error opening file, $!\n";
> perl -nie 'BEGIN{$key='key1'} print if /^$key|\/';
^^^^^^^^^
You have clearly misunderstood the term 'one-liner'.
This means you can run the whole thing in one 'line' from the command
line using clever command-line switches to make perl do all sorts of
things.
Have a look at the perlrun manpage to see what '-e', '-n', '-i' means.
BTW. That one-liner doesn't do what you wanted.
> >> I've looked at the perlfaq5 (How do I change one line
> >>in a file...) which didn't help me too much.
What didn't you like in that answer?
--
Good luck,
Abe
------------------------------
Date: Wed, 16 Aug 2000 15:00:33 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Someone help!!!
Message-Id: <l0ym5.111$NE3.7448@news.dircon.co.uk>
On Mon, 14 Aug 2000 13:16:31 -0700, Kevin Ostrowski Wrote:
>> You seem to have wandered into the wrong group...
> How so... this is a perl group isn't it, a misc perl group at that. And my
> topic is about perl scripts.
>
Wrong.
*plonk*
/J\
------------------------------
Date: Wed, 16 Aug 2000 13:43:02 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Trouble finding keys of multidimesional array
Message-Id: <leukps0kqopvlv8m8t2os84ssc8aadkes5@4ax.com>
On Wed, 16 Aug 2000 11:47:03 +0200, Ulrich Ackermann
<uackermann@orga.com> wrote:
> danny@lennon.postino.com wrote:
> >
> > User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i586))
> >
> > I have a hash $Comments{key1}{key2} and am trying to fing the values of
> > the second keys. I tried:
> >
> > foreach $key ( keys %Comments ) {
> > print "$key : ", $Comments{$key} ,"\n" ;
> > foreach $key2 ( keys %Comments{$key} ) {
> You cannot store hashes as a hash value. Maybe you got a hash reference
> as a value of the first key. So maybe your code might work with the
> above line changed to
>
> foreach $key2 ( keys %$Comments{$key} ) {
> ^^^
>
> As I mentioned before, I am not quite sure if this solves your problem,
> because I am no Perl guru ;-)
Then it's always good to test your answer before posting.
Your solution gives a syntax error.
You must make it clear to perl that the hash reference ricides in
$Comments{$key} by putting curlies around it.
foreach my $key2 ( keys %{ $Comments{$key} } ) {
See section "CAVEAT ON PRECEDENCE" in perldsc
--
Good luck,
Abe
------------------------------
Date: 16 Aug 2000 12:58:07 +0100
From: nobull@mail.com
Subject: Re: Trouble finding keys of multidimesional array
Message-Id: <u9em3po1tc.fsf@wcl-l.bham.ac.uk>
<danny@lennon.postino.com> writes:
> foreach $key2 ( keys %Comments{$key} ) {
The problem is that you are forgetting that there are no
multidimesional arrays in Perl.
There are arrays of references to arrays that simulate multidimesional
arrays (or in this case hashes of references to hashes that simulate
multidimesional hashes).
Sometimes you are permitted to ignore this fact like when you say
$Comments{key1}{key2} rather than $Comments{key1}->{key2} or
${$Comments{key1}}{key2}.
However sometimes you must not ignore it and must explicitly
dereference:
foreach $key2 ( keys %{$Comments{$key}} ) {
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 16 Aug 2000 09:08:21 -0500
From: tzz@iglou.com (Teodor Zlatanov)
Subject: Re: Trouble finding keys of multidimesional array
Message-Id: <399a9245$1_1@news.iglou.com>
<u9em3po1tc.fsf@wcl-l.bham.ac.uk>:nobull@mail.com:comp.lang.perl.misc:16 Aug 2000 12:58:07 +0100:quote:
: <danny@lennon.postino.com> writes:
:
: The problem is that you are forgetting that there are no
: multidimesional arrays in Perl.
:
: There are arrays of references to arrays that simulate multidimesional
: arrays (or in this case hashes of references to hashes that simulate
: multidimesional hashes).
Not strictly true. There is pretty good emulation for multidimensional
arrays without references that might be enough for simple cases:
$foo{$a,$b,$c}
(see $; in perlvar, for instance)
--
Teodor Zlatanov <tzz@iglou.com>
"Brevis oratio penetrat colos, longa potatio evacuat ciphos." -Rabelais
------------------------------
Date: Wed, 16 Aug 2000 14:09:31 GMT
From: "Micheal" <micheal@nospam_usa.net>
Subject: Use NT Logins in Perl?
Message-Id: <vgxm5.25$I5.2370@news20.bellglobal.com>
Hi there,
Is there any way that I can use the network logins for authentification
using Perl? I'm on an NT network and I do this in ASP via IIS. I just
don't want to create and maintain another DB of username/passwords for
everyone, I don't think the users would appreciate it either, it's hard
enough for them to remember their main logins already...
<Sigh>
PS: It's for a web app.
------------------------------
Date: Wed, 16 Aug 2000 14:51:56 +0100
From: "searchResult" <searchresult@btinternet.com>
Subject: Win 98 and getting input
Message-Id: <8ne6aa$6un$1@neptunium.btinternet.com>
Hi all, I've installed perl on win 98 and well I've bought the books and I
can't even get past the first bit of code.
The code is :
#! /usr/bin/perl -w
print "Whats Your Name ?";
$name = <STDIN>;
chomp (&name);
print ("Hello, &name!\n");
I've opened up a dos prompt and entered:
C:\Perl\bin>perl C:\test.pl
And this is what i got:
Whats Your Name ?
I entered Mic and got:
Can't modify non-lvalue subroutine call at C:\test.pl line 4, <STDIN> line
1.
Any Ideas ?
------------------------------
Date: Wed, 16 Aug 2000 14:42:56 GMT
From: sjs@yorku.ca ()
Subject: Re: Win 98 and getting input
Message-Id: <slrn8pla2r.ql.sjs@john.sympatico.ca>
searchResult <searchresult@btinternet.com> wrote:
>Hi all, I've installed perl on win 98 and well I've bought the books and I
>can't even get past the first bit of code.
>
>The code is :
>#! /usr/bin/perl -w
>print "Whats Your Name ?";
>$name = <STDIN>;
>chomp (&name);
^
>print ("Hello, &name!\n");
^
You might mean $name.
------------------------------
Date: Wed, 16 Aug 2000 14:08:22 +0200
From: Javier Hijas <jhijas@yahoo.es>
Subject: Xemacs Perl menu
Message-Id: <399A8436.F6B7738A@yahoo.es>
How can I switch on all the Perl tools I find there?, some of them as
"run", "syntax"... are always off.
------------------------------
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 4033
**************************************