[13776] in Perl-Users-Digest
Perl-Users Digest, Issue: 1186 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 22:17:32 1999
Date: Wed, 27 Oct 1999 19:17:18 -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: <941077037-v9-i1186@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 27 Oct 1999 Volume: 9 Number: 1186
Today's topics:
length (number of items) of an array <krajzewicz@inx.de>
Re: length (number of items) of an array (Tramm Hudson)
Re: length (number of items) of an array (Peter J. Kernan)
Re: length (number of items) of an array <rhomberg@ife.ee.ethz.ch>
Re: length (number of items) of an array <rhomberg@ife.ee.ethz.ch>
Re: length (number of items) of an array (Tad McClellan)
Re: length (number of items) of an array <lr@hpl.hp.com>
Re: length (number of items) of an array (Brett W. McCoy)
Re: length (number of items) of an array <r28629@email.sps.mot.com>
Re: length (number of items) of an array <lr@hpl.hp.com>
Re: length (number of items) of an array <r28629@email.sps.mot.com>
Re: length (number of items) of an array (Malcolm Ray)
Re: length (number of items) of an array (Jon Bell)
Re: length (number of items) of an array (Brett W. McCoy)
Re: length (number of items) of an array (Staffan Hämälä)
Re: length (number of items) of an array <lr@hpl.hp.com>
Re: length (number of items) of an array <gellyfish@gellyfish.com>
Re: length (number of items) of an array (Staffan Hämälä)
Re: length (number of items) of an array <sasho@staff.mgu.bg>
Re: length (number of items) of an array (Abigail)
Re: length (number of items) of an array (Abigail)
Lets build a web resource technobuff@my-deja.com
Lets build a web resource <webmaster@technobuff.com>
linking to perl script to html page. <tom.kralidis@ccrs.nrcanDOTgc.ca>
Re: linux perl editor? <sjs@yorku.ca>
Looking for help on a CGI-Script <bibster93@my-deja.com>
Re: Looking for help on a CGI-Script <bibster93@my-deja.com>
Re: Looking for help on a CGI-Script <joeyandsherry@mindspring.com>
Looking for survey script <martin.knapp@adf.de>
Re: Looking for survey script <cassell@mail.cor.epa.gov>
Re: Looking for survey script <martin.knapp@adf.de>
Re: Looking for survey script <rootbeer@redcat.com>
Make Dir. <ssf@fallesen-internet.dk>
Re: Make Dir. <abarb@nmg.fr>
Re: Make Dir. (Tad McClellan)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 27 Oct 1999 13:46:22 +0200
From: Daniel Krajzewicz <krajzewicz@inx.de>
Subject: length (number of items) of an array
Message-Id: <3816E60E.1EAD5366@inx.de>
Hello !!!
How do I get the number of items (the length of) an array ?
thanks,
Daniel Krajzewicz
------------------------------
Date: 27 Oct 1999 14:28:54 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: length (number of items) of an array
Message-Id: <7v7na6$h40@llama.swcp.com>
Keywords: troll troll troll
[posted and cc'd to cited author of silly recursive function]
Peter J. Kernan <pete@theory2.phys.cwru.edu> wrote:
> On Wed, 27 Oct 1999 13:46:22 +0200, Daniel Krajzewicz <krajzewicz@inx.de> wrote:
> .=Hello !!!
> .=
> .=How do I get the number of items (the length of) an array ?
> .=
> i dont know, maybe you would:
Ah, the sign of a theoretical physics student.
> @array = (1..10);
>
> $r = sub {
> my ($a,$m) = @_;
> $m = 0 unless defined $m;
> return "array had $m elements" unless shift @$a;
> $r->($a,++$m);
> };
>
> print $r->(\@array);
Hmmm -- it's not strict compliant, consume O(n) stack frames,
increments $m when not required and isn't properly functional.
Why do that when you could simply:
#!/usr/bin/perl -w
use strict;
print +((sub {
my $f = shift; # Yow!
sub { $f->($f,0,@_) }
})->( # Warning: emoticon line of code
sub {
my $f = shift; # Useless comments follow
my $m = shift; # $m is the number of monkeys
return "array had $m elements\n" unless @_;
shift; # Out, out damn spot!
@_ = ($f,$m+1,@_); # Increment $m
goto &$f; # Tail recursion with Perl
}
))->(1..10)
__END__
Note the beauty of the functional approach. No values are ever
modified, it is tail recursive and consumes a constant number of
stack frames. And it is heavily commented to aid the reader.
Don't forget the special emoticon line, either.
And if I ever see someone write production code like this...
Lambda-calculusly yours,
Tramm
--
o hudson@swcp.com tbhudso@cs.sandia.gov O___|
/|\ http://www.swcp.com/~hudson/ H 505.323.38.81 /\ \_
<< KC5RNF @ N5YYF.NM.AMPR.ORG W 505.284.24.32 \ \/\_\
0 U \_ |
------------------------------
Date: 27 Oct 1999 16:16:42 GMT
From: pete@theory2.phys.cwru.edu (Peter J. Kernan)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81e9ba.dgm.pete@theory2.phys.cwru.edu>
On Wed, 27 Oct 1999 13:46:22 +0200, Daniel Krajzewicz <krajzewicz@inx.de> wrote:
.=Hello !!!
.=
.=How do I get the number of items (the length of) an array ?
.=
i dont know, maybe you would:
@array = (1..10);
$r = sub {
my ($a,$m) = @_;
$m = 0 unless defined $m;
return "array had $m elements" unless shift @$a;
$r->($a,++$m);
};
print $r->(\@array);
--
Pete
------------------------------
Date: Wed, 27 Oct 1999 18:29:03 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: length (number of items) of an array
Message-Id: <3817284F.4FD2656D@ife.ee.ethz.ch>
Larry Rosler wrote:
> > > > $count = ($item1, $item2, $item3); # $count = 3
> > Well, he got that idea from the line above that said
> >
> > $item3 = 3; # ;-)
>
> Not all that funny. I have seen posted in this newsgroups 'tests' that
> used lists like (1 .. 3) in situations like this. When I tested it
> before posting, I made sure to use (4 .. 6). :-)
Similar to the one who use some special hashes:
%a = (a=>'b', b=>'a');
%copy_of_a = (keys %a, values %a); #works only for very few %a
You can have a lot of code working correctly given the right test values
:-)
- Alex
------------------------------
Date: Wed, 27 Oct 1999 17:26:42 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: length (number of items) of an array
Message-Id: <381719B2.D09C3813@ife.ee.ethz.ch>
Larry Rosler wrote:
>
> [Posted and a courtesy copy sent.]
>
> In article <slrn81e00u.6oi.bmccoy@moebius.foiservices.com> on Wed, 27
> Oct 1999 13:32:43 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
>
> ...
>
> > $count = ($item1, $item2, $item3); # $count = 3
>
> Where did you get that idea?
Well, he got that idea from the line above that said
$item3 = 3; # ;-)
- Alex
------------------------------
Date: Wed, 27 Oct 1999 06:40:41 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: length (number of items) of an array
Message-Id: <9rk6v7.oqd.ln@magna.metronet.com>
Staffan Hämälä (sh@otto.dc.luth.se) wrote:
: In article <3816E60E.1EAD5366@inx.de>,
: Daniel Krajzewicz <krajzewicz@inx.de> writes:
: > How do I get the number of items (the length of) an array ?
: print "$#arr" . "\n";
Bzzzt!
You have an off-by-one error there.
----------------
#!/usr/bin/perl -w
use strict;
my @arr = qw(zero one two three);
print "$#arr" . "\n"; # Wrong
print "$#arr\n";
print scalar(@arr), "\n"; # Right
print $#arr+1, "\n";
----------------
output:
3
3
4
4
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 27 Oct 1999 08:53:46 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: length (number of items) of an array
Message-Id: <MPG.1280bfe793e6689d98a13e@nntp.hpl.hp.com>
In article <381719B2.D09C3813@ife.ee.ethz.ch> on Wed, 27 Oct 1999
17:26:42 +0200, Alex Rhomberg <rhomberg@ife.ee.ethz.ch> says...
> Larry Rosler wrote:
> > In article <slrn81e00u.6oi.bmccoy@moebius.foiservices.com> on Wed, 27
> > Oct 1999 13:32:43 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
> >
> > ...
> >
> > > $count = ($item1, $item2, $item3); # $count = 3
> >
> > Where did you get that idea?
>
> Well, he got that idea from the line above that said
>
> $item3 = 3; # ;-)
Not all that funny. I have seen posted in this newsgroups 'tests' that
used lists like (1 .. 3) in situations like this. When I tested it
before posting, I made sure to use (4 .. 6). :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 27 Oct 1999 15:56:54 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81e8f9.6oi.bmccoy@moebius.foiservices.com>
Also Sprach Larry Rosler <lr@hpl.hp.com>:
>> $count = ($item1, $item2, $item3); # $count = 3
>
>Where did you get that idea? I'll borrow this from Malcolm Ray's post
>in this thread:
My mistake.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: Wed, 27 Oct 1999 09:08:31 -0400
From: TK Sohj <r28629@email.sps.mot.com>
Subject: Re: length (number of items) of an array
Message-Id: <3816F94F.DBD34375@email.sps.mot.com>
"Staffan Hämälä" wrote:
>
> In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
> > How do I get the number of items (the length of) an array ?
>
> print "$#arr" . "\n";
DB<2> @arr = a..z
DB<3> print "$#arr" . "\n";
25
DB<4> print scalar @arr
26
------------------------------
Date: Wed, 27 Oct 1999 06:12:39 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: length (number of items) of an array
Message-Id: <MPG.12809a1a6bd1864e98a13a@nntp.hpl.hp.com>
In article <7v6pcb$pqc$1@news.luth.se> on 27 Oct 1999 11:58:03 GMT,
Staffan Hämälä <sh@otto.dc.luth.se> says...
> In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
> > How do I get the number of items (the length of) an array ?
>
> print "$#arr" . "\n";
Even if written without the superfluous quotes on $#arr, that produces
the value of the last index into the array, which (barring obscene
changes to $[) is one less than the length of the array.
print @arr . "\n";
But don't replace the concatenation operator by a comma, because then
you get list context, which produces the contents of the array, not its
length.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 27 Oct 1999 09:11:35 -0400
From: TK Sohj <r28629@email.sps.mot.com>
Subject: Re: length (number of items) of an array
Message-Id: <3816FA07.78A2BDC9@email.sps.mot.com>
"Staffan Hämälä" wrote:
>
> In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
> > How do I get the number of items (the length of) an array ?
>
> print "$#arr" . "\n";
DB<2> @arr = a..z
DB<3> print "$#arr" . "\n";
25
DB<4> print scalar @arr
26
------------------------------
Date: 27 Oct 1999 13:23:46 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81dv72.47d.M.Ray@carlova.ulcc.ac.uk>
On 27 Oct 1999 11:58:03 GMT, Staffan Hämälä <sh@otto.dc.luth.se> wrote:
>In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
>> How do I get the number of items (the length of) an array ?
>
>print "$#arr" . "\n";
Unless you've changed the contents of $[, that does *not* print the number
of items in the array. Did you try it before posting it?
perldoc perldata:
If you evaluate a named array in a scalar context, it
returns the length of the array. (Note that this is not
true of lists, which return the last value, like the C
comma operator, nor of built-in functions, which return
whatever they feel like returning.)
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Wed, 27 Oct 1999 13:18:37 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: length (number of items) of an array
Message-Id: <FK9Jn1.G0o@presby.edu>
Daniel Krajzewicz <krajzewicz@inx.de> wrote:
>
>How do I get the number of items (the length of) an array ?
Referring to the array itself in scalar context gives you the length:
if (@MyArray > 5) {
print "More than five elements\n";
}
To force scalar context or make it explicit, use 'scalar (@MyArray)'.
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[ Information about newsgroups for beginners: ]
[ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]
------------------------------
Date: Wed, 27 Oct 1999 13:32:43 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81e00u.6oi.bmccoy@moebius.foiservices.com>
Also Sprach Daniel Krajzewicz <krajzewicz@inx.de>:
>How do I get the number of items (the length of) an array ?
Put the array into a scalar context:
$num_items = @myarray;
$count = ($item1, $item2, $item3); # $count = 3
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 27 Oct 1999 13:37:19 GMT
From: sh@otto.dc.luth.se (Staffan Hämälä)
Subject: Re: length (number of items) of an array
Message-Id: <7v6v6f$t8i$1@news.luth.se>
> of items in the array. Did you try it before posting it?
Yes I did.
Apparently I read the question too fast.. How stupid.
/Staffan
------------------------------
Date: Wed, 27 Oct 1999 07:45:27 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: length (number of items) of an array
Message-Id: <MPG.1280afdec2f6878898a13c@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <slrn81e00u.6oi.bmccoy@moebius.foiservices.com> on Wed, 27
Oct 1999 13:32:43 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
...
> $count = ($item1, $item2, $item3); # $count = 3
Where did you get that idea? I'll borrow this from Malcolm Ray's post
in this thread:
perldoc perldata:
If you evaluate a named array in a scalar context, it
returns the length of the array. (Note that this is not
true of lists, which return the last value, like the C
comma operator, nor of built-in functions, which return
whatever they feel like returning.)
In addition to producing two warnings from '-w', your code produces the
value of $item3 for $count. How do I know? I tested it before posting!
It is really a good idea to test *everything* one posts here, no matter
how 'obvious' it may seem. It saves one loads of embarrassment.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 27 Oct 1999 15:50:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: length (number of items) of an array
Message-Id: <38171134_2@newsread3.dircon.co.uk>
Staffan Hämälä <sh@otto.dc.luth.se> wrote:
> In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
>> How do I get the number of items (the length of) an array ?
>
> print "$#arr" . "\n";
>
Er isnt that the largest index ?
scalar @arr;
/J\
--
"Boring: See Civil Engineers" - Yellow Pages
------------------------------
Date: 27 Oct 1999 11:58:03 GMT
From: sh@otto.dc.luth.se (Staffan Hämälä)
Subject: Re: length (number of items) of an array
Message-Id: <7v6pcb$pqc$1@news.luth.se>
In article <3816E60E.1EAD5366@inx.de>,
Daniel Krajzewicz <krajzewicz@inx.de> writes:
> How do I get the number of items (the length of) an array ?
print "$#arr" . "\n";
/Staffan
------------------------------
Date: Wed, 27 Oct 1999 15:45:40 +0300
From: Alexander Avtanski <sasho@staff.mgu.bg>
Subject: Re: length (number of items) of an array
Message-Id: <3816F3F4.8E5A6028@staff.mgu.bg>
"Staffan Hämälä" wrote:
>
> In article <3816E60E.1EAD5366@inx.de>,
> Daniel Krajzewicz <krajzewicz@inx.de> writes:
> > How do I get the number of items (the length of) an array ?
>
> print "$#arr" . "\n";
>
> /Staffan
Actually $#arr gives the index of the last element in the array,
and the number you will get this way is NUMBER_OF_ELEMENTS-1.
(In other words, if $#arr is "0" this means that you have 1 element
in the array)
- Alex
------------------------------
Date: 27 Oct 1999 17:50:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81f0c0.bjj.abigail@alexandra.delanet.com>
Daniel Krajzewicz (krajzewicz@inx.de) wrote on MMCCXLVIII September
MCMXCIII in <URL:news:3816E60E.1EAD5366@inx.de>:
$$
$$ How do I get the number of items (the length of) an array ?
while (@array) {$count ++; shift}
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 27 Oct 1999 17:55:57 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81f0mv.bjj.abigail@alexandra.delanet.com>
Tramm Hudson (hudson@swcp.com) wrote on MMCCXLVIII September MCMXCIII in
<URL:news:7v7na6$h40@llama.swcp.com>:
__
__ #!/usr/bin/perl -w
__ use strict;
__
__ print +((sub {
__ my $f = shift; # Yow!
__ sub { $f->($f,0,@_) }
__ })->( # Warning: emoticon line of code
__ sub {
__ my $f = shift; # Useless comments follow
__ my $m = shift; # $m is the number of monkeys
__ return "array had $m elements\n" unless @_;
__ shift; # Out, out damn spot!
__ @_ = ($f,$m+1,@_); # Increment $m
__ goto &$f; # Tail recursion with Perl
__ }
__ ))->(1..10)
__ __END__
__
__ Note the beauty of the functional approach. No values are ever
__ modified, it is tail recursive and consumes a constant number of
__ stack frames. And it is heavily commented to aid the reader.
__ Don't forget the special emoticon line, either.
I count 4 assignments in your piece of code, hardly what I call
"No values are ever modified". Granted, 3 of them are shifts,
but there's still that nagging assignment to @_ ....
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 26 Oct 1999 06:37:21 GMT
From: technobuff@my-deja.com
Subject: Lets build a web resource
Message-Id: <7v3i72$f9c$1@nnrp1.deja.com>
I am trying to establish a center for web related stuff. In this
direction, I'm trying to
setup a site that would be a software repository for Perl and Java. It
would be my pleasure to have other buddies participate in this process
and
make this site a resource.
Please visit
http://www.technobuff.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 25 Oct 1999 14:51:28 -0700
From: "Nitin Patil" <webmaster@technobuff.com>
Subject: Lets build a web resource
Message-Id: <3814d009$0$12618@news.sanjose1.level3.net>
Hi EveryBuddy,
I am trying to establish a center for web related stuff. In this direction,
I'm trying to
setup a site that would be a software repository for Perl and Java. It
would be my pleasure to have other buddies participate in this process and
make this site a resource.
Please visit
http://www.technobuff.com/
_________________________________________________________________
Ain't you enthu about technology?
Visit http://www.technobuff.com/
Info helpdesk@technobuff.com
------------------------------
Date: Wed, 27 Oct 1999 18:06:45 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: linking to perl script to html page.
Message-Id: <38177775.E4DEE683@ccrs.nrcanDOTgc.ca>
Hi,
I want to make an existing html page a derived-cgi page, however, I
don't want people to update their links / bookmarks.
The page lies at localhost:/http/docs/index.html
I would like the address to stay the same, but for the file to point at:
localhost:/http/cgi-bin/index.pl
..without a redirect, without the user knowing.
Can this be done?
I've tried ln -s, but the output page shows the perl scripting in
addition.
Any info would be valued.
..Tom
--
-----------------------------------------------------------------------------------------
Tom Kralidis Geo-Spatial Technologist
Canada Centre for Remote Sensing Tel: (613) 947-1828
588 Booth Street , Room 241 Fax: (613) 947-1408
Ottawa , Ontario K1A 0Y7 http://www.ccrs.nrcan.gc.ca
-----------------------------------------------------------------------------------------
------------------------------
Date: 19 Oct 1999 15:18:41 -0500
From: Steven Smolinski <sjs@yorku.ca>
Subject: Re: linux perl editor?
Message-Id: <m3904z2jfi.fsf@hank.yorku.ca>
"Marc H. Robards" <mhrobards@nospam.tasc.com> writes:
> Anyone have any recommendations for a perl editor under Linux? Or is emacs
> or vim the way to go? I've just started using Linux, so any suggesstions
> would be appreciated.
The investment in learning x?emacs is well worth the rewards you will reap.
Beside occasional trouble with cperl-mode in xeamcs, I find it incredibly
useful.
Steve
------------------------------
Date: Wed, 27 Oct 1999 10:37:50 GMT
From: BigMac <bibster93@my-deja.com>
Subject: Looking for help on a CGI-Script
Message-Id: <7v6klu$m1o$1@nnrp1.deja.com>
Hi everybody,
I've been browsing thru this NG for a script that meets certain specs,
but I can't seem to find it.
I'm looking for a script that meets these demands:
People need to fill out a form in wich they make 1 entry, a 6-digit
number. The form needs to send this to a database file and contain
these, delimited additional items:
Article-ID
Article price
Date
Time
IP Address of sender
Many thanx in advance to anyone that can help out.
Alfio
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 27 Oct 1999 14:30:08 GMT
From: BigMac <bibster93@my-deja.com>
Subject: Re: Looking for help on a CGI-Script
Message-Id: <7v729g$vp6$1@nnrp1.deja.com>
> You'd be better to ask this at comp.infosystems.www.authoring.cgi
>
> HTH
>
> Joey
thanx a lot for the tip,
Alfio
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 27 Oct 1999 08:08:11 -0400
From: <joeyandsherry@mindspring.com>
Subject: Re: Looking for help on a CGI-Script
Message-Id: <7v6pv1$e0s$1@nntp6.atl.mindspring.net>
You'd be better to ask this at comp.infosystems.www.authoring.cgi
HTH
Joey
------------------------------
Date: Mon, 25 Oct 1999 14:56:07 +0200
From: "Martin Knapp" <martin.knapp@adf.de>
Subject: Looking for survey script
Message-Id: <7v1nll$pbt$1@bnews.gigabell.net>
Hi all,
I'm looking for a really good survey script. The ones I've found at
www.cgi-ressources.com and similar sites are very simple regarding the
online presentation of the results because they don't allow to put questions
into a relationship. To explain myself. With all these scripts it would be
impossible to generate a result as
"43% admitted to own an eyebrow. 24% of the eyebrow owners said they had a
brown eyebrow; 2% had a blue one... More tha the half of those who don't own
any eyebrows indicated that they are willing to buy one within the next
three months..."
This kind of evaluation would mean that answers have to be stored as one
dataset per person. Of course I could modify any database script as woda or
Selenas DB Manager. But if anybody already has done so, I wouldn`t bother
NOT to have to reinvent the wheel :-)
Any hints are greatly appreciated.
______________________
Martin Knapp
martin.knapp@adf.de
------------------------------
Date: Tue, 26 Oct 1999 16:27:00 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Looking for survey script
Message-Id: <381638C4.E7C9AE54@mail.cor.epa.gov>
Martin Knapp wrote:
>
> Hi all,
Howdy,
> I'm looking for a really good survey script. The ones I've found at
> www.cgi-ressources.com and similar sites are very simple regarding the
> online presentation of the results because they don't allow to put questions
> into a relationship....
So it sounds like you want to take the script you have already
found, and add on something which takes your script and does
some basic cross-tabulations and/or descriptive stats. Such
modules are already available at CPAN [www.cpan.org] so you
can get them and add their functionality into that script.
> This kind of evaluation would mean that answers have to be stored as one
> dataset per person. Of course I could modify any database script as woda or
> Selenas DB Manager. But if anybody already has done so, I wouldn`t bother
> NOT to have to reinvent the wheel :-)
>
> Any hints are greatly appreciated.
Okay, then I suggest you do not use anything written by
Selena Sol. Get some decently-coded Perl instead.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 26 Oct 1999 01:24:25 +0200
From: "Martin Knapp" <martin.knapp@adf.de>
Subject: Re: Looking for survey script
Message-Id: <7v2ouh$11ma$1@bnews.gigabell.net>
Tom Phoenix <rootbeer@redcat.com> schrieb in im Newsbeitrag:
Pine.GSO.4.10.9910251352570.29843-100000@user2.teleport.com...
> If you're wishing merely to _find_ (as opposed to write) programs,
> this newsgroup may not be the best resource for you. There are many
> freeware and shareware archives which you can find by searching Yahoo
> or a similar service. Hope this helps!
Tom,
as I stated in my posting, I've posted my question here because:
[x] I've searched all those freeware and shareware archives withour success
[x] I'm not precisely wishing to, but (in the worst case) prepared to write
this advanced survey script myself (and make it available to others), if
nobody else in this NG has done so up to now.
ok for you?
______________________
Martin Knapp
martin.knapp@adf.de
------------------------------
Date: Mon, 25 Oct 1999 13:53:19 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Looking for survey script
Message-Id: <Pine.GSO.4.10.9910251352570.29843-100000@user2.teleport.com>
On Mon, 25 Oct 1999, Martin Knapp wrote:
> I'm looking for a really good survey script.
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 26 Oct 1999 17:52:19 +0200
From: "Steffan S. Fallesen" <ssf@fallesen-internet.dk>
Subject: Make Dir.
Message-Id: <%5kR3.282$wo.662@news.get2net.dk>
Hi,
How do I make a directory via Perl on my webserver??
Please help me!
Regards
Fallesen Internet & dk3.com
Steffan Søndermark
Østergade 22
DK-6600 Vejen
Danmark
------------------------------
Date: Tue, 26 Oct 1999 18:00:26 +0200
From: BARBET Alain <abarb@nmg.fr>
To: "Steffan S. Fallesen" <ssf@fallesen-internet.dk>
Subject: Re: Make Dir.
Message-Id: <3815D01A.E44F4B7D@nmg.fr>
Hi,
"Steffan S. Fallesen" a écrit :
> Hi,
> How do I make a directory via Perl on my webserver??
perldoc -f mkdir
a+
--
Alain BARBET
abarb@nmg.fr - http://www.citeweb.net/alian
------------------------------
Date: Tue, 26 Oct 1999 07:52:04 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Make Dir.
Message-Id: <4l44v7.vma.ln@magna.metronet.com>
Steffan S. Fallesen (ssf@fallesen-internet.dk) wrote:
: How do I make a directory via Perl
perldoc -f mkdir
: on my webserver??
You should ask web-specific questions in a newsgroup that
has something to do with the web.
clpmisc is not such a newsgroup.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
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 1186
**************************************