[17666] in Perl-Users-Digest
Perl-Users Digest, Issue: 5086 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 12 00:10:32 2000
Date: Mon, 11 Dec 2000 21:10:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <976597813-v9-i5086@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 11 Dec 2000 Volume: 9 Number: 5086
Today's topics:
Re: plz help me !!!!!! <jhelman@wsb.com>
print to html problem ignition78@my-deja.com
Re: print to html problem <brondsem@my-deja.com>
Re: Problem understanding references <tinamue@zedat.fu-berlin.de>
Re: Problem understanding references <peter.sundstrom@eds.com>
single quote hell <tmartin1@telocity.com>
Re: single quote hell <jdhunter@nitace.bsd.uchicago.edu>
Re: single quote hell <philipg@atl.mediaone.net>
Re: single quote hell (Richard Zilavec)
Re: single quote hell <tmartin1@telocity.com>
srand() for CGI <sluppy@my-deja.com>
Re: term ansi color (Richard Zilavec)
Re: Testing deliverability with Perl and Sendmail -bv <peter.sundstrom@eds.com>
Re: Visual Perl <beaumontsystems@netscapeonline.co.uk>
Re: Visual Perl <mischief@velma.motion.net>
Re: Why isn't Perl highly orthogonal? (Tad McClellan)
Win32 User Account Management <silvius@uswest.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 12 Dec 2000 04:07:30 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: plz help me !!!!!!
Message-Id: <3A35A495.6E7D7659@wsb.com>
Waarddebon wrote:
>
> Im getting an error 500 on this:
I assume by a 500 error, you mean a CGI server error. Try putting the
following at the very top of your script:
$| = 1; # KILL OUTPUT BUFFERING
print "Content-type: text/plain\r\n\r\n";
If you look at your server logs, the error is probably something along
the lines of "Premature end of script headers: ... ". The above lines
should fix that (assuming that your problem isn't a compile-time error.
Your script does compile from the command line, right?
> $temp=$a1$a2;
This isn't good. Use either:
$temp = $a1 . $a2;
$temp = "$a1$a2";
> $string = "name=" . $temp . "&a1=" . $a1 . "&a2=" . $a2 . "&a3=" . $a3 .
> "&a4=" . $a4 . "&a5=" . $a5 . "&b1=" . $b1 . "&b2=" . $b2 . "&b3=" . $b3 .
> "&c1=" . $c1 . "&c2=" . $c2 . "&d1=" . $d1 . "&e1=" . $e1 . "&e2=" . $e2 .
> "&e3=" . $e3 . "&f1=" . $f1 . "&f2=" . $f2;
In a similar vein, try the following for this very long and painful
block (Note that there are actually no linebreaks in this, but my Usenet
UA will probably insert them. Thus, this should be one big long (135
character) line:
$string =
"name=$temp&a1=$a1&a2=$a2&a3=$a3&a4=$a4&a5=$a5&b1=$b1&b2=$b2&b3=$b3&c1=$c1&c2=$c2&d1=$d1&e1=$e1&e2=$e2&e3=$e3&f1=$f1&f2=$f2";
There are much better ways to do this, including iterating over an
array, etc. You may wish to rethink your design.
> Can anyone help me out and detect the problem ?
> Thanks in advance...
Hope this helps,
JH
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
------------------------------
Date: Tue, 12 Dec 2000 03:30:57 GMT
From: ignition78@my-deja.com
Subject: print to html problem
Message-Id: <91465h$h6l$1@nnrp1.deja.com>
Just wondering if anyone can help me with this problem:
One component of the program in question, a separate .pl script, was to
obtain user input in the form of a search query, which searched a data
base, then returned hot-linked results in a plain boring web page.
Now, I do not like the plain boring web page that it generates, and I
would like it to appear the same as the page that the search was
initiated from.
I have tinkered with it to the best of my ability, but this code seems
a bit more complex for me, and I have gotten is nothing but server
errors.
I do have a very general knowledge of manipulating and configuring perl
scripts for use with my web sites, but have no real programming
training.
So with that said, can someone please explain to me in simplistic
terms, how I would be able to add some of the HTML to the output on
this program, I guess I am asking what the proper syntax is for the
print (command, propertier, operator?) to get the additional HTML in
there
Any and all help would be appreciated, below is the script:
#!/usr/bin/perl
#
# ad-search.pl - June 26, 2000
$version = "v1.04";
#####################
### Configuration ###
#####################
# Set this to the location and name of the database to keep.
$db = '/home/theredzone/cgi-bin/db/ads.db';
# Set this to the directory which holds the text files for each ad
(including trailing slash).
$text_dir = '/home/theredzone/cgi-bin/db/ads/';
# Set this to the directory containing the bio directories (including
the trailing slash)
$bio_dir = '/home/theredzone/';
# Set this to the http location and filename of the ad-list script
$ad_list = '/cgi-bin/ad-list.cgi';
# Set these to the desired colours.
$bgcolor = '#ffffff';
$textcolor = '#000000';
$linkcolor = '#ff0000';
$vlinkcolor = '#880000';
$alinkcolor = '#ff0000';
$font = '<FONT FACE="Arial, Helvetica, sans-serif">';
###################
### The Program ###
###################
use CGI qw(:standard);
$logfile = '/home/theredzone/cgi-bin/db/ad-search.log';
environ();
unless ($term) {
output_header("Ad Search");
output_form();
output_footer();
} else {
read_db();
do_search();
output_results();
# write_log();
}
#######################
### The Subroutines ###
#######################
sub environ {
$term = param("term");
$this_script = url();
$host = remote_host();
$agent = user_agent();
$t = localtime;
$prevo = self_url();
$prevo =~ s/&/_amp_/g;
my $url_tmp = $this_script;
$url_tmp =~ s/^http:\/\///;
my @break = split(/\//, $url_tmp);
$url_lead = 'http://' . $break[0];
}
sub read_db {
my $id, $name, $phone, $cat, $active;
my $found = 0;
open(DB, $db) || bail("Uh oh!!! The end is near!!!<BR>Cannot open
$db: $!");
while(<DB>) {
chomp;
($id, $name, $phone, $cat, $active) = split(/\|/);
if ($active) {
push(@ads, $_);
}
}
close(DB);
}
sub do_search {
my ($desc, $lineout);
### First search the database entries
foreach $element (@ads) {
($id, $name, $phone, $cat, $active) = split(/\|/, $element);
$lineout = "<LI><A HREF=\"$ad_list?
display=$id&prev=$prevo\"><B>$id</B></A> $name - $phone</LI>";
### search the data line first
$test = "$id $name $phone";
if ($test =~ /$term/i) {
push(@found, $lineout);
next;
}
### that was easy, now do the text descriptions
$filename = $text_dir . $id . ".txt";
$desc = "";
if (open(TEXT, $filename)) {
while(<TEXT>) {
chomp;
$desc .= " " . $_;
}
close(TEXT);
$desc =~ s/\s{2,}/ /g;
if ($desc =~ /$term/i) {
push(@found, $lineout);
}
} else {
error_log("Error in $filename\nCannot search ad file
$filename\nError message: $!");
}
}
### Now search the bio directories
my ($tdir, $tfile, $content, $title, $ifile);
opendir(DIR, $bio_dir) || bail("Cannot open directory $bio_dir: $!");
while ($tdir = readdir(DIR)) {
$tfile = $bio_dir . $tdir . "/index.html";
if (($tdir =~ /^\~/) && (-e $tfile)) {
$ifile = undef;
$title = undef;
$content = undef;
open(BIO, $tfile) || bail("Cannot open bio file $tfile: $!");
while(<BIO>) {
$title = $1 if ( /<TITLE>(.+)<\/TITLE>/i );
if ( /<FRAME SRC=(.+)>/i ) {
$ifile = $1;
last;
}
}
close(BIO);
$title = $tdir unless ($title);
if ($ifile) {
$ifile =~ s/^"//;
$ifile =~ s/"$//;
$ifile =~ s/^$url_lead//;
$ifile =~ s/^\/+//;
if ( $ifile =~ /^\.\.\// ) {
$ifile = $bio_dir . $tdir . "/" . $ifile;
} else {
$ifile = $bio_dir . $ifile;
}
if (open(SEARCH, $ifile)) {
while(<SEARCH>) {
chomp;
$content .= " " . $_;
}
close(SEARCH);
$content =~ s/\s{2,}/ /g;
if ($content =~ /$term/i) {
push(@found, "<LI><A HREF=\"/$tdir\"><B>$title</B></A> bio
page</LI>");
}
} else {
error_log("Error in $tfile\nCannot search bio file
$ifile\nError message: $!");
}
}
}
}
closedir(DIR);
}
sub output_header {
print header(-pragma=>'no-cache', -expires=>'now'),
start_html(-title=>$_[0],
-author=>'ignition2@sympatico.ca',
-BGCOLOR=>$bgcolor,
-TEXT=>$textcolor,
-LINK=>$linkcolor,
-VLINK=>$vlinkcolor,
-ALINK=>$alinkcolor),;
}
sub output_footer {
print "</BODY></HTML>";
}
sub output_results {
my $id, $name, $phone, $cat, $active;
output_header("Ad Search Results");
output_form();
$number_found = $#found + 1;
print h3("Found $number_found ads matching <I>$term</I>:"), "<OL>";
# This outputs the results in the order they were found
# foreach (@found) {
# print $_;
# }
# This outputs the results randomly
while(@found) {
print splice(@found, rand(@found), 1);
}
print "</OL>";
output_footer();
}
sub output_form {
print "<FORM ACTION=$this_script METHOD=get><P>Search the ads for:
<INPUT NAME=term SIZE=25 MAXLENGTH=50 VALUE=\"$term\"> ",
"<INPUT TYPE=submit NAME=submit VALUE=Search></P></FORM>";
}
sub error_log {
my $errmsg = "$t\n$_[0]\n[$this_script] [$agent]\n\n-----\n\n";
open(LOG, ">>$logfile");
print LOG $errmsg;
close(LOG);
open(MAIL, "|/lib/sendmail -t");
print MAIL "To: ignition2\@sympatico.ca\n";
print MAIL "From: ignition2\@sympatico.ca\n";
print MAIL "Subject: [RZ search] ERROR!!!\n\n";
print MAIL $errmsg;
close MAIL;
}
sub bail {
open(LOG, ">>$logfile");
print LOG "$t -> ***ERROR -> $_[0] [$agent]\n";
close(LOG);
output_header("Uh oh!!!", "<EM>Holy Oleo, Batman! I think we're in a
jam.</EM>");
print p($_[0]);
output_footer();
exit;
}
sub write_log {
open(LOG, ">>$logfile");
print LOG "$t ($version) -> $host searched for \"$term\"
($number_found found)\n";
close(LOG);
my $logsize = (-s $logfile);
if ($logsize > 50000) {
open(MAIL, "|/lib/sendmail -t");
print MAIL "To: ignition2\@sympatico.ca\n";
print MAIL "From: ignition2\@sympatico.ca\n";
print MAIL "Subject: RZ search log\n\n";
open(LOG, "$logfile");
while(<LOG>) {
print MAIL $_;
}
close LOG;
close MAIL;
unlink($logfile);
}
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Dec 2000 04:03:46 GMT
From: Dave Brondsema <brondsem@my-deja.com>
Subject: Re: print to html problem
Message-Id: <91482v$ipc$1@nnrp1.deja.com>
In article <91465h$h6l$1@nnrp1.deja.com>,
ignition78@my-deja.com wrote:
> Just wondering if anyone can help me with this problem:
>
> One component of the program in question, a separate .pl script, was
to
> obtain user input in the form of a search query, which searched a data
> base, then returned hot-linked results in a plain boring web page.
>
> Now, I do not like the plain boring web page that it generates, and I
> would like it to appear the same as the page that the search was
> initiated from.
>
> I have tinkered with it to the best of my ability, but this code seems
> a bit more complex for me, and I have gotten is nothing but server
> errors.
>
> I do have a very general knowledge of manipulating and configuring
perl
> scripts for use with my web sites, but have no real programming
> training.
>
> So with that said, can someone please explain to me in simplistic
> terms, how I would be able to add some of the HTML to the output on
> this program, I guess I am asking what the proper syntax is for the
> print (command, propertier, operator?) to get the additional HTML in
> there
>
[snip]
try putting it in various places and see what happens. In particular,
the subs with names like output_results
The syntax is:
print "some <b>html</b>";
quotes must be escaped like this
print "<font face=\"Times New Roman\">Hello</font>";
or .. use the double quote operator:
print qq~<img src="hey.gif">this is some more text~;
For perl-specific help, look to http://www.perl.com and
http://www.cgi101.com/class for free (free is good) documentation and
tutorials.
--
Dave Brondsema
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Dec 2000 01:00:47 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Problem understanding references
Message-Id: <913tbv$2v1ng$5@fu-berlin.de>
hi,
Peter Sundstrom <peter.sundstrom@eds.com> wrote:
> OK, perhaps I didn't make my example very clear. I am dealing with a bunch
> of IP addresses and I'm writing the IP address to a file named after the
> network the IP address is in.
> For example: 192.1.1.1 and 192.1.1.2 get written to a file called
> 192.1.1.0.dat and 10.1.1.1, 10.100.1.1 get written to a file called
> 10.0.0.0.dat
seems ok to me
> After playing around a bit, I came up with the following code. Is this any
> better?
> my ($fh,$addr,%ip);
> while (<DATA>) {
> chomp;
> $addr=$_;
> unless ($ip{$addr}) {
> $ip{$addr} = IO::File->new(">$addr.dat") or die "Can not
> open $addr.dat $!\n";
here the address 192.1.1.1 is written into the file
"192.1.1.1.dat". that's not really what you want, is it?
the problem of your original code was, that you took
$addr as the filename AND the filehandle, as
rafael alrady mentioned. normally you say
open FILE, "$filename" or die $!;
you said
open $filename, "$filename" or die $!;
which is wrong. why do you want the same name for
the filehandle as for the file? you're
opening and closing in the loop, anyway, so there are
never two filehandles in use at the same time...
hth,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Tue, 12 Dec 2000 16:24:20 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Problem understanding references
Message-Id: <9145p5$sse$1@hermes.nz.eds.com>
Tina Mueller <tinamue@zedat.fu-berlin.de> wrote in message
news:913tbv$2v1ng$5@fu-berlin.de...
> > After playing around a bit, I came up with the following code. Is this
any
> > better?
>
> > my ($fh,$addr,%ip);
>
> > while (<DATA>) {
> > chomp;
>
> > $addr=$_;
>
> > unless ($ip{$addr}) {
> > $ip{$addr} = IO::File->new(">$addr.dat") or die "Can not
> > open $addr.dat $!\n";
>
> here the address 192.1.1.1 is written into the file
> "192.1.1.1.dat". that's not really what you want, is it?
It's just an example to demonstrate that I'm processes a bunch of IP
addresses and writing out the addresses to multiple files.
>
> the problem of your original code was, that you took
> $addr as the filename AND the filehandle, as
> rafael alrady mentioned. normally you say
> open FILE, "$filename" or die $!;
> you said
> open $filename, "$filename" or die $!;
> which is wrong. why do you want the same name for
> the filehandle as for the file? you're
> opening and closing in the loop, anyway, so there are
> never two filehandles in use at the same time...
Say I have a file with a thousand IP addresses in multiple networks. I need
to keep track of which file an IP address gets written to, that's why I use
a hash. Otherwise I'd be doing something like:
while (<>) {
open FILE, ">>$_") or die "$!\n";
print FILE "$_";
close FILE;
}
I'd imagine the overhead of opening and closing files for every invocation
of the loop would be reasonable high?
------------------------------
Date: Mon, 11 Dec 2000 21:55:37 -0600
From: "Tommy Martin" <tmartin1@telocity.com>
Subject: single quote hell
Message-Id: <ckhZ5.30013$C2.6645210@newsrump.sjc.telocity.net>
I have been beating my head against the wall trying to go through a string
in a variable and replace where the user entered a single quote ' mark with
2 of them '' so my sql statement will add that string the to the database.
I have tried q() qq() /s and /tr and have not been able to get any of them
to work on that character.
Has anyone had luck replacing that character in a string? How did you pull
it off.
Any help is REALLY appreciated!
--
Tommy Martin
------------------------------
Date: 11 Dec 2000 22:04:04 -0600
From: John Hunter <jdhunter@nitace.bsd.uchicago.edu>
Subject: Re: single quote hell
Message-Id: <1rn1e25lqj.fsf@video.bsd.uchicago.edu>
>>>>> "Tommy" == Tommy Martin <tmartin1@telocity.com> writes:
Tommy> I have been beating my head against the wall trying to go
Tommy> through a string in a variable and replace where the user
Tommy> entered a single quote ' mark with 2 of them '' so my sql
Tommy> statement will add that string the to the database.
Save your head!
Does this help?
#!/usr/local/bin/perl -w
use strict;
my ($before, $after);
$before = 'this isn\'t a test string';
($after = $before) =~ s/'/''/;
print "before: $before\n";
print "after: $after\n";
------------------------------
Date: Tue, 12 Dec 2000 04:02:50 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: single quote hell
Message-Id: <KrhZ5.18767$_y5.3823625@typhoon.southeast.rr.com>
Tommy Martin <tmartin1@telocity.com> wrote in message
news:ckhZ5.30013$C2.6645210@newsrump.sjc.telocity.net...
> I have been beating my head against the wall trying to go through a string
> in a variable and replace where the user entered a single quote ' mark
with
> 2 of them '' so my sql statement will add that string the to the database.
>
> I have tried q() qq() /s and /tr and have not been able to get any of them
> to work on that character.
>
> Has anyone had luck replacing that character in a string? How did you pull
> it off.
$var = "O'Keeffe";
$var =~ s/'/''/g;
print "$var\n";
hth,
p
------------------------------
Date: Tue, 12 Dec 2000 04:35:39 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: single quote hell
Message-Id: <3a35a768.347618406@news.tcn.net>
On Mon, 11 Dec 2000 21:55:37 -0600, "Tommy Martin"
<tmartin1@telocity.com> wrote:
>in a variable and replace where the user entered a single quote ' mark with
>2 of them '' so my sql statement will add that string the to the database.
$string =~ s/'/''/g;
>I have tried q() qq() /s and /tr and have not been able to get any of them
>to work on that character.
q() is a substitute for ' so
$path = '/this';
$path = q(/this);
qq() is just a double quote or a sustitute for "
$path = "$somepath/here";
$path = qq($somepath/here);
perldoc perlop
for tr///;
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: Mon, 11 Dec 2000 22:29:46 -0600
From: "Tommy Martin" <tmartin1@telocity.com>
Subject: Re: single quote hell
Message-Id: <GPhZ5.30028$C2.6665098@newsrump.sjc.telocity.net>
Thanks.... That got it...
I could swear I tried $var =~ s/'/''/; but maybe I didn't. It sure got it
though.
Out of curiosity what is the g for as in s/'/''/g;
Thanks again.
Tommy
"Richard Zilavec" <rzilavec@tcn.net> wrote in message
news:3a35a768.347618406@news.tcn.net...
> On Mon, 11 Dec 2000 21:55:37 -0600, "Tommy Martin"
> <tmartin1@telocity.com> wrote:
>
> >in a variable and replace where the user entered a single quote ' mark
with
> >2 of them '' so my sql statement will add that string the to the
database.
>
> $string =~ s/'/''/g;
>
> >I have tried q() qq() /s and /tr and have not been able to get any of
them
> >to work on that character.
>
> q() is a substitute for ' so
>
> $path = '/this';
> $path = q(/this);
>
> qq() is just a double quote or a sustitute for "
>
> $path = "$somepath/here";
> $path = qq($somepath/here);
>
> perldoc perlop
> for tr///;
>
>
> --
> Richard Zilavec
> rzilavec@tcn.net
------------------------------
Date: Tue, 12 Dec 2000 04:23:43 GMT
From: sluppy <sluppy@my-deja.com>
Subject: srand() for CGI
Message-Id: <91498b$jf9$1@nnrp1.deja.com>
I wrote a short subroutine to produce a random string that I plan to
use as a session ID on a cookie-less web site.
The problem is that I can duplicate the "random" string simply by _very
quickly_ running the subroutine twice from the command line.
I'm assuming that srand() is equivalent to srand(time) which AFAIK
doesn't get any finer than the current second.
So... I assume that two visitors to my web site during the exact same
second would be issued the exact same session ID. (This, of course,
would be bad.)
Is there a way I can minimize the possibility of two or more visitors
to the web site getting the same random result?
Thanks!
--Tim
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Dec 2000 01:54:40 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: term ansi color
Message-Id: <3a35850d.338821635@news.tcn.net>
On Mon, 4 Dec 2000 13:27:17 +0100, "matteo" <dsdf@sdfd.com> wrote:
>**** Post for FREE via your newsreader at post.usenet.com ****
>
>I've tried to usa an example from the perl documentation of
>in windows prompt I obtain this (no color, only bw)
I just tried this using bash, only the first line changed colour. I'm
guessing the telnet program I'm using doesn't support it or the TERM
vt100.
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: Tue, 12 Dec 2000 11:36:35 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Testing deliverability with Perl and Sendmail -bv
Message-Id: <913ktk$1ct$1@hermes.nz.eds.com>
Gil Vautour <vautourNO@SPAMunb.ca> wrote in message
news:3A3547F2.71EB9B4E@SPAMunb.ca...
> Hello,
>
> I was wondering if anyone knew a way using Perl and Sendmail to test an
> email
> address to see if it is deliverable before sending the message? I'm
> using Perl to call Sendmail to send a standard message to a large file
> of email addresses and I would like to check to see if the message will
> get bounced and if so not send it at all. I know there is the -bv
> option, will this do the job? More specifically how
> in Perl would I be able to test the the result of -bv in order to send
> or not?
Try
http://search.cpan.org/search?dist=Email-Valid
http://search.cpan.org/search?dist=Mail-CheckUser
Mail::CheckUser can attempt to connect to the remote mail server in an
attempt to verify the mail address.
------------------------------
Date: Tue, 12 Dec 2000 00:18:00 -0000
From: "beaumontsystems" <beaumontsystems@netscapeonline.co.uk>
Subject: Re: Visual Perl
Message-Id: <3a3560c3$1_1@plato.netscapeonline.co.uk>
It's true. See the ActiveState site (www.activestate.com). It's a result of
some collaboration between MS and ActiveState.
I dont know if it's a GOOD THING or a BAD THING. Only time will tell.
---
Andrew
"Chris Fedde" <cfedde@fedde.littleton.co.us> wrote in message
news:mFbZ5.150$B9.170592256@news.frii.net...
> In article <t39rsrj293gv78@corp.supernews.com>,
> Justin and or Denitza <justinl@lvcablemodem.com> wrote:
> >Does anyone else find it annoying that you have to be a Microsoft
Certified
> >Certification Class Taker to try out the Visual Perl Beta? Does anyone
know
> >a way around this? (please no replies like "hack the planet, save the
> >rainforest, tell your boss to switch to BSD")
> >
>
> Microsoft?
> Microsoft Visual Perl Beta?
> From Microsoft?
> Is this a joke?
> No really. Is this a joke?
>
> Hack the planet, save the rainforest, tell your boss to switch to BSD!
> Oh... You said not to reply like that.... Oh well better luck next time.
>
> :-)
> chris
> --
> This space intentionally left blank
------------------------------
Date: Tue, 12 Dec 2000 00:18:21 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Visual Perl
Message-Id: <t3armd7ontfbe0@corp.supernews.com>
Justin and or Denitza <justinl@lvcablemodem.com> wrote:
> Does anyone else find it annoying that you have to be a Microsoft Certified
> Certification Class Taker to try out the Visual Perl Beta?
Not particularly, since Microsoft Visual P++ or whatever they end up calling
it won't really be Perl at all. will have outrageous proprietary extensions,
will be barely compatible, and won't run on anything but Microsoft's own
proprietary mess of an operating system family. This is how most anything
that says "Visual" in the name comes to be.
Visual C/C++ was this way from the staert, and slowly became closer to the
standard in the areas it was meant to be standard. Visual J++ was promised
to be 100% Sun compatible and wasn't. I believe there may have been a suit
brought over that very fact.
Visual Basic isn't even compatible in any way with Microsoft's own
QBasic/QuickBasic/Basic Professional Development System (MS Basic PDS),
all of which were compatible with each other but were a proprietary dialect
of Basic. So, you see, Microsoft's proprietary tools can't even maintain
compatibility with Microsoft's proprietary tools.
> Does anyone know a way around this? (please no replies like
> "hack the planet, save the rainforest, tell your boss to switch to BSD")
You could become a Microsoft Certified Certification Class Taker. That's
the most common way to get past the requirement to be a Microsoft
Certified Certification Class Taker, I'd guess. From the wording of what
sounds like it's supposed to be an auspicious title, you just have to be
certified to take a class to become certified, which should be either a
vicious circle or a matter of registering to take a class on how to
become Microsoft certified in something.
Hack the computers. The planet is mostly just a hunk of rock under high
pressure. Save all the forests. No need to discriminate unfairly. Tell
your boss you'd rather use ActivePerl if you must use Perl on Windows,
since it is a tried and tested distribution that costs nothing to use
and has (relatively) inexpensive support available.
Optionally, tell your boss you'd really rather be using a stable
implementation of your tools in a stable operating environment, such
as a commercial or open source Unix-like system. I say this is optional,
because I know my idel work environment may not be the same as yours.
While I would suggest Linux or Solaris (or maybe even SCO or, yes,
a BSD derivative - except HP-UX) and the Perl source distribution.
Chris Stith
--
Christopher E. Stith - mischief@motion.net
------------------------------
Date: Mon, 11 Dec 2000 22:02:20 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Why isn't Perl highly orthogonal?
Message-Id: <slrn93b8qc.12q.tadmc@maxim.metronet.com>
Michael Carman <mjcarman@home.com> wrote:
>Terrence Brannon wrote:
>>
>> [C]onceptually similar operations do not map to the same name
>> in Perl. Why does this make Perl a better and not worse language,
>> than the intended replacement to Perl, Ruby, which is in fact highly
>> regular in all places where Perl isn't [...]
>Most of the responses have centered on your example, not the subject of
>your question. Perl is non-orthogonal by design.
[snip man page quote]
Larry writes about the natural language concepts in Perl:
http://www.wall.org/~larry/natural.html
>IIRC, Larry Wall has referred to Perl as being a "diagonal" language.
He also said in a Dr. Dobb's Journal interview, Feb 1998:
Well, there are many different definitions of artistic beauty.
It can be argued that it's symmetry, which in a computer
language might be considered orthogonality. It's also been
argued that broken symmetry is what is considered most
beautiful and most artistic and diverse. Symmetry breaking
is the root of our whole universe according to physicists,
so if God is an artist, then maybe that's his definition
of what beauty is.
>IMHO, orthogonality is overrated.
Sorry I can't find a citation for this (paraphrased) Larry quote:
symmetry is overrated, overrated is symmetry
I think it was on a mailing list where I saw it...
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 11 Dec 2000 21:05:37 -0700
From: B.A. <silvius@uswest.net>
Subject: Win32 User Account Management
Message-Id: <MPG.149f51fdce0d68db989681@news.uswest.net>
I'm trying to learn Perl on a WinNT machine. I trying to follow the
examples in the book, but I'm getting weird results. I'm not sure if
I've done something wrong, or my machine is screwed up. I'm running this
against a Win2K Server from a Win2K workstation. Here i the script that
I used.
use Win32API::Net;
Win32API::Net::GetDCName(Win32::NodeName,Win32::DomainName,$server);
Win32API::Net::UserGetInfo($server, Win32::LoginName($Userid),
10,\%user);
print $user{fullName},"\n";
I changed the userID but I still got the first username that I tried
Why?
I changed the user level to 1011, but no data was returned. Why?
I also noticed that the hash names are weird, fullName instead of
FullName...... Are they supposed to be case-sensitive, kinda backwards
like that?
Thanks
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 5086
**************************************