[7778] in Perl-Users-Digest
Perl-Users Digest, Issue: 1403 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 2 14:07:19 1997
Date: Tue, 2 Dec 97 11:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 2 Dec 1997 Volume: 8 Number: 1403
Today's topics:
Accessing modem in winNT <ryan@ramresearch.com>
Re: can perl do multi-threaded programming? <tchrist@mox.perl.com>
Re: JPL on FreeBSD (Ian Kallen)
LWP question, CGI question (Scratchie)
Re: Making crontabs (Was: switch stdout and stderr) <jamesr@aethos.co.uk.nospam>
MS IE 3.03 File Uploading <perlguy@inlink.com>
Need to know how to limit the file sizes in file upload <jonesb@wam.umd.edu>
Re: Newbie question. Do you recommend moving from C? <mummert@cs.wcu.edu>
Perl equivalent to "statfs" <sbhagava@cs.uml.edu>
Perl on Solaris 2.5.1 <tinsley@tag.com>
Re: size of a DB (corrected) <stevenjm@olywa.net>
Re: size of a DB <stevenjm@olywa.net>
Re: some good perl-sites (Doran)
Sorting a multi-dimensional array <skbohler@ix.netcom.com>
Re: Sorting a multi-dimensional array <tgschumm@mtu.edu>
Re: Sorting a multi-dimensional array (Andrew M. Langmead)
What's new? 6200+ links on Object-Orientation (in Engli <manfred.schneider@rhein-neckar.de>
Re: Year 2000: -M -A -C operators <tchrist@mox.perl.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 2 Dec 1997 12:00:16 -0500
From: "Ryan McGuigan" <ryan@ramresearch.com>
Subject: Accessing modem in winNT
Message-Id: <661elv$2c1$1@news.fred.net>
Hi, does anyone know how to access a modem in windows NT? I need to write a
script that will use a modem to automatically page someone if our web server
goes down.
Thanks for any help I get
Ryan McGuigan
------------------------------
Date: 2 Dec 1997 17:35:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: can perl do multi-threaded programming?
Message-Id: <661gsj$3ji$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"David M Rosner" <dave@digidem.com> writes:
:i have a program where i want to kick off several other programs all at
:once. i could fork each one into its own process and then exec it, but i'd
:rather have the advanatages of true-multithreading and do each one as a
:seperate task. i've searched around and i can't seem to find any
:multi-threading information on Perl. is there such a thing?
Fork is good for you. Here's a demo that shows how powerful
fork is for multithreading:
# make socket SOCFH, connect, then dup the PC
if (fork) { while (<SOCFH>) { print STDOUT $_ } }
else { while (<STDIN>) { print SOCFH $_ } }
All you get from the "threading" is shared data, which is its own
problem. We've done multitasking for years you know with fork.
For most people, non-PC-duplicating threading is a lame excuse
for not understanding the select system call.
Now, it probably is not so in your case, but I advise you
not to jump on the "threads are God" bandwagon too quickly.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Your csh still thinks true is false. Write to your vendor today and tell
them that next year Configure ought to "rm /bin/csh" unless they fix their
blasted shell. :-) --Larry Wall in Configure from the perl distribution
------------------------------
Date: 2 Dec 1997 17:36:00 GMT
From: spidaman@well.com (Ian Kallen)
Subject: Re: JPL on FreeBSD
Message-Id: <661gu0$5q8$1@was.hooked.net>
Honza Pazdziora (adelton@fi.muni.cz) wrote:
: I bet you did not set your LD_LIBRARY_PATH before running make ;-)
What? '.' should be in LD_LIBRARY_PATH??
: Did you use your system malloc?
Yup
--
The next interface will not be another desktop metaphor.... Ian Kallen ....
------------------------------
Date: Tue, 02 Dec 1997 11:17:40 -0500
From: upsetter@ziplink.net (Scratchie)
Subject: LWP question, CGI question
Message-Id: <upsetter-0212971117400001@mfs-03-82.port.shore.net>
Greetings, all;
A couple of questions regarding some perl modules I've been using recently.
1) LWP provides the HTML::Parse for parsing simple HTML, but
unfortunately, it doesn't seem to do anything with tables or forms (it
just displays a message like [Table Not Displayed]).
Does anyone know of/have a module or library that does a more advanced
HTML parsing or do I need to write my own? I've looked through the LWP
documentation but it doesn't seem to mention any other option besides
HTML::Parse.
2) CGI provides the option to display a list of HTML checkboxes in
columnar format (e.g.,
http://www.ziplink.net/cgi-bin/cgiwrap/upsetter/new_view.cgi?states=MA
).
Unfortunately (for Lynx users), CGI puts each checkbox in its own table
cell, so a person using Lynx would see instead of this list:
0 4 8
1 5 9
2 6 A
3 7 B
This list:
0
4
8
1
5
9
2 etc...
I would rather have each column appear in its own table cell -- this would
look better in Lynx (and in Netscape/Explorer, imo), and it would
presumably be less work for the CGI module, but I can't find any mention
of such an option in the documentation... do I need to do this myself?
Thanks in advance,
--Art
---------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.ziplink.net/~upsetter/ska/calendar.html
---------------------------------------------------------------------
---------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.ziplink.net/~upsetter/ska/calendar.html
---------------------------------------------------------------------
------------------------------
Date: 2 Dec 1997 17:39:43 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: Making crontabs (Was: switch stdout and stderr)
Message-Id: <01bcff49$e780ba80$26c0a4c1@kitkat.aethos.co.uk>
You are going about this the wrong way (IMHO)
Crontabs are just plain old text files, on my system (HPUX10) they are in
/var/spool/cron/crontabs.
Why not just give your script the correct permissions (normally crontabs
are written as root), and then write the file there directly.
Or if you are unhappy about this, then make your script SUID to a nologin
user, make a directory rwx only to that user, then get write a simple
script (sh/perl your choice) to copy the files into the correct cron dir
and chown them to the correct cron user.
James Richardson
------------------------------
Date: Tue, 2 Dec 1997 17:42:39 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: MS IE 3.03 File Uploading
Message-Id: <3484488F.35F658AF@inlink.com>
This question actually involves a Perl program, that is why I am posting
it here.
I wrote a Perl script on Windoze NT that is supposed to upload a file to
the web server. Everything works fine in Netscape (of course), MS IE
3.02 {with the file upload patch}, MS IE 4.x BUT it does not work with
MS IE 3.03 which touts file uploading as a "new feature"!
The browser chokes when it gets to these lines:
## Open the file and then write to it. This creates the file we are
uploading on the server.
open(TMP,">$target")||die "Error creating file: $!";
binmode(TMP);
print TMP $CGI{'UploadedFile'}->{'Contents'};
close(TMP);
When I say chokes, I mean it goes to a gray screen and the browser
stops. I can't even view the source.
I called Microsoft on their EXPENSIVE product support line. They didn't
have a clue but are sending me IE 3.02 so that we can continue working!
Has ANYONE found a way to fix this problem?
The HTML form is ok.
The rights to the area I am uploading to are ok.
The script works fine under all other browsers.
Any suggestions, besides switching to Netscape?
Brent Michalski
Intranet Developer, Boeing Corp.
------------------------------
Date: Tue, 02 Dec 1997 13:01:51 -0500
From: Bryan Jones <jonesb@wam.umd.edu>
Subject: Need to know how to limit the file sizes in file uploads in Perl
Message-Id: <34844D0E.96F72BA6@wam.umd.edu>
Please someone help!
I'm trying to put together a perl script which will allow me to upload
files to a Msql database. I need to know how I might be able to limit
the size of the files which are being uploaded to the server. I
understand that it might probably take uploading it first then looking
at the file size. BUT HOW DO YOU DO THIS IN PERL?
I'm using HTTP/CGI transfer protocol for the file uploads.
Any response would be greatly appreciated!
Thanks!
-Bryan Jones
--
----------------------------------------------------
jonesb@wam.umd.edu
------------------------------
Date: Tue, 2 Dec 1997 13:11:58 -0500
From: Carl Mummert <mummert@cs.wcu.edu>
To: Tad McClellan <tadmc@metronet.com>
Subject: Re: Newbie question. Do you recommend moving from C?
Message-Id: <Pine.LNX.3.96.971202125739.17878B-100000@tinuviel.cs.wcu.edu>
cm>Programming (sysdev@mb.sympatico.ca) wrote:
cm>: I have been experiencing
cm>: "the joy of C" the past few months.
cm>
cm>: My big complaint of using c is
cm>: that it has no string type.
cm>: This also involves memory, pointers,
cm>: syntax, etc. Massive learning curve.
Perl has regelar expressions, formats, modules, many built-in
variables ($$ etc.), many built-in functions, references, anonymoius
arrays and hashes, tied variables, and other nasty things...
This is not to say that perl is not a great language. I use it myself
rather frequently for things which I don't wnat to program in C.
But niether C nor perl is superior to the other overall, and niether
one has a "better" or "simpler" syntax overall. You have to
look at what you are doing, and then decide which is better.
For text processing, Perl is probably easier to write than C.
But, as LW said, "Note that Perl itself is not written in Perl"
(I remember that from somewhere)
cm>: Yet, the supposed advantage of C is that it is,
cm>: get this, compact!
It is, in a sense. There are so few built-in features of the C
language that you rarely need a reference with you as you program (a
language reference, not a refrence to library calls etc...).
So, C is "compact" in that you can remember all of it at once.
cm>Power has a price ;-)
This is true both ways. C and Perl both pay a price for their
features.
Carl
--mummert@cs.wcu.edu-----------
One must imagine Sysiphus happy
------------------------------
Date: Tue, 02 Dec 1997 13:45:26 -0800
From: Satish Bhagavatula <sbhagava@cs.uml.edu>
Subject: Perl equivalent to "statfs"
Message-Id: <34848176.50F2@cs.uml.edu>
Hello,
Is there any system call in perl equivalent to "statfs in C" to get
information about a mounted file system.
Thanks,
Satish.
------------------------------
Date: Tue, 02 Dec 1997 13:28:38 -0500
From: Scott Tinsley <tinsley@tag.com>
Subject: Perl on Solaris 2.5.1
Message-Id: <34843F82.62A2@tag.com>
I am having trouble getting any version of perl to successfully run
through the included test suite. I have tried both version 5.003 and
5.00404. I have used both the GCC compiler V 2.7.2.1 and the Solaris
Compiler 4.2. I get differing results each time I run the test suite no
matter what the combination of compiler and perl version, static vs
dynamic loading, extensions or no enxtensions. I have gotten a
successful test run on one attempt, then several failures on the very
next, followed by a failure complaining about perl version number
mismatches( prints the same version number ). I have checked the
newsgroups and FAQs for information and I have come up dry. I would be
interested if anyone could offer some help.
Please respond to my email address. I do not have access to the
newgroups
on a regular basis.
Thanks,
Scott Tinsley Phone: 703-904-4340
Systems Engineer Fax: 703-834-6922
The Allied Group, Inc. Email: tinsley@tag.com
The "make minitest" runs without error. In all cases.
SunOS vlinsvr 5.5.1 Generic_103640-12 sun4m sparc SUNW,SPARCstation-20
All SUN recommended patches for 2.5.1 have been installed.
Here is the perl -V info and "make test" output for Perl 5.003 compiled
and linked using the SUN C v4.2 compiler.
The "make minitest" runs without error.
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=solaris, osver=2.5.1, archname=sun4-solaris
uname='sunos vlinsvr 5.5.1 generic_103640-08 sun4m sparc
sunw,sparcstation-20 '
hint=recommended, useposix=true, d_sigaction=define
Compiler:
cc='cc', optimize='-xO3', gccversion=
cppflags='-xO3 -xdepend -xchip=generic -xarch=generic'
ccflags ='-xO3 -xdepend -xchip=generic -xarch=generic'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=15
Linker and Libraries:
ld='cc', ldflags =''
libpth=/opt/SUNWspro/lib /usr/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags=' '
cccdlflags='-Kpic', lddlflags='-G'
@INC: /usr/local/lib/perl5/sun4-solaris/5.003 /usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/sun4-solaris
/usr/local/lib/perl5/site_perl .
vlinsvr:/home/vlinsvr/stinsley/perl5.003:36 >make test
make: Warning: Both `makefile' and `Makefile' exist
./miniperl configpm tmp
sh mv-if-diff tmp lib/Config.pm
File lib/Config.pm not changed.
AutoSplitting perl library
Making DynaLoader (static)
cd t && chmod +x TEST */*.t
cd t && (rm -f perl; /bin/ln -s ../perl perl) && ./perl TEST </dev/tty
base/cond......ok
base/if........ok
.....
lib/gdbm.......ok
lib/ndbm.......ok
lib/odbm.......ok
lib/posix......Perl lib version (5.003) doesn't match executable
version (5.003)
BEGIN failed--compilation aborted at ./lib/posix.t line 11.
FAILED on test 0
lib/safe.......Perl lib version (5.003) doesn't match executable
version (5.003)
BEGIN failed--compilation aborted at ./lib/safe.t line 11.
FAILED on test 0
lib/sdbm.......ok
lib/socket.....ok
lib/soundex....ok
Failed 6/94 tests, 93.62% okay.
*** Error code 29 (ignored)
A second run, different failures.
lib/gdbm.......ok
lib/ndbm.......Perl lib version (5.003) doesn't match executable
version (5.003)
BEGIN failed--compilation aborted at ./lib/ndbm.t line 13.
FAILED on test 0
lib/odbm.......ok
lib/posix......Perl lib version (5.003) doesn't match executable
version (5.003)
BEGIN failed--compilation aborted at ./lib/posix.t line 11.
FAILED on test 0
lib/safe.......ok
lib/sdbm.......ok
lib/socket.....ok
lib/soundex....ok
Failed 4/94 tests, 95.74% okay.
*** Error code 29 (ignored)
Here is an attempt with perl 5.00404 and GCC 2.7.2.1.
Even the "perl -V fails intermittently
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04/lib:82 >../perl -V
Perl lib version (5.00404) doesn't match executable version (5.00404)
at
Config.pm line 7.
BEGIN failed--compilation aborted.
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04/lib:84 >../perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
Platform:
osname=solaris, osvers=2.5.1, archname=sun4-solaris
uname='sunos vlinsvr 5.5.1 generic_103640-12 sun4m sparc
sunw,sparcstation-20 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=n useperlio=undef d_sfio=undef
Compiler:
cc='gcc', optimize='-O', gccversion=2.7.2.1
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld', ldflags =''
libpth=/usr/lib /lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags=''
Characteristics of this binary (from libperl):
Built under solaris
Compiled at Dec 2 1997 11:18:01
@INC:
/usr/local/lib/perl5/sun4-solaris/5.00404
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/sun4-solaris
/usr/local/lib/perl5/site_perl
.
The make minitest runs with differing results
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04:75 >make minitest
make: Warning: Both `makefile' and `Makefile' exist
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
&& ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
</dev/tty
base/cond.........FAILED at test 5
Failed a basic test--cannot continue.
*** Error code 2 (ignored)
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04:76 >make minitest
make: Warning: Both `makefile' and `Makefile' exist
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
&& ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
</dev/tty
base/cond.........ok
base/if...........ok
base/lex..........ok
base/pat..........ok
base/term.........ok
comp/cmdopt.......ok
comp/colon........ok
comp/cpp..........ok
comp/decl.........ok
The perl test fails at various locations
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04:77 >make test
make: Warning: Both `makefile' and `Makefile' exist
AutoSplitting perl library
Making DynaLoader (static)
cd t && (rm -f perl; /bin/ln -s ../perl perl)
cd t && ./perl TEST </dev/tty
base/cond.........ok
base/if...........ok
base/lex..........FAILED at test 7
Failed a basic test--cannot continue.
*** Error code 29
make: Fatal error: Command failed for target `test'
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04:78 >make test
make: Warning: Both `makefile' and `Makefile' exist
AutoSplitting perl library
Making DynaLoader (static)
cd t && (rm -f perl; /bin/ln -s ../perl perl)
cd t && ./perl TEST </dev/tty
base/cond.........FAILED at test 5
Failed a basic test--cannot continue.
*** Error code 29
make: Fatal error: Command failed for target `test'
vlinsvr:/vlin/@newsrc/freeware/perl5.004_04:79 >make test
make: Warning: Both `makefile' and `Makefile' exist
AutoSplitting perl library
Making DynaLoader (static)
cd t && (rm -f perl; /bin/ln -s ../perl perl)
cd t && ./perl TEST </dev/tty
base/cond.........ok
base/if...........ok
base/lex..........ok
base/pat..........ok
base/term.........ok
comp/cmdopt.......ok
comp/colon........ok
comp/cpp..........ok
comp/decl.........ok
comp/multiline....ok
comp/package......ok
comp/proto........FAILED at test 55
comp/redef........ok
comp/script.......ok
comp/term.........ok
comp/use..........Perl lib version (5.00404) doesn't match executable
version (5.00404) at ../lib/Config.pm line 7.
BEGIN failed--compilation aborted at ../lib/lib.pm line 4.
BEGIN failed--compilation aborted at ./comp/use.t line 48.
--
Scott Tinsley Phone: 703-904-4340
Systems Engineer Fax: 703-834-6922
The Allied Group, Inc. Email: tinsley@tag.com
------------------------------
Date: Tue, 02 Dec 1997 09:40:33 -0800
From: Steven May <stevenjm@olywa.net>
Subject: Re: size of a DB (corrected)
Message-Id: <34844810.E8042393@olywa.net>
Steven May wrote:
> Harald Joerg wrote:
>
> > Morten Simonsen wrote:
> > > : I have made a DB which consists of a key: <a_number:name> and
> > > : a attribute <a_name>. Together each tuple<SNIP>
>
> > ...and be aware that SDBM_File is broken on FAT (i.e. non-NT) file
> > systems, and hence on Windows95. The activeware release notes said
> > so, but the problem apparently persists with 5.004.
> > Try the following code:
> > -----------------------------------------------------------------
> > use Fcntl;
> > use SDBM_File;
> >
> > tie %db,"SDBM_File","/tmp/test_Sdb",O_RDWR | O_CREAT,0666;
> > $i = 0;
> > $next = 10;
> > while (++$i) { # always true
> > $db{$i} = $i; # add key/value pair $i
> > if (keys %db != $i) {
> > print "$i keys added, ", scalar keys %db, " keys found\n";
> > last; # quit if "keys" returns wrong
> number
> >
> > }
> > if ($i >= $next) { # show progress
> > print "$i keys processed\n";
> > $next *= 2;
> > }
> > }
> > ----------------------------------------------------------------
> > This code should run forever, but it doesn't on Win95
>
> $DBPATH= "$this_path/$data_path";
> $HASH= "$DBPATH/Hash";use SDBM_File; # windows version
> #use Fcntl; # doesn't work!
>
> sub O_CREAT { 0x0100 }
> sub O_BINARY { 0x8000 }
> sub O_RDWR { 0x0002 }
>
> &open_db;
>
> sub open_db{
> my($writable) = @_;
> my($permissions) = $writable ? O_CREAT|O_RDWR : O_RDONLY;
>
> tie(%Hash,SDBM_File,$HASH,$permissions,0644) || die "Hash tie: $!\n";
> 1;
> }
>
> Using the above works on my win95 machine.
> You will get grumbles when running with -w, but it works. Haven't
> pushed over 2000 records, so can't speak to the size issue, other than
>
> the database is currently at about 1.5 megs.
>
> Steve
>
> --
> Blackwater-Pacific Services
--
Blackwater-Pacific Services
------------------------------
Date: Tue, 02 Dec 1997 09:33:53 -0800
From: Steven May <stevenjm@olywa.net>
Subject: Re: size of a DB
Message-Id: <34844681.15BBF44D@olywa.net>
Harald Joerg wrote:
> Morten Simonsen wrote:
> > : I have made a DB which consists of a key: <a_number:name> and
> > : a attribute <a_name>. Together each tuple<SNIP>
> ...and be aware that SDBM_File is broken on FAT (i.e. non-NT) file
> systems, and hence on Windows95. The activeware release notes said
> so, but the problem apparently persists with 5.004.
> Try the following code:
> -----------------------------------------------------------------
> use Fcntl;
> use SDBM_File;
>
> tie %db,"SDBM_File","/tmp/test_Sdb",O_RDWR | O_CREAT,0666;
> $i = 0;
> $next = 10;
> while (++$i) { # always true
> $db{$i} = $i; # add key/value pair $i
> if (keys %db != $i) {
> print "$i keys added, ", scalar keys %db, " keys found\n";
> last; # quit if "keys" returns wrong number
>
> }
> if ($i >= $next) { # show progress
> print "$i keys processed\n";
> $next *= 2;
> }
> }
> ----------------------------------------------------------------
> This code should run forever, but it doesn't on Win95
$DBPATH= "$this_path/$data_path";
$HASH= "$DBPATH/Hash";use SDBM_File; # windows version #
use Fcntl; # doesn't work!
sub O_CREAT { 0x0100 }
sub O_BINARY { 0x8000 }
sub O_RDWR { 0x0002 }
&open_db;
sub open_db{
my($writable) = @_;
my($permissions) = $writable ? O_CREAT|O_RDWR : O_RDONLY;
tie(%Hash,SDBM_File,$HASH,$permissions,0644) || die "Hash tie: $!\n";
1;
}
Using the above works on my win95 machine.
You will get grumbles when running with -w, but it works. Haven't
pushed over 2000 records, so can't speak to the size issue, other than
the database is currently at about 1.5 megs.
Steve
--
Blackwater-Pacific Services
------------------------------
Date: Tue, 02 Dec 1997 17:23:50 GMT
From: rbj@NOSPAMix.netcom.com (Doran)
Subject: Re: some good perl-sites
Message-Id: <348443d7.3070375@nntp.ix.netcom.com>
You can also check out the Perl Ring, which (almost by definition) has
lots of good Perl Links.
http://www.netaxs.com/~joc/perlring.html
Good luck,
Doran...
sap1d@canit.se (Johan Dalstrom) wrote:
>Hey..
>
>I'm learning perl and I'd like to know if there are any good
>tutorials and FAQ's etc..
>
>If you know any good sites.. Please mail me or post it in the
>group.
>
>
>/ sap1d
>
>-- -
>sap1d@xy.org / - perl -
>sap1d@canit.se / There's more than one way to do it
> - --
Please remove the NOSPAM when replying via email.
------------------------------
Date: Tue, 2 Dec 1997 11:59:09 -0500
From: "Steve Bohler" <skbohler@ix.netcom.com>
Subject: Sorting a multi-dimensional array
Message-Id: <661esg$vg@sjx-ixn2.ix.netcom.com>
Anybody have any suggestions on how I might best sort a multi-dimensional
array (i.e. list of lists)?
For example:
My array is:
1 "Red"
3 "Blue"
2 "Green
And I want to sort it based on the first column, so that it becomes:
1 "Red"
2 "Green"
3 "Blue"
I know how to sort a column, but don't know how to "move" the other values
in the row along with each value in the column.
Any help would be greatly appreciated.
S. Bohler
--
------------------------------
Date: Tue, 2 Dec 1997 12:23:28 -0500
From: "Thomas Schumm" <tgschumm@mtu.edu>
Subject: Re: Sorting a multi-dimensional array
Message-Id: <661g78$ee0$1@campus1.mtu.edu>
>Anybody have any suggestions on how I might best sort a multi-dimensional
>array (i.e. list of lists)?
>
>For example:
>
>My array is:
>
>1 "Red"
>3 "Blue"
>2 "Green
>
>And I want to sort it based on the first column, so that it becomes:
>
>1 "Red"
>2 "Green"
>3 "Blue"
>
>I know how to sort a column, but don't know how to "move" the other values
>in the row along with each value in the column.
sort { $a->[0] <=> $b->[0] } @array;
A two dimensional array in perl is just an array of references to arrays,
so they don't really have columns (but you can pretend). You end up
sorting the references by the 0th element of the arrays they reference, so
it appears that the second column moves around automagically.
---- Tom Schumm ---- http://www.ismi.net/~phong/ ----__/\__---- Phong -
--- v3.1 GCS/M d- s: a20 C$++>++++ W++(--) P++++ M-- \ / w---(++) --
-- UBLS$+++(++++) L+ t+* X+ b+ DI++++ G+ !r y? __/\__/ \__/\__ e ---
- the Coteric Continuum -- O- -- phong@ismi.net / tgschumm@mtu.edu ----
------------------------------
Date: Tue, 2 Dec 1997 17:36:31 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Sorting a multi-dimensional array
Message-Id: <EKKowv.68s@world.std.com>
"Steve Bohler" <skbohler@ix.netcom.com> writes:
>My array is:
>1 "Red"
>3 "Blue"
>2 "Green
>I know how to sort a column, but don't know how to "move" the other values
>in the row along with each value in the column.
If you data is set up the way I assume it is from your description:
@array = ( [ 1, 'Red' ], [ 2, 'Green' ], [ 3, 'Blue' ] );
and you sort it like this (pass each array reference to sort, have
sort examine the first element of the array reference, and sort
returns the array references in the correct order)
@sorted = { $a->[0] <=> $b->[0] } @array;
then all the values "move" together.
for $elem (@sorted) {
print "$elem->[0] $elem->[1]\n";
}
--
Andrew Langmead
------------------------------
Date: Tue, 2 Dec 1997 19:32:05 +0100
From: "Manfred Schneider" <manfred.schneider@rhein-neckar.de>
Subject: What's new? 6200+ links on Object-Orientation (in English & French)
Message-Id: <661k06$qlq$1@trumpet.uni-mannheim.de>
From: The Cetus Team
Subject: Cetus Links -- 6200+ links on Object-Orientation
Newsgroups: Some comp.* newsgroups related to OO
Summary: News, editions, topics, URLs, team members
Posting-Freq.: Monthly
Hello,
are you interested in a collection of more than 6200 links on
Object-Orientation - running on 16 servers in 13 countries ?
No ads, few graphics, fast and free access!
What4s new?
o New central website at -----> www.cetus-links.org
o New mirror in the Philippines
o New pages Project Management and UML
o New structure for pages CORBA, CORBA ORBs, Methods, Self
o French pages ActiveX/COM+, Ada, C++, CORBA ORBs, Delphi,
Project Management, UML and Visual Basic are now translated weekly
o
o All URLs checked; broken and moved URLs adjusted
Available editions:
o English
o French
Main topics:
o General Information and Links about Object-Orientation
o Distributed Objects, Business Objects, Mobile Agents,
ActiveX/COM+, CORBA, CORBA ORBs, Java Beans, OpenDoc
o Methods, UML, Tools, Diagram Layout, Project Management
o Languages, Ada, BETA, C++, CLOS, COBOL, Delphi, Dylan,
Eiffel, Java, JavaScript, Modula-3, Oberon, Objective-C,
Perl, Python, REXX, Sather, Self, Simula, Smalltalk,
Tcl/Tk, VBScript, Visual Basic, Visual C++
o Databases, OO DBMS, OR DBMS, OR Mapping, Repositories
o Patterns, Libraries, Frameworks, Metrics, Reuse, Testing, Numerics
o Services and Companies
Web Sites:
o The main site runs in the USA
o The French edition runs in Canada
o URLs of all sites:
New! Central http://www.cetus-links.org/
Canada http://www.csioo.com/cetusen/software.html
USA/IL http://www.objenv.com/cetus/software.html
USA/VA http://www.eidea.com/OO_site/cetus/software.html
USA/WA http://mini.net/cetus/software.html
Australia http://www.csse.swin.edu.au/manfred/software.html
Japan http://aries.ise.eng.osaka-u.ac.jp/cetus/software.html
New! Philippines http://research.iphil.net/cetus/software.html
Singapore http://sunsite.nus.sg/pub/cetus/software.html
Austria http://www.infosys.tuwien.ac.at/cetus/software.html
Germany http://www.rhein-neckar.de/~cetus/software.html
Netherlands http://www.objecthouse.nl/cetus/software.html
Russia http://oop.rosweb.ru/cetus/software.html
Spain http://www.uax.es/uax/oop/software.html
Switzerland http://www.sente.ch/cetus/software.html
UK http://www.parallax.co.uk/cetus/software.html
French ed. http://www.csioo.com/cetusfr/software.html
Cetus Team Members:
o Ralf Comtesse (Databases, OO DBMS, OR DBMS, OR Mapping)
o Bernard Ctti (Methods, UML, Tools, Project Management)
o Nick Leaton (Eiffel)
o Wolfgang Lugmayr (Mobile Agents, Self)
o Georg Odenthal (Patterns)
o Eugene Siu (Java)
o Elizabeth Veitch (CORBA, CORBA Object Request Brokers)
o Rich Wellner (Python; tool support)
o Manfred Schneider (all other pages)
We hope you will find the Cetus Links useful.
Please feel free to send new or changed URLs, comments or suggestions.
Manfred
------------------------------
Date: 2 Dec 1997 17:39:28 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Year 2000: -M -A -C operators
Message-Id: <661h4g$3ji$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Frederic GILLES <gilles@tls-cats.sps.mot.com> writes:
:Are the Perl operators -M, -A and -C year 2000 compliant?
Y2k compliance is a management solace with no real meaning.
The world will end, and you'll get sued, no matter what
you do. The reason it is hopeless is that no matter how
smart the tools are, there will always be stupid programmers
using those tools.
But in this case, you're just being paranoid: the number of seconds
in each day in not apt to change with the millenium.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
echo "Hmmm...you don't have Berkeley networking in libc.a..."
echo "but the Wollongong group seems to have hacked it in."
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1403
**************************************