[12382] in Perl-Users-Digest
Perl-Users Digest, Issue: 5982 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 14 02:07:26 1999
Date: Sun, 13 Jun 99 23:00:19 -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 Sun, 13 Jun 1999 Volume: 8 Number: 5982
Today's topics:
Re: ANN: Awesome tool for Perl programmers notepower@my-deja.com
Re: DIFF BETWEEN PERL & CGI (brian d foy)
Re: Does Perl have a future? <rootbeer@redcat.com>
Dynamic Regular Expression <pamelag@interlog.com>
Re: Dynamic Regular Expression (Sam Holden)
Errors attempting to use ftp.pl package <no-spam-texpilot@yahoo.com>
help with WIN32::OLE <jdbcpamcsd@hotmail.com>
Re: I need help making a search program <crt@highvision.com>
Re: Looking for general purpose perl search tool to sea <pamelag@interlog.com>
Re: Looking for general purpose perl search tool to sea (Eric Bohlman)
Re: Looking for general purpose perl search tool to sea <rootbeer@redcat.com>
Re: Most of the problem fixed, but having string manipu <uri@sysarch.com>
need a server that supports perl(cgi) <leonid76@erols.com>
Re: need a server that supports perl(cgi) <rootbeer@redcat.com>
Re: Need Help Anit-Back (brian d foy)
Perl CGI and NT <jeffgtr@effingham.net>
Re: Perl CGI and NT <rootbeer@redcat.com>
Re: Perl CGI and NT <wyzelli@yahoo.com>
Perl cgi with Foxpro database or Access database <superken@hutchcity.com>
Re: Perl cgi with Foxpro database or Access database <bjm@a2b01118.paralynx.bconnected.net>
Re: PERL tutorial <jeffgtr@effingham.net>
Re: PerlScript ... what features are missing? <ksnyde@msn.com>
simple math question! Why doesn't the * multiply two n <ryan420@earthling.net>
Re: simple math question! Why doesn't the * multiply tw (Michael Fuhr)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 14 Jun 1999 02:18:42 GMT
From: notepower@my-deja.com
Subject: Re: ANN: Awesome tool for Perl programmers
Message-Id: <7k1opt$d75$1@nnrp1.deja.com>
In article <376430cc@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) ranted:
> [courtesy cc of this posting mailed to cited author]
> <much vitriol deleted>
Well I'm sorry you feel that way Tom.
The fact is the program is not SPECIFICALLY designed for Perl;
nevertheless, it *IS* useful to Perl programmers who do use Windows;
especially do the bizarre nature of the language, a snippet browser for
perl is quite a benefit. That being the case I posted the message here
for those who can benefit from it in that capacity.
It is not fleeceware, right now it doesnt cost anything, although
eventually it will cost around $19.00 if you call that a fleecing.
In any case, I do hope your attitude improves a little...
Jordan
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 13 Jun 1999 22:28:52 -0400
From: brian@pm.org (brian d foy)
Subject: Re: DIFF BETWEEN PERL & CGI
Message-Id: <brian-ya02408000R1306992228520001@news.panix.com>
In article <7k0ptp$4ae$1@nnrp1.deja.com>, dharmin98@my-deja.com posted:
> Hi, Could any one please tell me whats the difference between Perl &
> CGI and where/how its used. Is it difficuilt to learn with no
> experience in programming. what software does it use to write the
> scripts.
Perl is a language and CGI is a protocol. Perl is to CGI what english
is to a telephone.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Sun, 13 Jun 1999 19:23:54 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Does Perl have a future?
Message-Id: <Pine.GSO.4.02A.9906131859420.6999-100000@user2.teleport.com>
On Mon, 14 Jun 1999, Christian Ahkman wrote:
> Do you think the criticism of perl and other script-based solutions
> for web applications is valid? Namely that the cost of perl/CGI is
> too large (overhead of running a script for every request) compared to
> servlets or COM objects that basically function as daemons?
It's a valid criticism sometimes, but often it's a red herring.
Suppose your script is so slow as to take one full second for execution.
(This is rare among well-written Perl programs for CGI environments.) If
your program gets called 400 times per day, that's around 400 seconds out
of 86,400 for your program. You still have about 86,000 seconds for other
tasks, so why worry?
Of course, if your program needs to be more responsive or to be called
much more often, you need another solution. But you needn't give up Perl -
Apache with mod_perl is just one solution which lets you essentially
remove the entire overhead. No fork, no exec, no binary to load, no
compile delay, no problem. An example of a very busy site actually using
this technique today is the Internet Movie Database.
http://us.imdb.com/
An example of a site which gave up Perl for CGI scripting for performance
reasons is Yahoo, which made their own custom server when they started
getting popular, years before mod_perl was available. If mod_perl had been
available, using it would have been faster to code and easier to maintain.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 22:45:31 -0400
From: "Pamela Goldfarb" <pamelag@interlog.com>
Subject: Dynamic Regular Expression
Message-Id: <7k1qcg$7qu$1@news.interlog.com>
A user will supply a search criteria:
word1 word2 - match if both word1 and word2 present
word1 and word2 - same
word1 or word2 - match if either present
I want to create a perl script that can parse the input string and then
search a file based on the search
criteria.
I know that I can build a string
$w="a|b";
and /$w/i will match $_ if it contains either a or b,
but is there a way to do the same thing for "a" and "b"?
$w="a&b";
doesn't work.
------------------------------
Date: 14 Jun 1999 03:06:32 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Dynamic Regular Expression
Message-Id: <slrn7m8sdo.759.sholden@pgrad.cs.usyd.edu.au>
On 13 Jun 1999 22:45:31 -0400, Pamela Goldfarb <pamelag@interlog.com> wrote:
>A user will supply a search criteria:
>
>word1 word2 - match if both word1 and word2 present
>word1 and word2 - same
>word1 or word2 - match if either present
>
>I want to create a perl script that can parse the input string and then
>search a file based on the search
>criteria.
>
>I know that I can build a string
>
>$w="a|b";
>
>and /$w/i will match $_ if it contains either a or b,
>but is there a way to do the same thing for "a" and "b"?
>
>$w="a&b";
>
>doesn't work.
You could read the documentation on perl regular expressions in
the perlre documentation (perldoc perlre). It's much better than
just making up syntax...
The simplest way is just to do two tests /a/ && /b/ - though you could
muck around with a large regex like : /a.*b|b.*a/. It won't scale
well to something like a and b and c or d and e.
--
Sam
You can write Perl programs that resemble sed, or awk, or C, or Lisp, or
Python. This is Officially Okay in Perl culture.
--Larry Wall
------------------------------
Date: Sun, 13 Jun 1999 23:45:36 -0500
From: "TerryP" <no-spam-texpilot@yahoo.com>
Subject: Errors attempting to use ftp.pl package
Message-Id: <7k21le$k90$1@fir.prod.itd.earthlink.net>
(re-posting to these two newsgroups, as i have yet to see my previous post
appear in either comp.lang.perl nor comp.lang.perl.moderated):
Running on a Sun E3500 with Solaris 2.6. Downloaded Perl 5.005_2 package
from Sunfreeware.com and (the Unix sa) installed using pkgadd.
But I cannot use the ftp.pl package. The sa ran the h2ph script to generate
the header files, but even still, we get the error:
"ISA not supported" (er, that's most of the error, anyway -- I'm at home!;
but I do know it's coming from the sockets.ph file, line 95 I believe)
I read the sockets.ph file to see what it's doing, and to me it looks like
it's examining what platform we are running. Yes, it was rocket-science
indeed to figure that i386 meant Intel and ppc meant PowerPC. But I have no
idea what the sparc7, sparc8, and sparc9 mean ...
Does the Sunfreeware Perl binary distribution work on an E3500??? That is
our dev box; the production box is an E6500, so any info on that would be
helpful, too. I'd like to download the source and do the compile, but our
Unix sa is really busy right now and this is a secondary priority really
(and I don't
know the root password!). But if we know there is a specific reason the
binary dist. won't work, maybe I can coerce him into doing the source
compile.
Many thanks in advance.
--
Terry Porter
PP-ASEL
DFW, TX
--remove "no-spam-" to email me
------------------------------
Date: Sun, 13 Jun 1999 22:15:55 -0700
From: "Jim Barnes" <jdbcpamcsd@hotmail.com>
Subject: help with WIN32::OLE
Message-Id: <7k234o$qqu@dfw-ixnews11.ix.netcom.com>
Hello -
Today was my first day with PERL, and I have a question (actually lots of
questions, but I'll only ask this one now). I am able to create and save an
item in an Outlook folder (a contacts folder to be precise), however, I
can't seem to see the value I entered in a standard outlook field. Am I not
setting the property value correctly? Some code follows:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
$Outlook = Win32::OLE->new('Outlook.Application', 'Quit');
$ol = Win32::OLE::Const->Load($Outlook);
$namespace = $Outlook->GetNamespace("MAPI");
my $items = $namespace->folders(2)->folders(11)->items;
my $item = $items->add;
$item->{Company} = "Lante";
$retval = $item->save;
An item is added to the folder, but no value appears in the Company field.
Thanks for your help.
------------------------------
Date: Sun, 13 Jun 1999 23:10:36 -0400
From: "Casey Tweten" <crt@highvision.com>
Subject: Re: I need help making a search program
Message-Id: <7k1scs$292@news.icubed.com>
RJ Marlatt <rjmarlatt@email.msn.com> wrote in message
news:edDm5Qft#GA.160@cpmsnbbsa05...
: Hey I need to make a search program that will search a big log file for
: multiple words and I don't know how
: if you could help that would be great.
: -Richard
: Richard@Marlatt.com
since this is kinda easy, we will make it come from a form online, with the
following param's:
file criteria{all_words | any_words} words
And of course using CGI.pm
#!/usr/local/bin/perl -w
use strict;
$|++;
use CGI qw(:standard);
sub search {
my $criteria = param('criteria');
my $words = param('words');
my $file = "/some/log.file";
open FILE, $file || die "Cannot open $file for read :$!";
if ( $criteria eq "any_words" ) {
my @words = split(/ /, $words);
my @count;
while ( <FILE> ) {
my $line = "$_";
foreach ( @words ) {
$count[$_] += s/$words[$_]/$words[$_]/igm;
}
}
print "<b>$words[$_]</b> was matched <b>$count[$_]</b> times<p>\n"
foreach ( @words );
} else {
my $count = 0;
while ( <FILE> ) {
$count += s/$words/$words/igm;
}
print "<b>$words</b> were matched <b>$count</b> times<p>\n";
}
}
print header,
start_html;
if ( param('words') ) {
search;
} else {
print "You must specify search words, hit your back button and try
again.\n";
}
print end_html;
## End Script
OK, I am sure there is a more efficient way to do this, especially the s///
operator I use to determine the number of matches.
have fun!
------------------------------
Date: Sun, 13 Jun 1999 22:22:53 -0400
From: "Pamela Goldfarb" <pamelag@interlog.com>
Subject: Re: Looking for general purpose perl search tool to search CSV table
Message-Id: <7k1p21$67a$1@news.interlog.com>
In thinking about the problem a little more, I don't need to generate a
"where" clause per se.
I can simple read in the database file and use pattern matching on the
entire line.
The question becomes:
How do I generate the required regex expression to use? I.e. I still need to
parse the inputted search string and convert that to a perl regex.
Can I use dynamic regex with perl in a search string?
Can I
Eric Bohlman <ebohlman@netcom.com> wrote in message
news:ebohlmanFDAMzs.I5w@netcom.com...
> Pamela Goldfarb (pamelag@interlog.com) wrote:
> : I have a CSV file that contains a series of quoted words separted by
commas.
> :
> : I am using the DBD:CSV perl modules to manipulate the db.
> :
> : I want to create a simple web search page that will accept a standard
> : phrases such as:
> :
> : word1
> : word1 and word2
> : word1 or word2
> : "word1 word2"
> :
> : etc.
> :
> : Does there exist perl code to parse the user inputted search phrase and
then
> : search a database?
>
> Loic Dachary is working on a subclass of my Text::Query::Advanced module
> that will be able to generate SQL queries from expressions like the
> above. I'm not quite sure how close he is to final release, but I'd
> expect it out within a week or two.
>
------------------------------
Date: Mon, 14 Jun 1999 03:05:03 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Looking for general purpose perl search tool to search CSV table
Message-Id: <ebohlmanFDAr8G.125@netcom.com>
Pamela Goldfarb (pamelag@interlog.com) wrote:
: In thinking about the problem a little more, I don't need to generate a
: "where" clause per se.
:
: I can simple read in the database file and use pattern matching on the
: entire line.
:
: The question becomes:
:
: How do I generate the required regex expression to use? I.e. I still need to
: parse the inputted search string and convert that to a perl regex.
Text::Query::Advanced as it now stands will do just that, e.g.
my $search='(eggs or sausage) and not spam';
my $q=Text::Query::Advanced->new($search) or die "invalid query: $search";
foreach my $line (@lines) {
print $line if $q->matchscalar($line);
}
------------------------------
Date: Sun, 13 Jun 1999 20:00:07 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Looking for general purpose perl search tool to search CSV table
Message-Id: <Pine.GSO.4.02A.9906131956340.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Pamela Goldfarb wrote:
> How do I generate the required regex expression to use? I.e. I still
> need to parse the inputted search string and convert that to a perl
> regex.
If you're going to answer your own questions, you don't need us! :-)
> Can I use dynamic regex with perl in a search string?
Yes, but also read about the /o modifier on patterns, in the perlop
manpage. If you have 5.005, you may want the qr// feature as well. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 13 Jun 1999 23:57:55 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Most of the problem fixed, but having string manipulation problems
Message-Id: <x7zp23h1rw.fsf@home.sysarch.com>
>>>>> "BM" == Ben Mullen <brutal@greenbaynet.com> writes:
BM> My current problem now is string manipulation. I'm still fairly
BM> new at Perl (this is a crash course in learning perl, my previous
BM> experience was in Applesoft Basic!!). Below is part of my code
oy gevalt!
BM> #parse short description file
BM> $defile = $index . $cartype . "SH.TXT";
BM> open (filehandle, $defile);
ALWAYS check open for success. see the zillions of other posts on how to
do this. also filehandles are conventionally in uppercase.
BM> @descstuff = $filehandle;
why are you assigning the variable filehandle to that array? perhaps you
mean to read in a line or lines from filehandle?
BM> $description = $descstuff[0];
BM> $mileage = $descstuff[1];
BM> $price = $descstuff[2];
BM> $damage = $descstuff[3];
these are broken since you never read anything into the array decstuff.
have you read any books on perl? you aren't even ding basci stuff
correctly here and this newsgroup is not menat for tutoring crash
courses. there are various on-line tutorials and some excellent
books. pelase study some more before you post here again.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 13 Jun 1999 22:19:04 -0400
From: "Leonid Goltser" <leonid76@erols.com>
Subject: need a server that supports perl(cgi)
Message-Id: <7k1op3$7vm$1@autumn.news.rcn.net>
Can anybody suggest a server, where I can upload my perl(cgi) scripts?
------------------------------
Date: Sun, 13 Jun 1999 19:43:34 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: need a server that supports perl(cgi)
Message-Id: <Pine.GSO.4.02A.9906131942080.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Leonid Goltser wrote:
> Can anybody suggest a server, where I can upload my perl(cgi) scripts?
If you're searching for something, a search service such as Yahoo is a
good place to start. Look for an Internet Service Provider (ISP). If you
still don't find anything, check the FAQs and newsgroups about servers.
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 22:29:53 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Need Help Anit-Back
Message-Id: <brian-ya02408000R1306992229530001@news.panix.com>
In article <3762AEA7.1A26@connect.ab.ca>, Tim <bie@connect.ab.ca> posted:
> I am making a game & I want to be able to stop the user from simply
> pushing back on their browser and trying again. How can I do this?
serialize submissions.
when you get a duplicate submission, don't accept it.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Sun, 13 Jun 1999 22:00:59 -0500
From: "Jeff Murphy" <jeffgtr@effingham.net>
Subject: Perl CGI and NT
Message-Id: <7k1ri3$22iq$1@odie.mcleod.net>
I"ve been running into some problems running some CGI scripts written in
Perl on a particular NT server and not sure what I'm doing wrong..getting
them to run on Unix is a snap, but can someone clarify this.
When specifying an absolute path back to a directory, should you
A: take the path back from the drive such as
c:/inetpub/wwroot/mydirectory/otherdirectory
B: path from the script ../otherdirectory (assuming script is in cgi-bin)
or should I be using \ instead of / in the directory path
I know this may be a really (I hope) elementary question, or not enough
info, but I'm new at running scripts on NT servers and am begrudgingly
keeping this site on an NT server instead of moving it over to a UNIX box
where things would be so much more straightforward.
------------------------------
Date: Sun, 13 Jun 1999 20:47:57 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl CGI and NT
Message-Id: <Pine.GSO.4.02A.9906132041500.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Jeff Murphy wrote:
> I"ve been running into some problems running some CGI scripts written in
> Perl on a particular NT server and not sure what I'm doing wrong..getting
> them to run on Unix is a snap, but can someone clarify this.
>
> When specifying an absolute path back to a directory, should you
You should do the same thing that you do when your program isn't written
in Perl. Check with the docs, FAQs, and newsgroups about CGI programming
for more information. But, since you asked...
> B: path from the script ../otherdirectory (assuming script is in
> cgi-bin)
You not only can't assume that, you can't assume that your working
directory is going to be the cgi-bin directory or the directory that the
script is in. On some servers, it's one, on some the other. On some, it's
another directory entirely, since the working directory is not part of the
CGI spec.
> or should I be using \ instead of / in the directory path
No, you can use forward slashes from Perl on Windows-type machines. But
you'll need to find the directory some other way than using relative
pathnames. At least, until you chdir to some fixed directory. The docs,
FAQs, and newsgroups about CGI programming and servers should be of help.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 14 Jun 1999 13:22:56 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Perl CGI and NT
Message-Id: <x0%83.100$hR4.28020@vic.nntp.telstra.net>
Jeff Murphy <jeffgtr@effingham.net> wrote in message
news:7k1ri3$22iq$1@odie.mcleod.net...
> I"ve been running into some problems running some CGI scripts written in
> Perl on a particular NT server and not sure what I'm doing wrong..getting
> them to run on Unix is a snap, but can someone clarify this.
>
> When specifying an absolute path back to a directory, should you
>
> A: take the path back from the drive such as
> c:/inetpub/wwroot/mydirectory/otherdirectory
> B: path from the script ../otherdirectory (assuming script is in cgi-bin)
>
> or should I be using \ instead of / in the directory path
>
> I know this may be a really (I hope) elementary question, or not enough
> info, but I'm new at running scripts on NT servers and am begrudgingly
> keeping this site on an NT server instead of moving it over to a UNIX box
> where things would be so much more straightforward.
>
>
I use NT and it works OK with absolute real paths.. remember the script is
called from the server itself. The relative path may change (probably does)
from site to site anyway.
I prefer to use backwacked backwacks but \\ because I double quotes (to
enable variables in the path name) but / seems to work just as well...
so.. take the path fully from the drive letter.
Wyzelli
------------------------------
Date: Mon, 14 Jun 1999 12:13:14 +0800
From: "superken" <superken@hutchcity.com>
Subject: Perl cgi with Foxpro database or Access database
Message-Id: <7k1ve5$h3b$1@news.ctimail.com>
I am looking for a way to access a Foxpro database or Access database using
Perl script that runs on Unix server. Can anyone give me some idea on this?
Do I need ODBC?
Pls help.
------------------------------
Date: 13 Jun 1999 22:18:31 -0700
From: Brad Murray <bjm@a2b01118.paralynx.bconnected.net>
Subject: Re: Perl cgi with Foxpro database or Access database
Message-Id: <87vhcrbbrs.fsf@a2b01118.paralynx.bconnected.net>
>>>>> "superken" == superken <superken@hutchcity.com> writes:
superken> I am looking for a way to access a Foxpro database or
superken> Access database using Perl script that runs on Unix
superken> server. Can anyone give me some idea on this? Do I need
superken> ODBC?
Look for DBI and DBD::ODBC and possibly DBD::xBase at your friendly
neighbourhood CPAN.
--
Brad Murray "Anyway, you can tell that CreateProcess is simply wrong,
Perl Geek not just because it's too complicated yet too limited, but
because its name is long and ugly." Tom Christiansen
------------------------------
Date: Sun, 13 Jun 1999 21:53:46 -0500
From: "Jeff Murphy" <jeffgtr@effingham.net>
Subject: Re: PERL tutorial
Message-Id: <7k1qpj$in4$1@odie.mcleod.net>
I agree..the Perl Cookbook will get you up and running fast with some
scripts. I am primarily a page designer, my expertise is in HTML and DHTML,
with a little background programming in Basic and Fortran. The Cookbook
was/is a Godsend. The Cookbook has a pretty sophisticated form handling
program as well as several others. As far as actually programming in perl,
rather than modifying "ready made" scripts Learning Perl would be more
useful.
John Callender <jbc@shell2.la.best.com> wrote in message
news:3764248c$0$215@nntp1.ba.best.com...
> Georgy Mateev <mateev@geocities.com> wrote:
> > Where can i find good tutorial for PERL?
>
> 1) The book Learning Perl (the llama book) is the best thing out there,
> currently, in terms of a book-length tutorial. It assumes prior
> programming knowledge, but lots of people have learned Perl with it
> without being programmers at the outset. If you're a programmer
> already, it's just the ticket. Go nuts and buy Programming Perl and the
> Perl Cookbok (camel and ram, respectively) while you're at it. You
> won't be sorry.
>
> 2) Robert's Perl Tutorial is a really nice Web-based treatment that
> focuses on using Perl under Windows:
>
> http://www.netcat.co.uk/rob/perl/win32perltut.html
>
> 3) My own more modest example, which focuses on using Perl for CGI
> scripting, is at:
>
> http://www.lies.com/begperl/
>
> 4) Finally, everything else that's especially worthwhile can probably
> be found within a few clicks of:
>
> http://www.perl.com/
>
> Good luck!
>
> --
> John Callender
> jbc@west.net
> http://www.west.net/~jbc/
------------------------------
Date: Sun, 13 Jun 1999 23:29:40 -0700
From: "Ken Snyder" <ksnyde@msn.com>
Subject: Re: PerlScript ... what features are missing?
Message-Id: <iz%83.2322$qO5.262781@typhoon01.swbell.net>
Tom (and all),
Ok ... my bad. I need to look into how much radiation my monitor is
emitting. While I did have the "=" sign in the little Perl program I wrote,
the PerlScript didn't have it. Anyway, thanks for promptly getting back
and helping me get over my "brain fart". :^)
ken
Tom Phoenix <rootbeer@redcat.com> wrote in message
news:Pine.GSO.4.02A.9906131555070.6999-100000@user2.teleport.com...
> On Sun, 13 Jun 1999, Ken Snyder wrote:
>
> > > > $myVariable << 'END_OF_HTML';
> > > > <html>
> > > > hello world
> > > > </html>
> > > > END_OF_HTML
> > > > print $myVariable;
>
> > The HTML -- while it appears to have NO error -- is totally irrelevant
> > to the problem and is just placeholder text.
>
> That's fine if you want to call it placeholder text. I won't argue valid
> versus invalid HTML here; that would be off topic anyway.
>
> > The code snippet included in this email works fine under Perl.
>
> What version of Perl permits you to assign to $myVariable without use of
> an equal sign? What version lets you indent the END_OF_HTML marker like
> that? Could you be mistaken?
>
> > If you take exactly the same snippet and just change the "print"
> > statement to a "$Response->Write" statement, it fails. Not on that
> > line but rather in recognizing the assignment statement that preceeds
> > it.
>
> I (still) don't see how you expect Perl to recognize a line without an
> equal sign as an assignment statement. Could you take another look at the
> code, please? Thanks!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
------------------------------
Date: Sun, 13 Jun 1999 21:43:53 -0400
From: "Ryan T. Rhea" <ryan420@earthling.net>
Subject: simple math question! Why doesn't the * multiply two numbers?
Message-Id: <37645E58.F740879A@earthling.net>
I have written the following script in perl. Everything works except
the multiplication. What's going on?
#!/usr/bin/perl
#
# simple command line calculator
# Copyright 1999 by Ryan T. Rhea
$num1 = @ARGV[0];
$oper = @ARGV[1];
$num2 = @ARGV[2];
if ($oper eq "+")
{
print $num1 + $num2; print "\n";
}
if ($oper eq "-")
{
print $num1 - $num2; print "\n";
}
if ($oper eq "/")
{
print $num1 / $num2; print "\n";
}
if ($oper eq "*")
{
print $num1 * $num2; print "\n";
}
Thanks in advance,
Ryan T. Rhea
please reply to ryan420@earthling.net
------------------------------
Date: 13 Jun 1999 23:49:06 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: simple math question! Why doesn't the * multiply two numbers?
Message-Id: <7k254i$hiv@flatland.dimensional.com>
"Ryan T. Rhea" <ryan420@earthling.net> writes:
> I have written the following script in perl. Everything works except
> the multiplication. What's going on?
Are you quoting or escaping * when you run the script? If not, your
shell is probably doing wildcard expansion on it. Try printing @ARGV
to see what arguments are being passed.
> #!/usr/bin/perl
It's always a good idea to use -w, like this:
#!/usr/bin/perl -w
This will warn you of another problem in your script.
Hope this helps.
> #
> # simple command line calculator
> # Copyright 1999 by Ryan T. Rhea
> $num1 = @ARGV[0];
> $oper = @ARGV[1];
> $num2 = @ARGV[2];
> if ($oper eq "+")
> {
> print $num1 + $num2; print "\n";
> }
> if ($oper eq "-")
> {
> print $num1 - $num2; print "\n";
> }
> if ($oper eq "/")
> {
> print $num1 / $num2; print "\n";
> }
> if ($oper eq "*")
> {
> print $num1 * $num2; print "\n";
> }
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
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 5982
**************************************