[6640] in Perl-Users-Digest
Perl-Users Digest, Issue: 265 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 10 02:07:15 1997
Date: Wed, 9 Apr 97 23:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 9 Apr 1997 Volume: 8 Number: 265
Today's topics:
Re: 2 dimentional array <mgjv@comdyn.com.au>
Re: Admin task in perl (Tim Gim Yee)
Bid 4 PERL job <peter@aspenmedia.com>
Can it be done jhardy@cins.com
CGI programming HELP!!!!! <"smithpr@gte.net"@gte.net>
embedding perl in G++ <magrasjc@texas.net>
Re: Error when using Accept <psrc@exmachina.com>
How do you Parse a string? john.la@wrs.com
Is there a problem with rindex in 5.003? <sbrehm@jaycor.com>
Re: Learning Perl (Billy Chambless)
list directory files in order of creation. (walter hawkes)
Re: No GUI environment for Perl? ()
Re: No GUI environment for Perl? <ajohnson@gpu.srv.ualberta.ca>
Re: No GUI environment for Perl? <davidw@efn.org>
perl IPC problem <critter@quack.kfu.com>
Re: Placing info at the top of a file (Eric D. Friedman)
Re: Placing info at the top of a file (Jon Bell)
problem with DB_File/DB_RECNO? <chuck@NYC.Thinkbank.COM>
Q:rounding <metzler@imib.rwth-aachen.de>
Re: Radius, a perl for your thoughts (Metameme 7)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <Fredrik_Lundh@ivab.se>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <mdkersey@hal-pc.org>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Michael Kagalenko)
security without a secure server (Len Coleman)
Re: still a problem passing filehandle to subroutine (Eric D. Friedman)
Re: system LIST && die NOT system LIST || die ?? <rmcvay@acm.org>
Re: timelocal strangeness and my obvious insanity... :) (Ken Williams)
Re: Unix and ease of use (WAS: Who makes more ...) (Jettero Heller)
Re: Who makes more $$ - Windows vs. Unix programmers? (Ell)
Why are no elements returned from split(/X/,'')? (Kent S. Gordon)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 10 Apr 1997 12:48:49 +1000
From: Martien Verbruggen <mgjv@comdyn.com.au>
Subject: Re: 2 dimentional array
Message-Id: <334C5511.558E@comdyn.com.au>
Allon Henig wrote:
>
> Hi!
> how can I put a value into a 2 dimentional hash table ?
Read the perl documentation on LoL (List of lists), through man perllol
or anyway you want.
> the following statment just doenst work :
> $HashTable { $x{ $y } } = $value;
try $HashTable{$x}{$y} = $value;
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Wed, 09 Apr 1997 21:49:47 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: Admin task in perl
Message-Id: <334bff47.3337869@news.seanet.com>
On Wed, 09 Apr 1997 13:18:04 -0400, rachel
<rachel@cbogate.peel.edu.on.ca> wrote:
>Side Note: The reason why I need the varibles not to be tainted is
> because in perl -T when you are using system
> commands to mkdir and etc perl won't do it unless
> the variables are not tainted.
>
>
>Please help me I can figure out the answer
>
>My trival try at it
> $request_method = $ENV{'REQUEST_METHOD'};
> if ($request_method eq "GET") {
> $ENV{'QUERY_STRING'}=~ /^([^&]+)/;
> $ENV{'QUERY_STRING'}=~ /^([^=]+)/;
> $query_string = $ENV{'QUERY_STRING'};
> } elsif ($request_method eq "POST") {
> read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
> $query_string=~ /^([^&]+)/;
> $query_string=~ /^([^=]+)/;
> } else {
> &return_error (500, "Server Error",
> $request_method = $ENV{'REQUEST_METHOD'};
Please don't do this. You're using security tainting, which is a good
thing. But the first thing you *try* to do after turning it on is
turn it off!? You could achieve the same result by not including -T
to begin with.
Instead, get your user-initiated variables as you normally would
(hopefully making use of a module like CGI.pm). Then only untaint
individual variables as needed. Assuming you have a directory name
given in $dir:
$dir =~ /^(\w+)$/ or die "\$dir couldn't be untainted!";
# $untainted-dir = $dir; # wrong!
$untainted_dir = $1; # right :)
There. Now your script is more secure and less secure at the same
time. Please see perlsec in your man pages.
-- Tim Gim Yee tgy@chocobo.org
http://www.dragonfire.net/~tgy/moogle.html
"Will hack perl for a moogle stuffy, kupo!"
------------------------------
Date: Wed, 09 Apr 1997 11:17:30 -0800
From: Peter Hansell <peter@aspenmedia.com>
Subject: Bid 4 PERL job
Message-Id: <334BEB41.7706@aspenmedia.com>
I am looking for some one to cook up a 3 part script. It is a form that
needs to be parsed, checked, and logged to a file. If you are interested
in getting more information please email me:
peter@aspenmedia.com
Thank You
PS I apologize if this is not the correct place to post this message.
------------------------------
Date: Wed, 09 Apr 1997 22:35:03 -0600
From: jhardy@cins.com
Subject: Can it be done
Message-Id: <860642435.17965@dejanews.com>
Thanks to Andrew Johnson for all the help with the script. It works
perfect. It would have took me forever to figure it out, Or I would have
had to read the entire book.
John
jhardy@cins.com
www.cins.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 10 Apr 1997 02:03:57 GMT
From: Smith/Bean <"smithpr@gte.net"@gte.net>
Subject: CGI programming HELP!!!!!
Message-Id: <5ihhqd$8h0$1@news5.gte.net>
My question is do you have to compile the CGI or can you just write it
and use it to sort information? Please someone help and email me back
HHHHHHEEEEEEEELLLLLLLPPPPPPPP!!!! I really need to know!!
Thanks
Tim =^)
------------------------------
Date: Wed, 09 Apr 1997 22:29:59 -0500
From: Jean-Claude Magras <magrasjc@texas.net>
Subject: embedding perl in G++
Message-Id: <334C5EB7.1500@texas.net>
Greetings fellow PERL *HACKERS*,
I want to embed a PERL interpreter in my g++ 2.7.2.2 program but
there are conflicts with labels such as __P and multiply(function.h).
Has anyone else tried this?
This is on solaris 2.5.1-sparc using libg++ 2.7.2 and perl 5.
Thanks in advance,
J.C. Magras
--
Unix Software Engineer looking for C/UNIX/Motif/Perl/Tk/Flex
Software Engineering position in *NOW*. Currently in Austin at
(512) 672-5778/magrasjc@texas.net. have Answering machine.
------------------------------
Date: Wed, 09 Apr 1997 14:23:55 -0400
From: Paul S R Chisholm <psrc@exmachina.com>
To: Joe Orth <joeo@hpfcjoe.fc.hp.com>
Subject: Re: Error when using Accept
Message-Id: <334BDEBB.29F9@exmachina.com>
Joe Orth wrote:
> I also had an ALM signal handler running in my script. Whenever the
> alarm would go off (I can duplicated it using kill -14 <pid>), the
> accept would die with the error message that was in my previous post
> Is this the expected behavior?
Yeah, pretty much. There's a hint of this on the top of page 352 in Blue
Camel (1996).
See also the Blue Camel errata at:
http://www.perl.com/perl/critiques/camelrata/
and particularly (for chapter 6, Social Engineering):
http://www.perl.com/perl/critiques/camelrata/ch06.err
and really particularly the following section:
[351] Exchange these two lines:
$SIG{CHLD} = \&REAPER; # if you don't have sigaction(2)
$waitedpid = wait;
rendering these instead:
$waitedpid = wait;
$SIG{CHLD} = \&REAPER; # if you don't have sigaction(2)
[351] Right before the line in code that says
exit &$coderef();
Insert the line
$| = 1;
If that would cause an irrevokable page-break, then
merely delete the commented out line previous:
## open(STDERR, ">&STDOUT") or die "can't dup stdout to
stderr";
because it's not essential
[352] Logic error here that shows up on systems with
restartable syscalls (most, these days). Change this:
next if $waitedpid; # alternately, check for $! == EINTR
To this:
next if $waitedpid and not $paddr; # or check $! == EINTR
--
Paul S. R. Chisholm, AirMedia, Inc. (formerly Ex Machina)
mailto:psrc@exmachina.com http://www.exmachina.com/~psrc
I'm not speaking for the company, I'm just speaking my mind
------------------------------
Date: Wed, 09 Apr 1997 17:51:24 -0600
From: john.la@wrs.com
To: j-la@juno.com
Subject: How do you Parse a string?
Message-Id: <860625836.7913@dejanews.com>
Hi,
I'm writing a script in perl and I need to parse out a 5 number substring
from a large string. I can use the function substr() but first I need to
find out where the 5 numbers begin. I've tried using index() but it tries
to find an exact match to the substring and I need to find any 5 digit
number. Any Suggestions? Please reply!
-John
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Wed, 09 Apr 1997 11:49:55 -0700
From: Scott Brehm <sbrehm@jaycor.com>
Subject: Is there a problem with rindex in 5.003?
Message-Id: <334BE4D3.2FE3@jaycor.com>
I am working on a routine that needs to parse a string, and the
appropriate way to do it is with rindex. But I keep getting -1 (not
found) for characters that are in the string, i.e:
abc-1.2-3.i386.rpm (yes, it is a RedHat linux package name)
or
abc-new-2.3.1-6.i386.rpm
I need to pull off the .i386.rpm from the end, but in attempting to use
rindex($name,".",2) I get -1 as the result. Alpha characters don't work
either.
I am running perl 5.003 on RedHat 4.1 Linux. I have the llama book, but
the section on rindex mentions nothing peculiar.
What am I doing wrong?
------------------------------
Date: 10 Apr 1997 02:05:53 GMT
From: billy@cast.msstate.edu (Billy Chambless)
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Learning Perl
Message-Id: <5ihhu1$7h7$2@NNTP.MsState.Edu>
In article <8c912r2aa1.fsf@gadget.cscaper.com>, Randal Schwartz <merlyn@stonehenge.com> writes:
|> Glen> Shall I just concentrate on going through each chapter of shall I start
|> Glen> somewhere else in the book ?
|> It was actually meant to be read holding all the odd-numbered pages up
|> to a mirror, facing East of course, unless you're under the 25th parallel
|> on a Tuesday.[1]
I think this takes the award as "Best Humorous Answer to Incredibly
Boneheaded Question" for the month.
|> Or, for simpler instructions, *yes*... just read from the beginning
|> until you're tired of reading. Repeat as necessary. Joe Bob says "do
|> the exercises." If it was meant to be read a different way, you'd
|> have read that somewhere by now. :-)
But *Raaaaandaaaaal*, that exercises are *tooo haaaaaaAAAArd*!
---
[1] Apparantly, it was also meant to be read aloud while standing next
to the desk of a coworker who has asked something clever like how to
read from a file...
--
* "We all agree on the necessity of compromise. We just can't agree on
* when it's necessary to compromise."
* --Larry Wall in <1991Nov13.194420.28091@netlabs.com>
------------------------------
Date: 9 Apr 1997 18:07:19 GMT
From: whawkes@lynx.dac.neu.edu (walter hawkes)
Subject: list directory files in order of creation.
Message-Id: <5iglsn$1ht@chaos.dac.neu.edu>
I'm writing a program that reads the files in a directory and prints
them out in the order they were last modified.
I'm having a problem with getting them in the order they were created.
So that the newest files will be printed first.
This is about as far as I have gotten:
#!/usr/bin/perl
opendir(DIR,"path name") ||
die "Sorry couldn't open directory\n";
while ($file = readdir(DIR)){
print "$file\n";
}
I know I could probably use rewinddir or write my own sort function but
I'm not sure how.
If anyone could help me out with this it would be greatly appreciated.
Thanks,
Walter Hawkes
------------------------------
Date: 9 Apr 1997 17:59:59 GMT
From: scott@lighthouse.softbase.com ()
Subject: Re: No GUI environment for Perl?
Message-Id: <5iglev$f98$1@mainsrv.main.nc.us>
elarishy@aol.com wrote:
: Here what I am doing NOW, running under win95 .. I go to dos then edit
: then perl then reedit then perl then reedit .. get the picture ... can
: you help in making it easy for me to test and debug so I can enjoy perl
What you need is Emacs 19.34, which supports inferior shells.
You can edit, run, and debug from within Emacs.
Scott
------------------------------
Date: Wed, 09 Apr 1997 13:30:18 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: No GUI environment for Perl?
Message-Id: <334BE03A.332495C8@gpu.srv.ualberta.ca>
scott@lighthouse.softbase.com wrote:
>
> Nathan V. Patwardhan (nvp@shore.net) wrote:
> : elarishy@aol.com wrote:
>
> : : Here what I am doing NOW, running under win95 .. I go to dos then edit
> : : then perl then reedit then perl then reedit .. get the picture ... can
> : : you help in making it easy for me to test and debug so I can enjoy perl
>
> : What's wrong with keeping one MS-DOS window open with your editor buffer,
> : and another for your command-line, from which you will run your Perl
> : programs? :-)
>
> Or just use Emacs and open a shell window and the source code.
>
> Scott
or get linux and use EdithPro/X11 editor,
mine is set up to call perl -w on the current script or
any selected portion with ctr-F9, with output
to a read only browser window...and ctr-F10
will run it though a perl script which evals,
traps errors, and outputs them to another browser
window as 'clickable' links to open whatever file
the error occured in and jump to the offending, error
causing line (or nearby depending on the error :-)
andrew
------------------------------
Date: 09 Apr 1997 12:22:19 -0700
From: David Welton <davidw@efn.org>
Subject: Re: No GUI environment for Perl?
Message-Id: <87d8s4j91w.fsf@efn.org>
elarishy@aol.com writes:
> Here what I am doing NOW, running under win95 .. I go to dos then edit
> then perl then reedit then perl then reedit .. get the picture ... can
> you help in making it easy for me to test and debug so I can enjoy perl
Oh, what the heck, let the flames begin!
Install a real operating system on your computer such as linux or
freebsd that permits you to do neat things like multitasking:-) In a
windowing environment. For free:-) Check out www.linux.org or
www.freebsd.org , and have fun!
Ciao,
--
David Welton
davidw@efn.org davidw@freenet.hut.fi http://www.efn.org/~davidw
Se quest'email e` in Italiano, mi dispiace per gli errori:-) FORZA PANTANI!
--Linuxista--
------------------------------
Date: Wed, 09 Apr 1997 20:13:13 -0700
From: "Charles F. Ritter" <critter@quack.kfu.com>
Subject: perl IPC problem
Message-Id: <334C5AC9.1CA072FD@quack.kfu.com>
I'm trying to enhance a report writer running on DEC unix via perl. The
problem is that the report writer will only run in the background if it
finds exported shell variables called GEN_GO and GEN_USER. I've used
perl to manipulate the values of the variables - GEN_GO and GEN_USER -
but now I don't seemingly have a way to export them and call the report
writer.
My choices are 1) find a way or 2) go back to the Korn shell. The
pre-perl background job looks like this:
#!/usr/bin/ksh
GEN_GO = "my report command text"
GEN_USER = "ME"
export GEN_USER GEN_GO
nohup /usr/bin/pro5 -m100 -c/my.conf GEN4 > /dev/null &
EOF
I'd like to do something like this:
#!/usr/bin/perl -w
open(SCRIPT,"myscript");
$command = <SCRIPT>;
$command =~ s/something_boring/something_interesting/g;
$ENV{GEN_GO} = $command;
$ENV{GEN_USER} = "ME";
export $ENV{GEN_USER} $ENV{GEN_GO};
system('nohup /usr/bin/pro5 -m100 -c/my.conf GEN4 > /dev/null')
EOF
Of course this is just a simplified version of "something_interesting
and psuedo-perl(if it worked I wouldn't be here &-) ). Is there a way to
make this work? System V IPC/shmwrite/shmread? Your help is greatly
appreciated.
--
Charles Ritter
Microsoft NT - when they are finally finished it will be the best
documented unix operating system on the market, but you'll pay extra for
it.
------------------------------
Date: 10 Apr 1997 04:26:56 GMT
From: friedman@medusa.acs.uci.edu (Eric D. Friedman)
Subject: Re: Placing info at the top of a file
Message-Id: <5ihq6g$aul@news.service.uci.edu>
[mailed, posted]
In article <334BEAA5.33FC@elvis.turner.com>,
Brian Haney <bhaney@elvis.turner.com> wrote:
>In PERL 5.00x I need to add text on top of the previous line of text in
>a text file. Does anyone have a suggestion?
I suggest that you consult the FAQ at http://www.perl.com/perl/
where you'll find the following:
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?
Good luck,
Eric
--
Eric D. Friedman
friedman@uci.edu
------------------------------
Date: Thu, 10 Apr 1997 03:57:44 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Placing info at the top of a file
Message-Id: <E8ELo8.K8M@presby.edu>
Brian Haney <bhaney@elvis.turner.com> wrote:
>In PERL 5.00x I need to add text on top of the previous line of text in
>a text file. Does anyone have a suggestion?
1. Open the new file.
2. Write the new text.
3. Open the old file.
4. Copy (append) the old file to the new file.
5. Close the files.
6. Rename the new file to the old file.
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
------------------------------
Date: Thu, 10 Apr 1997 00:28:51 -0400
From: Chuck Ocheret <chuck@NYC.Thinkbank.COM>
Subject: problem with DB_File/DB_RECNO?
Message-Id: <334C6C83.FA@NYC.Thinkbank.COM>
I can't seem to get the DB_RECNO type of DB_File tie to work properly.
Basically push seems to have no effect and Perl seems to lose track of
the length of arrays tied this way. Perhaps I'm not using it properly.
Here's the version I'm using (along with db.1.85) - same problem under
Solaris 1 and 2.
chuck@gigi 315$ perl -v
This is perl, version 5.003 with EMBED
built under sunos at Apr 5 1997 00:29:59
+ suidperl security patch
...
Here's an annotated copy of a Perl debugger session where I demonstrate
what seems wrong to me...
Preamble...
chuck@gigi 323$ perl -de {}
Stack dump during die enabled outside of evals.
Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.
Enter h or `h h' for help.
main::(-e:1): {}
DB<1> use DB_File; use Fcntl
DB<2> $flags = O_RDWR | O_CREAT | O_TRUNC
Here is where I tie the file to an array...
DB<3> p tie @foo, "DB_File", "foo.db", $flags, 0640, $DB_RECNO
DB_File=SCALAR(0x1b7a90)
DB<4> X foo
@foo = (
empty array
)
So far so good...
DB<5> p push @foo, 1, 2, 3
0
DB<6> X foo
@foo = (
empty array
)
DB<7> p $#foo
-1
Lines 6 and 7 don't look very good but at least they're wrong in a
consistent way. So maybe just push doesn't work properly. So lets try
something 'simpler'...
DB<8> $foo[3] = 42
DB<9> p $foo[3]
42
That looks great but...
DB<10> X foo
@foo = (
empty array
)
DB<11> p $#foo
-1
Perl isn't aware that the array should have grown. Hmmm, maybe it is
confused because there aren't defined entries at the beginning of the
array (hope springs eternal).
DB<12> @foo[0, 1, 2, 3] = ('this', 'is', 'a', 'test')
DB<13> X foo
@foo = (
empty array
)
DB<14> p $#foo
-1
Nope, that's not it.
DB<15> p "'@foo[0, 1, 2, 3]'"
'this is a test'
DB<16> p "'@foo'"
''
See, the data is really in there but the length is incorrect so
interpolation won't work. Let's try a native Perl array to see if I've
lost my mind and just have the syntax wrong or something (I'm new enough
to Perl - or at least don't use it often enough - that this could be the
case) ...
DB<17> @array[0, 1, 2, 3] = ('hovercraft','full','of','eels')
DB<18> X array
@array = (
0 'hovercraft'
1 'full'
2 'of'
3 'eels'
)
DB<19> p $#array
3
DB<20> p "'@array'"
'hovercraft full of eels'
DB<21> p push @array, 1, 2, 3
7
DB<22> p $#array
6
DB<23> X array
@array = (
0 'hovercraft'
1 'full'
2 'of'
3 'eels'
4 1
5 2
6 3
)
DB<24> p "'@array'"
'hovercraft full of eels 1 2 3'
That all seems to work fine. So what's wrong with my tied array?
Any assistance would be heartily welcomed - the more promptly the more
heartily ;-)
Thanks,
~chuck
--
Chuck Ocheret ---------------------------------- chuck@NYC.Thinkbank.COM
Thinkbank, Inc. http://www.Thinkbank.COM/
648 Central Park Avenue, Suite 248 +1 (914) 722-0245 [voice]
Scarsdale, NY 10583 +1 (914) 722-0249 [fax]
------------------------------
Date: Wed, 09 Apr 1997 20:33:41 +0200
From: Volker Metzler <metzler@imib.rwth-aachen.de>
Subject: Q:rounding
Message-Id: <334BE105.3FA2@imib.rwth-aachen.de>
Dear Perl Experts,
I've got a beginners question, hope you don't mind.
I am looking for a rounding function, is
is there one available in perl5?
thanks for your help,
Yours Volker
--
Volker Metzler, Institut fuer Medizinische Informatik und Biometrie
> RWTH Aachen, Germany, Tel:+49-241-80-88382, Fax:+49-241-8888426 <
> http://www.imib.rwth-aachen.de/www/mitarb/volker ....... <
> mailto:metzler@imib.rwth-aachen.de ..................... <
------------------------------
Date: 9 Apr 1997 18:47:38 GMT
From: vaccime@ripco.com (Metameme 7)
Subject: Re: Radius, a perl for your thoughts
Message-Id: <5igo8a$aff$1@gail.ripco.com>
[posted and mailed]
In article <334AE470.63EE@mail.foxnet.net>,
Andrew Brigham <abrigham@foxnet.net> wrote:
> Got a problem parsing radius logs... script below
For those who don't know, RADIUS is an authentication protocol used
for verifying dialup users' access to model pools and their associated
network devices.
I've hacked up a reasonably functional program (written in Perl, of course)
to parse the accounting files generated by RADIUS into listings that look
like the one shown below. Start and Stop times are in full date(1)-style
format. Fields with [...] have been truncated for posting.
user:
Session Start Stop Time In Out Server Client Port
-------- -------- -------- -------- ------ ------ ------ ---------- ----
4C00004F Thu[...] Thu[...] 3:00 pm2 dial1[...] 5
4C000058 Thu[...] Thu[...] 10:16 14K 136K pm2 dial1[...] 12
4C000061 Thu[...] Thu[...] 7:25 6K 157K pm2 dial1[...] 6
4C00006B Thu[...] Thu[...] 13:35 988 828 pm2 dial1[...] 1
4C0000E8 Fri[...] Fri[...] 14:48 6K 49K pm2 dial1[...] 2
4C00015E Fri[...] Fri[...] 48:22 48K 1M pm2 dial1[...] 5
4C000196 Fri[...] Fri[...] 1:33 1K 10K pm2 dial1[...] 5
4C0001CE Fri[...] Fri[...] 0:55 1K 4K pm2 dial1[...] 26
4C0001D3 Fri[...] Fri[...] 11:54 61K 681K pm2 dial1[...] 14
Total 1h 51:48 141K 2M
The program compensates for the sorts of accounting errors that RADIUS is prone
to, such as duplicate Start/Stop entries for a session and missing Start/Stop
records.
I'll be happy to mail the code to anyone who would find it useful.
[...]
> ___________________________________________________
> Andrew Brigham
> abrigham@foxnet.net
--
vaccime@ripco.com
------------------------------
Date: Wed, 9 Apr 1997 18:30:56 GMT
From: Fredrik Lundh <Fredrik_Lundh@ivab.se>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <9704091830.AA21618@arnold.image.ivab.se>
> | This can easily be verified if you look at job offerings on the Net with
> | Smalltalk as keyword.
> Smalltalk, Ada, and Lisp jobs are not advertised in the mass media
>From Computerworld, October 1996 ("big cry for smalltalk")
/.../
For example, Source Services Corp., a Washington-area recruiting firm,
had more than 200 openings for Smalltalk programmers in the first half
of this year, compared with 77 openings in the same period last year.
Demand for C++ talent, on the other hand, is declining.
For the same period, Source Services had 140 C++ positions, down from
175 a year earlier, according to Paul Villella, managing partner at
the company's Tyson's Corner, Va., office.
/.../
Everything is relative, I suppose...
On the other hand, I've started seeing more and more Python ads
lately. Guess we're doomed ;-)
Cheers /F (http://hem1.passagen.se/eff)
------------------------------
Date: Wed, 09 Apr 1997 19:32:59 -0400
From: "Michael D. Kersey" <mdkersey@hal-pc.org>
To: Smiljan Grmek <Smi@4mate.hr>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334C272B.6A55@hal-pc.org>
Smiljan Grmek wrote:
>
> Michael Sperber [Mr. Preprocessor] wrote:
>
> >
> > Anyone who has to read and write production code in Perl or Tcl or C++
> > within the same period as, say, Scheme, can testify to that.
> [ie Scheme is better]
> >
>
> *Anyone* is a fairly large concept - please go find an average
> programmer without experience in Tcl and Scheme, present him/her with
> appropriate manuals and have h/h read/write code ...
>
> Even a thought experiment gives correct results (if one bears in mind
> the Gaussian distribution of human attributes - necessary for the
> definition of *average* programmer)
>
> Talk to a pschologist friend about averages and you will find out where
> those who meet at the Net stand. I tested a friend's contention that you
> cannot talk to an IQ 100 - he was mostly right and it was a saddening
> experience.
>
> Smi
Hi Smi,
How did you arrange this? Is there some sort of "sub-Mensa" group
available for (limited) discussions?
I think I agree with you. My personal estimate is that the great
unwashed masses of programmers would not desire to work in Tcl, Scheme,
C++ or Perl, nor would they be particularly adept in those languages,
though most could learn if forced to(a loaded gun is a marvelous
motivator). They are (unfortunately) happy with either Basic or Cobol.
Good Luck,
Michael D. Kersey
------------------------------
Date: 10 Apr 1997 00:31:59 -0400
From: mkagalen@lynx.dac.neu.edu (Michael Kagalenko)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5ihqfv$fof@lynx.dac.neu.edu>
Paul Wilson (wilson@cs.utexas.edu) wrote in article <5iafs1$fh4@roar.cs.utexas.edu> <pre><blink>
]
]The main benefits that the Tcl hackers I know get form Tcl are an
]interactive command loop, and a standard way of gluing together code
]in other languages, and a standard, fairly functional graphics toolkit.
]Those are great things, and you're to be applauded for realizing they're
]crucial for writing glue code before most other people did! (It certainly
]should embarrass the hell out of the programming languages community, of
]which I'm a part.)
]
]An interactive command loop is incredibly valuable for increasing
]productivity over the usual compile-link-run-crash cycle. What's
]sad is how many Tcl programmers there are now who've never used
]any other interactive language, and think Tcl is great because it
]has that huge advantage over C++.
I think you'll excuse me for another mention of NeXT programming
environment, based on dynamically-typed language. Interface
builder allows you to create, change and test interface without
compiling it. I do not know of any analog of this tool.
------------------------------
Date: 9 Apr 1997 09:51:22 -0700
From: lcole@best.com (Len Coleman)
Subject: security without a secure server
Message-Id: <lcole.860604234@shellx>
Keywords: security secure
Can a Perl script provide a reasonable level of security for credit card
transactions without the protection of a secure server?
In non-Web transactions, we do not ask for secuity with most credit card
use. Are the risks greater for credit card abuse/theft in Web transactions?
Where are the actual dangers in credit card processing, and how can those
dangers be reduced by good scripts?
While the best answer may be a secure server, that option may not be possible
for low volume startups. Can Perl help?
------------------------------
Date: 10 Apr 1997 04:22:46 GMT
From: friedman@medusa.acs.uci.edu (Eric D. Friedman)
Subject: Re: still a problem passing filehandle to subroutine
Message-Id: <5ihpum$au3@news.service.uci.edu>
[mailed, posted]
In article <5iedqn$eos@news.fsu.edu>, Justin C Lloyd <lloyd@cs.fsu.edu> wrote:
>
>Am I missing something obvious?
Why not use FileHandle? it'll return a reference to a filehandle when
you use it to open a file, and you can pass that reference around as
much as you like. If you insist on not using the free re-usable code
that's part of the standard distribution, however, you might look at
said code to see how it's done!
> m|^Print Date:\s*(\d{1,2}/\d{1,2}/\d{1,2})|i and $print_date = $&;
You might give some thought to how you could rework this code so that
$& is not used. As Friedl's book on regular expressions indicates,
there's a significant penalty associated with its use anywhere in
your code.
HTH,
Eric
--
Eric D. Friedman
friedman@uci.edu
------------------------------
Date: Wed, 09 Apr 1997 23:35:17 -0500
From: Ray McVay <rmcvay@acm.org>
Subject: Re: system LIST && die NOT system LIST || die ??
Message-Id: <334C6E05.3376@acm.org>
Ken Anderson wrote:
>
> page 154 of the llama book indicates that
>
> system LIST
>
> works "backwards from normal Perl operator convention"
> in that the example shown indicates it should be used like
> this:
>
> system LIST && die LIST;
>
> as opposed to a "normal" construct:
>
> perl-operator LIST || die LIST;
>
> This is, i'm sure, the source of my current problem,
> but i still don't quite "get it". Can anyone explain?
System calls tend to return zero on success.
------------------------------
Date: Wed, 09 Apr 1997 14:50:58 -0400
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Re: timelocal strangeness and my obvious insanity... :)
Message-Id: <ken-0904971450580001@news.swarthmore.edu>
Hi-
The problem is that there are only 30 days in April. The input to the
timelocal functions is exactly the same as the output of the localtime
functions. Therefore, the numbering of months begins with 0:
0 => Jan
1 => Feb
2 => Mar
3 => Apr
So it's doing its best to guess what you meant: you said that $scalar1 was
to be the 59th second of the 59th minute of the 23rd hour of the 31st day
of April, 1997, and that time doesn't exist.
In article <01bc4455$33aee4a0$ccc69f96@dunt0008>, "Peter Dohm"
<dohmp@lci.com> wrote:
> require "timelocal.pl"
>
> $scalar1 = timegm(59,59,23,31,3,97);
> $scalar2 = timegm(0,0,0,1,4,97);
>
> print "below we should see a result of one second:\n";
> print "scalar2 - scalar1 =";
> print $scalar2-$scalar1;
> print "\n";
-Ken Williams, The Math Forum
ken@forum.swarthmore.edu
------------------------------
Date: 9 Apr 1997 18:35:58 GMT
From: heller@nacs.net (Jettero Heller)
Subject: Re: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <5ignie$mfr@tracy.nacs.net>
Tim Behrendsen (tim@a-sis.com) wrote:
: Anthony Boyd <anthony@outshine.com> wrote in article
: <anthony-0804972321130001@anthony.outshine.com>...
: > "Tim Behrendsen" <tim@a-sis.com> wrote:
: > > But I don't even need to go there. Name one freely available
: > > *significant* product that is *clearly* better than *any* commercial
: > > product, regardless of price.
: >
: > Tim, are you *trying* to prove Peter's point? Good free product is
: > everywhere, in such abundance that I can't believe you'd think it's not.
:
: I didn't say that there weren't good, or even excellent free
: products around. I said name one that is better than *ANY*
: commercial software, *REGARDLESS* of price, and of sufficient
: complexity.
:
: > GifBuilder is free and the best GIF animator I've used.
:
: That you've used; you think it's better than professional animation
: programs that movie studios use?
I'm not gonna go too indepher here, but you do have to specify also
"for the job it was designed". Therefor you *CANNOT* compare a
"professional animation" program to a "gif animator". A gif animator
is exactly that, somethint that strings together a series of gifs
and makes a single GIF89a animated gif. It has *nothing* to do with
professional animation. Just like you *cannot* compare straight vi
to MS Word or Pagemaker. One is a simple text editor, the other is a
full fledged wordprocessor or desktop publisher. There is no
comparisson there.
And besides, who's to say that he hasn't used a professional
animation program? You've followed his entire life?
** Heller
--
http://www.nacs.net/cgi-bin/heller/jokes
http://www.nacs.net/~heller/
Never count your chickens before they rip your lips off
Everybody wants to go to heaven, but nobody wants to die.
------------------------------
Date: 9 Apr 1997 19:07:30 GMT
From: ell@access1.digex.net (Ell)
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <5igpdi$577@news4.digex.net>
Kaz Kylheku wrote:
>
> The fact that UNIX is a pun on Multics is no urban legend, but a simple
> historic fact. If you don't believe Lawrence Kirby, please write mail to
> Brian Kernighan.
I read this fact a few years ago here on Usenet in an article by a guy who
claimed to have co-wrote Multics. I've also read it numerous other
places.
Elliott
------------------------------
Date: 09 Apr 1997 14:35:09 -0500
From: kgor@inetspace.com (Kent S. Gordon)
Subject: Why are no elements returned from split(/X/,'')?
Message-Id: <x6sp103s7m.fsf@chess.inetspace.com>
Why are no elements returned from split(/X/,'')?
given the below perl script
$blank_string='';
$non_blank_string=' ';
@foo= ( '' );
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = ( $blank_string );
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = ( ' ' );
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = ( $non_blank_string );
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = split (/X/,'');
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = split (/X/,$blank_string);
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = split (/X/,' ');
print "NUMBER of FOO's: ",$#foo, "\n";
@foo = split (/X/,$non_blank_string);
print "NUMBER of FOO's: ",$#foo, "\n";
This is output.
NUMBER of FOO's: 0
NUMBER of FOO's: 0
NUMBER of FOO's: 0
NUMBER of FOO's: 0
NUMBER of FOO's: -1
NUMBER of FOO's: -1
NUMBER of FOO's: 0
NUMBER of FOO's: 0
Why do not all @foo's have a single element?
I would expect that the same number of elements should be returned
from both with the difference being that $foo[0] as '' instead of '
'. This behavior is different than I would expect from looking at the Camel
Book (2nd Edition) under split (p220) which talks about returning the
original string if the string being split does not have the delimiter
in it. I tested and this behavior is the same under perl 5.003 and
perl 4.036.
--
Kent S. Gordon
Senior Software Engineer
INetSpace Co.
voice: (972)851-3494 fax:(972)702-0384 e-mail:kgor@inetspace.com
------------------------------
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 265
*************************************