[11458] in Perl-Users-Digest
Perl-Users Digest, Issue: 5060 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 4 20:07:31 1999
Date: Thu, 4 Mar 99 17:02:32 -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 Thu, 4 Mar 1999 Volume: 8 Number: 5060
Today's topics:
Re: Getting rid of ^M <uri@ibnets.com>
Re: Getting rid of ^M <emschwar@mail.uccs.edu>
Re: Getting rid of ^M <jbc@shell2.la.best.com>
Re: Getting rid of ^M <uri@ibnets.com>
Re: Getting rid of ^M <uri@ibnets.com>
Re: Getting rid of ^M <jeromeo@atrieva.com>
Re: Getting rid of ^M <emschwar@mail.uccs.edu>
Re: Getting rid of ^M <emschwar@mail.uccs.edu>
Re: grep oddity - looking for explaination (Larry Rosler)
How to submit a post inside a perl script? robert5045@my-dejanews.com
Re: How to submit a post inside a perl script? (brian d foy)
Re: I've flocked up (Andrew M. Langmead)
Re: mSQL and Perl: Parsing SELECT data (brian d foy)
Number of decimal places in Perl matthew_keene@ansett.com.au
Re: Perl - deleting files that are 2 days old (Rich)
Re: Please, An example of win32::NetResourse. <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
Program to run awhile starting from browser (Robert Saunders)
Re: Regex example from Camel book <staffan@ngb.se>
Re: Securing files in a password protected area <aidan.curran@agilesoft.com>
Sorting trouble. Almost solved. Final touch needed. <par@removethis.bahnhof.se>
SSH Authentication in Perl (K. Krueger)
Re: The truth about the Pentium III chip and ID --- **b (Barry Keeney)
Updating Access database using Perl/CGI <michael.geehan@kcl.ac.uk>
Re: URGENT! Where Do You Hide The CGI Cards From The Sp <zenin@bawdycaste.org>
Re: URGENT! Where Do You Hide The CGI Cards From The Sp <zenin@bawdycaste.org>
Re: URGENT! Where Do You Hide The CGI Cards From The Sp (Larry Rosler)
Use 'get' to get cgi output? <phil.yeo@ukonline.co.uk>
Using system command with ftp <brownpatrick@lucent.com>
Re: Using system command with ftp (brian d foy)
Re: Using system command with ftp <emschwar@mail.uccs.edu>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 04 Mar 1999 18:24:25 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Getting rid of ^M
Message-Id: <39vhgghm8m.fsf@ibnets.com>
>>>>> "JG" == Jay Glascoe <jglascoe@giss.nasa.gov> writes:
JG> perl -ne 's/\cM//g; print' < infile > outfile
why do all that typing?
perl -i.bak -pe 'tr/\cM//d' file
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: 04 Mar 1999 16:54:48 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Getting rid of ^M
Message-Id: <xkfzp5shktz.fsf@valdemar.col.hp.com>
Jay Glascoe <jglascoe@giss.nasa.gov> writes:
> foreach (<IN>) { chop; print OUT; }
ITYM "while(<IN>) { chomp; print OUT "$_\n"; }"
Though in this case tr is probably faster:
perl -n -e 'tr/\cM//; print;' foo > foo.out
-=Eric
------------------------------
Date: 04 Mar 1999 23:51:47 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Getting rid of ^M
Message-Id: <36df1c93$0$208@nntp1.ba.best.com>
Uri Guttman <uri@ibnets.com> wrote:
> perl -i.bak -pe 'tr/\cM//d' file
Just out of curiousity, are there reasons why that would be superior
to:
perl -i.bak -pe 's/\r\n/\n/' file
which is how I did this just now on a batch of files with DOS
line-endings I had to process?
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 04 Mar 1999 19:05:20 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Getting rid of ^M
Message-Id: <39u2w0hkcf.fsf@ibnets.com>
>>>>> "JC" == John Callender <jbc@shell2.la.best.com> writes:
JC> Uri Guttman <uri@ibnets.com> wrote:
>> perl -i.bak -pe 'tr/\cM//d' file
JC> Just out of curiousity, are there reasons why that would be superior
JC> to:
JC> perl -i.bak -pe 's/\r\n/\n/' file
tr/// is faster than s///. also mine removes ^M anywhere and not just
after a \n (which may be good or bad depending on the problem).
too many perl hackers don't know when to use tr/// over s///. it is a
good thing to study and know. when changing or deleting single chars, tr
is almost always faster and simpler.
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: 04 Mar 1999 19:06:11 -0500
From: Uri Guttman <uri@ibnets.com>
To: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Getting rid of ^M
Message-Id: <39sobkhkb0.fsf@ibnets.com>
>>>>> "ETR" == Eric The Read <emschwar@mail.uccs.edu> writes:
ETR> Jay Glascoe <jglascoe@giss.nasa.gov> writes:
>> foreach (<IN>) { chop; print OUT; }
ETR> ITYM "while(<IN>) { chomp; print OUT "$_\n"; }"
ETR> Though in this case tr is probably faster:
ETR> perl -n -e 'tr/\cM//; print;' foo > foo.out
it is good that you are using tr! but why are you doing a print and not
using -p?
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Thu, 04 Mar 1999 16:19:02 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
Subject: Re: Getting rid of ^M
Message-Id: <36DF22F6.1A82584A@atrieva.com>
John Callender wrote:
>
> Uri Guttman <uri@ibnets.com> wrote:
>
> > perl -i.bak -pe 'tr/\cM//d' file
>
> Just out of curiousity, are there reasons why that would be superior
> to:
>
> perl -i.bak -pe 's/\r\n/\n/' file
tr/// is more efficient than s///.
#!/usr/local/bin/perl -w
use Benchmark;
my($string) = 'abcdefghijklmnop';
timethese(100000,
{
'TR' => sub { $string =~ s/abcd/efgh/ },
'S' => sub { $string =~ tr/abcd/efgh/ },
}
);
Benchmark: timing 100000 iterations of S, TR...
S: 40 wallclock secs ( 3.00 usr + 0.00 sys = 3.00 CPU)
TR: 19 wallclock secs ( 2.43 usr + 0.00 sys = 2.43 CPU)
Although, I have been known to get into trouble with benchmarks...
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 04 Mar 1999 17:31:38 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Getting rid of ^M
Message-Id: <xkfhfs0hj4l.fsf@valdemar.col.hp.com>
John Callender <jbc@shell2.la.best.com> writes:
> Uri Guttman <uri@ibnets.com> wrote:
> > perl -i.bak -pe 'tr/\cM//d' file
>
> Just out of curiousity, are there reasons why that would be superior
> to:
>
> perl -i.bak -pe 's/\r\n/\n/' file
>
> which is how I did this just now on a batch of files with DOS
> line-endings I had to process?
tr is *much* faster than regexes.
-=Eric
------------------------------
Date: 04 Mar 1999 17:59:00 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Getting rid of ^M
Message-Id: <xkfbti8hhuz.fsf@valdemar.col.hp.com>
Uri Guttman <uri@ibnets.com> writes:
> it is good that you are using tr! but why are you doing a print and not
> using -p?
As I mentioned in email, habit. I tend to debug one-liners with -n and
print, and then change to -p; this time I got it right the first time,
and didn't bother "fixing" it.
-=Eric
------------------------------
Date: Thu, 4 Mar 1999 15:46:16 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: grep oddity - looking for explaination
Message-Id: <MPG.1148bb276d719eab9896e2@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <36DF0B19.ED39814F@landolittlepeople.com> on Thu, 04 Mar 1999
15:37:13 -0700, Sandy Maple <sandym@landolittlepeople.com> says...
> In order to fix the bug I was working on, I changed line 12 in the source
> code from
>
> $exists=grep(?$dir?i, @uniqueDirs);
>
> to
>
> $exists=grep(/$dir/i, @uniqueDirs);
>
> and the grep works just fine. I didn't expect this to work because the
> search string, $dir, contains the character '/' so, logically, the grep
> should misinterpret the first '/' it comes to as the end of the search
> string, but it doesn't. I figure I have some reading to do...
You missed the special esoteric properties of the ?? regex delimiters,
which mean 'match once only, until reset'.
The reason why the regex with /$dir/ delimiters doesn't care about
slashes in the interpolated string is that the syntax tree is determed
at compile time, while the contents of $dir aren't known until run time.
This is typical of all interpolations. For example,
my $bar = '"';
print "foo $bar baz\n";
The double-quote in $bar is printed. It doesn't terminate the string.
How could it?
--
Larry Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 04 Mar 1999 23:49:54 GMT
From: robert5045@my-dejanews.com
Subject: How to submit a post inside a perl script?
Message-Id: <7bn66v$c1j$1@nnrp1.dejanews.com>
How to submit a post inside a perl script? How can I achieve to make a post
by running a script (not using any web browser )?
Thanks!
Robert
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 04 Mar 1999 19:28:59 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: How to submit a post inside a perl script?
Message-Id: <comdog-ya02408000R0403991928590001@news.panix.com>
In article <7bn66v$c1j$1@nnrp1.dejanews.com>, robert5045@my-dejanews.com posted:
> How to submit a post inside a perl script? How can I achieve to make a post
> by running a script (not using any web browser )?
use LWP;
see the LWP docs for more details.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 3 Mar 1999 13:58:53 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: I've flocked up
Message-Id: <F80uu6.KvI@world.std.com>
Lee Howells <lee@easypress.co.uk> writes:
>Do you get an error trying to open a locked file or does the system wait
>until the file is available again and then allow access?
It depends on whether the LOCK_NB flag is set or not. By default, a
call to flock() will tell the kernel to put the process to sleep if
the file is locked by someone else, but if you give it the LOCK_NB
flag, it returns immediately and you can determine from the calls
return value whether you have the lock or not. See the entry for flock
in the perlfunc man page for details.
If you want to wait a certain amount of time for a lock, then you
might want look into $SIG{ALRM} and the alarm() function. (But then
you have to deal with shaky signal handling mechanism in some versions
of perl.)
--
Andrew Langmead
------------------------------
Date: Thu, 04 Mar 1999 18:28:43 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: mSQL and Perl: Parsing SELECT data
Message-Id: <comdog-ya02408000R0403991828430001@news.panix.com>
In article <36DF0E26.41BD1A7B@tampabay.rr.com>, saij <saij@tampabay.rr.com> posted:
> Where is data stored after a statement like:
>
> my $sth = $dbh->prepare("CREATE TABLE NEWS(F_NAME CHAR(20) NOT NULL,
> L_NAME CHAR(20) NOT NULL,
> EMAIL CHAR(40) NOT NULL)");
there isn't any data there. you are only creating a table.
the mSQL and DBI docs are what you want to be reading :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 05 Mar 1999 00:43:16 GMT
From: matthew_keene@ansett.com.au
Subject: Number of decimal places in Perl
Message-Id: <7bn9b2$eqd$1@nnrp1.dejanews.com>
Can anyone tell me how the default number of decimal places gets set in Perl.
If I run:
$decimal1 = 1/6 ;
print "Decimal value is $decimal1\n" ;
I get:
Decimal value is 0.166666666666667
I can round the value using int, printf or sprintf, but I'm interested about
the default behaviour, and whether I can modify it.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 04 Mar 1999 23:24:00 GMT
From: richm@ucesucks.rochester.rr.com (Rich)
Subject: Re: Perl - deleting files that are 2 days old
Message-Id: <slrn7du5ph.96k.richm@ll.aa2ys.ampr.org>
On 4 Mar 1999 19:07:33 GMT, KLMN2 <klmn2@aol.com> wrote:
>Hi -
> I am trying to write code for a Perl script which would delete all files in
>a certain directory which are over 2 days old. If anyone can help me, I would
>greatly appreciate it. (This is on a UNIX machine).
>
Well, since you should always use the right tool for the job:
man find
- Rich
--
Rich Mulvey
http://mulvey.dyndns.com
Amateur Radio: aa2ys@wb2wxq.#wny.ny.usa
------------------------------
Date: Thu, 4 Mar 1999 15:14:37 -0800
From: "Dave Roth" <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
Subject: Re: Please, An example of win32::NetResourse.
Message-Id: <IsED2.9605$YV6.4521@news2.giganews.com>
mirak63@my-dejanews.com wrote in message
<7bm9mu$h1g$1@nnrp1.dejanews.com>...
>That's correct for Windows networking. However, if you need to attach to a
>Netware 3.XX system you indeed need to add values to the password / id
>fields. I found out that using the Guest ID to attach with didn't work to
>well. I can't figure out how to enter no password for a password. When:
>
>if (Win32::NetResource::AddConnection(\%NetResource,$passwd,$id))
>
>If the $id = guest, how do you insert <enter> as the password.
Sounds like someone needs to open the source and make modifications.
It sounds like a fairly trial fix. Anyone willing?
dave
--
=================================================================
Dave Roth ...glittering prizes and
Roth Consulting endless compromises, shatter
http://www.roth.net the illusion of integrity
Win32, Perl, C++, ODBC, Training
rothd at roth dot net
Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/
------------------------------
Date: Thu, 04 Mar 1999 23:00:26 GMT
From: robert@iminet.com (Robert Saunders)
Subject: Program to run awhile starting from browser
Message-Id: <03F90E6B4ECEC19C.A8CAC56DDBF1821C.425C1D507D0FD2BF@library-proxy.airnews.net>
Question
I am about to work on a program that will be started from a browser,
the crunching it will be doing may take several minutes.. the problem
that I have had in the past with trying to do something like this is
when I click on a link that is going to take lets say 10 minutes to do
different things on the server.. the browser has the hour glass and
then finally times out..
What I would like to do is have a button to click on and it starts the
job and releases the program to do other things while the 10 minutes
are passing even possiblily giving some sort of a update of what stage
the program is in..
The program is a newsletter program that does a mail out.. I have it
working so when it starts up it doesnt dump 3000 names on the mail
server but trickles out a amount every minute till the list is done..
that way I am not killing my mail server to do the mailing list.. I
have discovered that once I click on the button I can hit the stop
button and the process is not stopped and I can do other stuff even
start on a new list.. but it would be nicer to have a cleaner way to
do this..
What I am asking for here is a direction to look for documentation to
make all this work.. and some pointers and ideas from the wiser people
of the group of readers..
Thanks..
Robert Saunders
robert@iminet.com
------------------------------
Date: Fri, 05 Mar 1999 00:08:02 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: Regex example from Camel book
Message-Id: <36DF1252.AC90B804@ngb.se>
Robert E Webb wrote:
>
> 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
>
> The regex works for all except the last example, it adds commas to the
> right of the decimal point. Dosn't the atom (?!\d) say "up to
> something not a number"? If so, why is the regex adding commas to the
> right of the decimal?
Well, (?!\d) is a zero-width lookahead, so i think it might match end of
string.
> $qq =~ 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
I think the uninitialized value is $_. I don't really like this form of
the statement. I also think you are missing a '+'. Try
while( s/(\d+)(\d\d\d)(?!\d)/$1,$2/ ){}
^
also, this acts on $_. so if you want it to act on $qq, you should write
it like this:
while( $qq =~ s/(\d+)(\d\d\d)(?!\d)/$1,$2/ ){}
You should read my resent and lengthy post in clp.moderated for a
detailed explanation on the issue, but here's how to get it all (before
and after decimal point) correctly:
while( s/(^|[^\d\.])(\d+)(\d\d\d)/$1$2,$3/ ){}
while( s/(\d+)(\d\d\d)/$1,$2/ ){}
It also gets numbers in the middle of strings correctly. See
clp.moderated.
HTH
Staffan
------------------------------
Date: Thu, 4 Mar 1999 14:47:00 -0800
From: "Aidan Curran" <aidan.curran@agilesoft.com>
Subject: Re: Securing files in a password protected area
Message-Id: <7bn5sp$49p$1@ffx2nh3.news.uu.net>
My server is NT/IIS
------------------------------
Date: Thu, 04 Mar 1999 23:28:25 GMT
From: "Par Svensson" <par@removethis.bahnhof.se>
Subject: Sorting trouble. Almost solved. Final touch needed.
Message-Id: <tGED2.14$5R.2106@dummy.bahnhof.se>
Thank you all for your suggestions. I have checked out
the various suggestions and documents and decided to go
a tad slowly forwards, rather than use code whose
syntax I hardly understand. I have made a small program
for testing & learning purposes, and this is what I've
got so far. It works, but not to the extent I'd like.
I can't figure out how to make use of my "sortorder"
subroutine, so now it just sorts by weight, which I put
into the "unsortedrefs" definition just not to have it
empty. Would somebody be able to tell me how to incorporate
the "sortorder" comparison routine in the program Testprog.prl
below, without altering the original code beyond recognition,
I'd be very grateful.
Thanks in advance once again,
/Par Svensson
---
par@removethis.bahnhof.se
Testfile.txt (fixed width columns):
chicken black001eriksson
dog red 030blom
chicken brown003svensson
chicken black010jansson
dog green030blom
cat black012svensson
chicken red 022blom
chicken black010eriksson
Testprog.prl:
open (INFILE, "testfile.txt");
while (<INFILE>) {
$wholefile .= $_;
}
@unsorteddata = split (/\n/, $wholefile);
sub species($){
return substr($_,0,8);
}
sub colour($){
return substr($_,8,5);
}
sub weight($){
return substr($_,13,3);
}
sub owner($){
return substr($_,16,8);
}
sub sortorder {
species($a) ->[1] cmp species($b) ->[1]
or
colour($a) ->[1] cmp colour($b) ->[1]
or
weight($a) ->[1] <=> weight($b) ->[1]
or
owner($a) ->[1] cmp owner($b) ->[1] ;
}
@unsortedrefs = map { [$_, weight($_)] } @unsorteddata;
@sortedrefs = sort { $a -> [1] cmp $b -> [1] } @unsortedrefs;
@sorteddata = map { $_ -> [0] } @sortedrefs;
$result = join "\n", @sorteddata;
print $result;
------------------------------
Date: 4 Mar 1999 16:07:12 -0800
From: kirbyk@best.com (K. Krueger)
Subject: SSH Authentication in Perl
Message-Id: <7bn77g$hgv$1@shell2.ba.best.com>
I have some perl scripts that need to use ssh and scp to securely do stuff
(in this case, modify mailserver configurations to block spammers.) This
works great if someone manually logs on and does the ssh authentication
(ie, ssh-add) before running the scripts.
This is good, but it would be great if I could automate the processing into
a cronjob. The trick is, how do I achieve an ssh-authenticated environment
in cron? The reason this seems hard, to me, is that I can't seem to redirect
input to the ssh-add program without it popping up the X-Gui instead.
A short sample script (Not written for style points):
#!/usr/local/bin/perl
$password = "MyPassword\n";
open SSH, "|ssh-add" || die "Cannot open: $!";
print SSH $password;
close SSH;
print "After ssh-add\n";
print `ssh-add -l`;
print `ssh othermachine cat samplefile`;
With correct password and machinenames filled in, this pops up the magic
ssh-add gui without adding the key. Since my goal is to do this
non-interactively in cron, this is bad.
Is this a solved problem? How do I move my ssh-dependant scripts into
cron? Can I use Perl to help me with this. It _does_ work if I make a
blank ssh passphrase, but we really don't want to have a blank passphrase
that gives us root access to the mailservers.
I realize that the solution to this may not really be a Perl question -
but I'm hoping that it is, and someone can point me to something I can
wrap the ssh-add stuff in. (Is there a Perl way to do expect-like shell
control?)
Thanks for any help. Emailed copies of posts appreciated. (I _do_ read
this group, but email will reach me faster, and I'm impatient.)
--
Kirby Krueger O- kirbyk@best.com
<*> "Most .sigs this small can't open their own jump gate."
------------------------------
Date: 4 Mar 1999 23:19:28 GMT
From: barryk@swcp.com (Barry Keeney)
Subject: Re: The truth about the Pentium III chip and ID --- **boycott info**
Message-Id: <7bn4e0$ihp$1@sloth.swcp.com>
Todd Bandrowsky (tbandrowsky@del.net) wrote:
: Oh please, spare the misrepresentation. Sun Microsystems, you know, the
: holy good guys, have had the concept of a software accessible unique
: identifier in all of their hardware. Corporate America wants to track
: people, and Sun has been giving them that technology for years. If you are
: going to boycott Intel, then you should boycott Sun too.
I don't have a problem with using a unique id for each machine but I
don't what it in the processor. if you have a problem like your powersupply
fan dies and that causes your CPU to burn out all the software tied to
that CPU has to get a new license. that would be a complete bitch.
sun puts there ID in a NVRAM chip. should that chip fail you can
re-program it's replacement with your old ID. bingo your software is working
again.
companys that sell PC software have been ripped off right and left
by people using illegal copies of software. in the unix world you could
tie your software into a unique host id to prevent it being illegal copied
but PC's have lacked this feature. up till now you had to use an external
device ( mostlikely on the printer port ) to make sure you were only using
the software on one machine, at a time anyway. these hardware keys cost
money and can cause problem with printing.
lastly sun doesn't have software in that sends back info on the
machine and what's installed on it. microsoft has, in the past, sent
out versions of the OS (beta 95) that sent info about your system
back to microsoft, without telling the people with the beta that
it was doing this. microsoft told the media, after someone discovered
this, that it was only to help them solve problems with the beta.
lots of people didn't beleave this.
: JoHn DoH <johndoh@home.com> wrote in message
: news:36D9D5CE.D39B0338@home.com...
: >I beg to differ but MAC addressess are not made for spying on us they
: >are for network location and such. No on knows that I own a certain
: >MAC address (unlike Intel that wants you to register after getting the
: >PIII). I think it is a bad move on intel's part but those that accept
: >it are doomed to get shafted. Your ass not mine (I will keep my PI any
: >day running). Sorry for the crossposting just got a little annoyed and
: >wanted it to be righted in all places of being.
: >
: > -DoH
: >
: >Kano wrote:
: >>
: >> Oh come on. Many other standard devices (ethernet cards, for example)
: have their
: >> own unique serial numbers that software can use at will. Get over it.
: >>
: >> -kl
: >>
: >> Boycott Swintel <swintel@badchips.com> wrote in message
: >> news:36ddc0ca.4718754@news.earthlink.net...
: >> >Take the Pentium III Boycott Survey
: >
: >--
: >JoHn 'DoH' KeLm
: >http://www.johndoh.cjb.net
: >"People are too stupid to realize they are" - DoH
--
Barry Keeney
Chaos Consulting
email barryk@chaoscon.com
------------------------------
Date: Thu, 04 Mar 1999 23:58:00 +0000
From: Michael Geehan <michael.geehan@kcl.ac.uk>
Subject: Updating Access database using Perl/CGI
Message-Id: <36DF1E07.DB1639D4@kcl.ac.uk>
Is there any way to use Perl to read data from and write data to,
a microsoft Access Database?
Mike
--
Michael Geehan
Email: michael.geehan@kcl.ac.uk
URL: Temporarily off-line!
Phone: 0958-496-564
----------------------------------------
' Fixation is the way to death,
Fluidity is the way to life'
Miyamoto Musashi
------------------------------
Date: 04 Mar 1999 23:57:23 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <920591997.796342@thrush.omix.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
: Experimental. Here is the test CGI script:
>snip<
: These are the results of this script on two servers. You can't really
: say that crypt() returns the same on both:
:
: Perl version = 5.004
: OS = linux
: Server software = Apache/1.3.3 (Unix) AuthMySQL/2.20 PHP/3.0.5
: Result of crypt("JAPH","xy") = xyPfIrnqhqVQg
:
: Perl version = 5.00404
: OS = freebsd
: Server software = Apache/1.3b5
: Result of crypt("JAPH","xy") = $1$xy$xq0x31T65dzC9QFExn1I80
Very odd. My FreeBSD box returns the same result as Linux et al:
Perl version = 5.00404
OS = freebsd
Server software = Apache/1.2.4 mod_perl/1.00
Result of crypt("JAPH","xy") = xyPfIrnqhqVQg
For reference this is under FreeBSD 2.2.8-RELEASE i386
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: 05 Mar 1999 00:01:31 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <920592245.510899@thrush.omix.com>
[posted & mailed]
Larry Rosler <lr@hpl.hp.com> wrote:
>snip<
: Would it be possible for you to show us the man page for crypt on your
: FreeBSD system? A web search didn't turn one up for me.
http://www.freebsd.org/cgi/man.cgi
You can compare pages for dozens of other systems as well through
it.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Thu, 4 Mar 1999 16:39:30 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <MPG.1148c79feca1ce339896e3@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <36ded3a2.16837423@news.skynet.be> on Thu, 04 Mar 1999
18:50:19 GMT, Bart Lateur <bart.lateur@skynet.be> says...
...
> my $code = 'crypt("JAPH","xy")';
...
> Perl version = 5.00404
> OS = freebsd
> Server software = Apache/1.3b5
> Result of crypt("JAPH","xy") = $1$xy$xq0x31T65dzC9QFExn1I80
Zenin kindly pointed to the FreeBSD documentation, and this behavior
doesn't correspond to it. Here is the relevant paragraph:
<QUOTE>
For compatibility with historical versions of crypt(3), the setting may
consist of 2 bytes of salt, encoded as above, in which case an iteration
count of 25 is used, fewer perturbations of DES are available, at most 8
characters of key are used, and the returned value is a NUL-terminated
string 13 bytes in length.
</QUOTE>
So cross-platform compatibility seems to have been a goal of the FreeBSD
implementation of the crypt(3) C function, but doesn't seem to have been
achieved in the Perl crypt function. I would describe that as a perl
bug; wouldn't you?
I'll reiterate -- encrypted passwords are supposed to be platform-
independent. Platforms that deviate are buggy.
--
Larry Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 4 Mar 1999 22:45:16 GMT
From: Phil <phil.yeo@ukonline.co.uk>
Subject: Use 'get' to get cgi output?
Message-Id: <36DF0CFC.8341778A@ukonline.co.uk>
Hi I'm a real perl newbie but so far I got my script to work:
$url="http://the.adress.in.the.submit.tag?=myinput"
getstore($url, "mydatafile");
but the url is wrong. How do I get it to add the input from the form
the web form would generate?
It does something to stick the input on the end but this is wrong. Is
this url encoding? Any pointers appreciated.
Phil Yeo
------------------------------
Date: Thu, 4 Mar 1999 16:20:56 -0700
From: "Pat Brown" <brownpatrick@lucent.com>
Subject: Using system command with ftp
Message-Id: <7bn4g6$i1n@nntpa.cb.lucent.com>
I have a web page that allows me to do a file upload, in my cgi-bin I have a
perl script that accepts the file, what I need to do using ftp is send the
file to another box. I am trying the "system("ftp -s:kkkk")" with no
success. Help needed
Thanks
------------------------------
Date: Thu, 04 Mar 1999 19:29:39 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Using system command with ftp
Message-Id: <comdog-ya02408000R0403991929390001@news.panix.com>
In article <7bn4g6$i1n@nntpa.cb.lucent.com>, "Pat Brown" <brownpatrick@lucent.com> posted:
> I have a web page that allows me to do a file upload, in my cgi-bin I have a
> perl script that accepts the file, what I need to do using ftp is send the
> file to another box. I am trying the "system("ftp -s:kkkk")" with no
> success. Help needed
use Net::FTP;
see the docs for details :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 04 Mar 1999 17:22:58 -0700
From: Eric The Read <emschwar@mail.uccs.edu>
Subject: Re: Using system command with ftp
Message-Id: <xkfn21shjj1.fsf@valdemar.col.hp.com>
"Pat Brown" <brownpatrick@lucent.com> writes:
> I have a web page that allows me to do a file upload, in my cgi-bin I have a
> perl script that accepts the file, what I need to do using ftp is send the
> file to another box. I am trying the "system("ftp -s:kkkk")" with no
> success. Help needed
use Net::FTP (available from CPAN).
-=Eric
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5060
**************************************