[6739] in Perl-Users-Digest
Perl-Users Digest, Issue: 364 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 24 15:17:15 1997
Date: Thu, 24 Apr 97 12:00:26 -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 Thu, 24 Apr 1997 Volume: 8 Number: 364
Today's topics:
*where to find .mvb decompiler (joanne)
*where to find .mvb decompiler (joanne)
Re: [Q] Which Perl book next (Ajai Khattri)
Re: ADVERTISE TO OVER 100 MILLION PEOPLE FOR FREE!!! (Bill)
ANNOUNCE tkREM - Regular Expression Maker (wes bailey)
Re: Any graphic module available? <mike@soft-tek.com>
Re: Any graphic module available? <burleigh@hackberry.chem.niu.edu>
Calculating dates <daleweb@io.com>
Re: Calculating dates <tchrist@mox.perl.com>
Re: Calculating dates (Kyzer)
CGI History <bretth@corp.sgi.com>
Re: CGI History <eryq@enteract.com>
Converting IP address and ranges to net/mask pairs (Wes Brown)
Re: Day of the week <burleigh@hackberry.chem.niu.edu>
Re: Help with Filehandles <gtk@walsh2.med.harvard.edu>
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Paul Prescod)
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Mike Coffin)
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th <prasadm@polaroid.com>
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th <prasadm@polaroid.com>
Need help with Perl <mjb@voodoo.ca.boeing.com>
Need source for calling search engines <#fmlysoft@smtp.ix.netcom.com>
Re: Need source for calling search engines <brobbins@pls.com>
Re: No syntax errors, but still the thing won't run (Andrew M. Langmead)
Re: Perl and EBCDIC <eryq@enteract.com>
Re: Perl as its own metalanguage? <seay@absyss.fr>
Re: Perl as its own metalanguage? (Terrence M. Brannon)
perl backup script? <mikee@spindle.net>
Re: raw input (Honza Pazdziora)
Re: recursive directtory tree walk <mcampbel@tvmaster.turner.com>
Sybperl for NT ? <novak@microcomp.de>
test, just ignore it. <christer@dtc.se>
Re: They both suck! (was: Borland or Microsoft compiler jawalker @ ccgate dp beckman com
Re: Things that work on $_ (Ajai Khattri)
url_get on Solaris <j.m.seaton@larc.nasa.gov>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 22 Apr 97 04:14:43 GMT
From: jollity@mbox3.singnet.com.sg (joanne)
Subject: *where to find .mvb decompiler
Message-Id: <5jo69g$6pk@lantana.singnet.com.sg>
Anybody know where to find the mvb file decompiler which was created by
microsoft multimedia viewer publishing toolkit,
please reply if you know
Thanks in advance
joanne
------------------------------
Date: Tue, 22 Apr 97 04:14:35 GMT
From: jollity@mbox3.singnet.com.sg (joanne)
Subject: *where to find .mvb decompiler
Message-Id: <5jo699$6pk@lantana.singnet.com.sg>
Anybody know where to find the mvb file decompiler which was created by
microsoft multimedia viewer publishing toolkit,
please reply if you know
Thanks in advance
joanne
------------------------------
Date: Thu, 24 Apr 1997 15:36:21 GMT
From: ajai@nwt.com (Ajai Khattri)
Subject: Re: [Q] Which Perl book next
Message-Id: <33657d9f.61254835@news.infohouse.com>
On 18 Apr 1997 16:57:25 GMT, cjk@omedsrvb.omed.pitt.edu (Carl Joel
Kuzmich), wrote:
|I have gone through "Learning Perl" and "Perl Programming" and found
|both books to be excellent. Thanks to whomever recommended these books.
|
|I'm up to the next step, which is translating this to the web. Which
|book would you suggest as the next step? Assume that I know nothing
|about cgi programming and would like to use the perl I have learned to
|create pages that are generated via perl scripts.
O'Reilly also publish an excellent book on programming CGI, look at:
`CGI Programming on the World Wide Web' by Shishir Gundavaram.
It has a mouse on the cover ;-)
Cheers,
--
Aj. (ajai@nwt.com)
New World Technologies - `the Psion house'
Any mistakes I make are prob. due to human OOM errors ;-)
(800) 886-4967 | +1 (212) 941-4633 | http://www.nwt.com
------------------------------
Date: 24 Apr 1997 18:52:29 GMT
From: bill@sover.net.no.junkmail (Bill)
Subject: Re: ADVERTISE TO OVER 100 MILLION PEOPLE FOR FREE!!!
Message-Id: <slrn5lvavd.bpd.bill@granite.sover.net>
The point you people miss is that junk email is ANNOYING. Very
annoying. So annoying in fact, that many people will go out of their way
to avoid companies that do bulk emailing. Instead of considering how
many people you can reach, consider how many people you're completely
turning off to your company. I think that rather than making unsolicited
email illegal (as is being attempted in Nevada), I think SPAM should be
make illegal. Usenet, email, and all of the Internet are just
communication channels, and any communication channel flooded with
endless copies of the same thing (posts crossposted to 250 groups, for
instance) is just ruining the media for everyone. Sending one email message
to 100,000 people is just as ruinous. Rather than infringe on free
speech, we should crunch down on those people that try to send ANYTHING
to more than say, 20 people or 20 newsgroups. That way no censorship of
content is being done, but spam is reduced and the Internet isn't
overwhelmed by cheapskates trying to make a quick buck. All IMHO, of course.
Bill
--
Sending me unsolicited email through mass emailing about a product or
service your company sells ensures that I will never buy or recommend your
product or service.
------------------------------
Date: 22 Apr 1997 02:23:59 GMT
From: bailey@phys.ksu.edu (wes bailey)
Subject: ANNOUNCE tkREM - Regular Expression Maker
Message-Id: <5jh7fv$n2b$1@cnn.ksu.ksu.edu>
Keywords: Perl, Regular Expressions
----------------------------------------------------------------------
tkREM
Tcl/Tk Regular Expression Maker
Written By Wes Bailey
bailey@phys.ksu.edu
http://www.phys.ksu.edu/~bailey/tkWorld.html
----------------------------------------------------------------------
Do you use any of the following tools, or languages:
o grep
o Perl
o Tcl/Tk
o Python
o Lex & Yacc
o Sed & Awk
Do you use Regular Expressions a lot? Do you get the rules, and
meta-characters, for the different tools, and languages, mixed up?
Have you wanted to learn Regular Expressions, but always been
intimidated by their syntax?
tkREM is tool written in Tcl/Tk, that provides a Graphical User
interface for making Regular Expressions. Depending on which mode you
are in (available modes listed above), grouped buttons with the
allowable meta-characters appear in the interface. Clicking on a
button inserts the meta-characters in an entry, who's contents
can then be selected and pasted in another application. When the
mouse is over a button, Wizard Help messages provide usage rules, and
give examples of how to use the meta-characters.
Perl programmers will now be able to keep track of the myriad of 70+
meta-characters, and operators, which are available. Build Sed & Awk
scripts, without using an editor, just by pointing and clicking.
Python programmers, I need your help! Please look at the other modes,
and send suggestions on how I should build your interface. For now it
just defaults to Grep mode.
DOWNLOADING
-----------
tkREM is part of a larger project called tkWorld. For complete
information on this project, check out the official website:
http://www.phys.ksu.edu/~bailey/tkWorld.html
>From here you can download the most recent release of the project:
tkWorld-0.03.b1.tar.gz
You can also get tkWorld via anonymous FTP at:
ftp.phys.ksu.edu/pub/bailey
ftp.neosoft.com/pub/tcl/sorted/apps/tkWorld-0.03.b1/
files: tkWorld-0.03.b1.tar.gz
README.tkWorld
Hope this helps you get going with Regular Expressions!
Wes Bailey
------------------------------
Date: Thu, 24 Apr 1997 11:42:42 -0500
From: Mike Christensen <mike@soft-tek.com>
To: fish <gis84514@cis.nctu.edu.tw>
Subject: Re: Any graphic module available?
Message-Id: <335F8D82.1805@soft-tek.com>
fish wrote:
>
> Hello..
>
> I use perl to write CGI programs, it will process some data and then
> draw a graph and send back to the browser..
> Is there any module that can handle this?
> I know pgerl, but it require fortan compiler....
> and gnuplot can't draw gif file....
> any other available? Thanks a lot!
Please take a look at GRAFSMAN/WWW from Soft-tek International, Inc. On
our website, we have a live demonstration that shows exactly what you
have described. In addition, GRAFSMAN/WWW will automatically generate
an image map for you, letting you make your chart an interactive element
of your web application.
http://www.soft-tek.com
Please let me know if I can be of further assistance,
Mike Christensen
Soft-tek International, Inc.
Wichita, KS 67203
mailto:mike@osft-tek.com
http://www.soft-tek.com
------------------------------
Date: Thu, 24 Apr 1997 13:03:05 -0500
From: Darin Burleigh <burleigh@hackberry.chem.niu.edu>
Subject: Re: Any graphic module available?
Message-Id: <335FA059.4186@hackberry.chem.niu.edu>
> gis84514@cis.nctu.edu.tw (fish) writes:
>
> >
> > Hello..
> >
> > I use perl to write CGI programs, it will process some data and then
> > draw a graph and send back to the browser..
> > Is there any module that can handle this?
> > I know pgerl, but it require fortan compiler....
> > and gnuplot can't draw gif file....
gnuplot 3.6 can do gif plots.
--
==========================================================
- darin
burleigh@hackberry.chem.niu.edu
'2 kinds of green, look out!' - dieter rot
------------------------------
Date: Thu, 24 Apr 1997 11:28:14 -0500
From: Dale Churchett <daleweb@io.com>
Subject: Calculating dates
Message-Id: <335F8A1E.6B12@io.com>
I'm trying to find out a way of converting a date returned by a call to
`date` to yesterdays date:
$todays_date = `date`;
$todays_date will obviously return the time and date the script
containing this statement is being run, but I need to know the date in
the same format and time zone for the previous day.
I've searched through the man pages and looked at the strftime() command
in C but can't work out how to do it. I was also told to try changing
the TZ variable to
TZ=CST30CDT
and then call `date` but that didn't work on my system.
Any pointers would be greatly appreciated.
Thanks in advance.
Dale Churchett
------------------------------
Date: 24 Apr 1997 18:13:11 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Calculating dates
Message-Id: <5jo7rn$r42$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, daleweb@io.com writes:
:I'm trying to find out a way of converting a date returned by a call to
:`date` to yesterdays date:
:
:$todays_date = `date`;
$yesterday = localtime( time() - ( 24 * 60 * 60 ) );
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"They'll get my perl when they pry it from my cold, dead /usr/local/bin."
Randy Futor in <1992Sep13.175035.5623@tc.fluke.COM>
------------------------------
Date: 24 Apr 1997 18:29:28 GMT
From: junkmail@sysc.abdn.ac.uk (Kyzer)
Subject: Re: Calculating dates
Message-Id: <5jo8q8$u1@info.abdn.ac.uk>
When Dale Churchett met comp.lang.perl.misc....:
: I'm trying to find out a way of converting a date returned by a call to
: `date` to yesterdays date:
: $todays_date = `date`;
: $todays_date will obviously return the time and date the script
: containing this statement is being run, but I need to know the date in
: the same format and time zone for the previous day.
If the system won't do it, do it yourself.
'date' is a unix command that gets the date RIGHT NOW.
You could use the time() function to get the time (in seconds from 1970)
$mytime=time;
and then subtract 60*60*24 ; making the time 1 day less.
$mytime=time-86400;
The main problem is that perl doesn't - as standard - include strftime.
So:
@days=("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
@mnths=("Jan","Feb","Mar","Apr","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
chop($locale=`date +"%Z"`);
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime(time-86400);
print <<EOFISH
Time yesterday was:
$days[$wday] $mnths[$mon] $hour:$min:$sec $locale $year
EOFISH
# Thu Apr 24 19:01:33 BST 1997
Tadaa.... (doesn't take heed of any month/day title localization, though)
: I've searched through the man pages and looked at the strftime() command
: in C but can't work out how to do it. I was also told to try changing
You can't, but you can use date itself to call strftime, but only on the
current date.
: the TZ variable to
: TZ=CST30CDT
$ENV{'TZ'}="CST30CDT"; # not that it'll do you any good
: and then call `date` but that didn't work on my system.
TZ is the TimeZone you are in. It's there to accurately reflect time systems
of countries around the world, not to lop days off things.
Specifying a specific timezone will reflect that area of the world, not relative
to your local area.
Don't get me wrong: date is a very good command to use, but I'd prefer strftime
internally (time to write Time::Format ? :)
--
Stuart 'Kyzer' Caie - Kyzer/CSG |undergraduate of Aberdeen University |100%
http://www.abdn.ac.uk/~u13sac |My opinions aren't those of Aberdeen |Amiga -
kyzer@4u.net kyzer@hotmail.com |University or AUCC, thankfully.***** |always!
StudentCode(v1.0) BSc A Y-- C++ E L W- G+ X? P-- T++ F M H++
------------------------------
Date: Thu, 24 Apr 1997 09:16:03 -0700
From: Brett Heeke <bretth@corp.sgi.com>
Subject: CGI History
Message-Id: <335F8743.41C6@corp.sgi.com>
I am doing an MBA report on the history of CGI. I have not been able to
find any resources that identify how(what events, circumstances) led to
the CGI environment. Anybody know the answer or WEB sites that can
provide the answer. I have already researched the WWW and have been
unsuccessful in my attempts.
Your help is greatly appreciated. Please email me at bretth@corp.sgi.com
during the day or heekster@concentric.net during the evening.
This report is due 4/25/97. I would appreciate a fast response if
possible.
Thanks,
--
Brett Heeke
Sunnyvale, CA
------------------------------
Date: Thu, 24 Apr 1997 12:03:34 -0500
From: Eryq <eryq@enteract.com>
To: Brett Heeke <bretth@corp.sgi.com>
Subject: Re: CGI History
Message-Id: <335F9266.36886881@enteract.com>
Brett Heeke wrote:
>
> I am doing an MBA report on the history of CGI. I have not been able to
> find any resources that identify how(what events, circumstances) led to
> the CGI environment. Anybody know the answer or WEB sites that can
> provide the answer. I have already researched the WWW and have been
> unsuccessful in my attempts.
>
> Your help is greatly appreciated. Please email me at bretth@corp.sgi.com
> during the day or heekster@concentric.net during the evening.
>
> This report is due 4/25/97. I would appreciate a fast response if
> possible.
You probably should repost to comp.infosystems.www.authoring.cgi, which
is far more likely to have the answer than comp.lang.perl.misc.
HTH,
--
___ _ _ _ _ ___ _ Eryq (eryq@enteract.com)
/ _ \| '_| | | |/ _ ' / Hughes STX, NASA/Goddard Space Flight Cntr.
| __/| | | |_| | |_| | http://www.enteract.com/~eryq
\___||_| \__, |\__, |___/\ Visit STREETWISE, Chicago's newspaper by/
|___/ |______/ of the homeless: http://www.streetwise.org
------------------------------
Date: 24 Apr 1997 16:07:03 GMT
From: wes@prozac.eeap.cwru.edu (Wes Brown)
Subject: Converting IP address and ranges to net/mask pairs
Message-Id: <5jo0f7$5us@madeline.INS.CWRU.Edu>
I would like to find a section of perl that when given any of the
following it returns the correct net/mask pair:
192.168.2.1
192.168.3.(1-10)
192.168.4.0-192.168.5.255
192.168.7.0
Any help would be appreciated. I assume that someone has needed this
before, and I am very interested in finding out how to find programs like
this. CPAN has not been much help except for finding modules. Is there a
list somewhere of what subroutines are available and what they do.
{Please note: Followup-To: header set}
Wes
---
Wes Brown
ewb4@po.cwru.edu wes@prozac.cwru.edu
http://prozac.cwru.edu/wes/About.me.html
KB8TGR
------------------------------
Date: Thu, 24 Apr 1997 13:04:28 -0500
From: Darin Burleigh <burleigh@hackberry.chem.niu.edu>
Subject: Re: Day of the week
Message-Id: <335FA0AC.40FB@hackberry.chem.niu.edu>
Nathan V. Patwardhan wrote:
>
> Mark Guz (markguz@sol.co.uk) wrote:
> : I have a text file with a field in there which shows the month and
> : date(MAR1 or APR2)
>
> You could use localtime() and roll-yer-own variable => month name
> converter, but why? You might find the Date modules useful for your
> needs, available at a CPAN near you!
>
> http://www.perl.com/CPAN/modules/by-module/Date/
>
> --
> Nathan V. Patwardhan
> nvp@shore.net
on Unix, try man mktime
--
==========================================================
- darin
burleigh@hackberry.chem.niu.edu
'2 kinds of green, look out!' - dieter rot
------------------------------
Date: 24 Apr 1997 14:27:56 -0400
From: Gregory Tucker-Kellogg <gtk@walsh2.med.harvard.edu>
Subject: Re: Help with Filehandles
Message-Id: <w2rag0p977.fsf@walsh2.med.harvard.edu>
Russ Allbery <rra@stanford.edu> writes:
>
> Gregory Tucker-Kellogg <gtk@walsh2.med.harvard.edu> writes:
>
> > I've wondered why the FileHandle and IO:File modules don't provide this.
> > There's no reason I can see why the File *handle* can't be kept as a
> > tied scalar, and the file *name* accessed via an object method.
>
> 'cause at most you can know the file name you originally opened. It's
> entirely possible that in the meantime you've renamed the file, deleted
> it, or otherwise broken the assocation between that FileHandle and that
> name, and if you then use the name the FileHandle thinks it's associated
> with you get bogus results.
>
> Once you have a file open in Unix, it's associated with a file descriptor,
> not a name, and the name can change. The behavior of FileHandle and
> IO::File follow that model.
>
Good point. What I would *like* to be able to do with one of these
modules is something like:
use IO::File;
use Fcntl;
$fh = new IO::File("foo",O_RDONLY);
...
$fh->close;
...
$fh->reopen(O_RDWR); # This is not possible, but would be if $fh knew
# about a previously declared file name
--
Gregory Tucker-Kellogg
Department of Biological Chemistry and Molecular Pharmacology
Harvard Medical School, Boston MA 02115
"Mojo Dobro" Finger for PGP info
------------------------------
Date: Thu, 24 Apr 1997 12:44:47 GMT
From: papresco@csclub.uwaterloo.ca (Paul Prescod)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <E957En.J6@undergrad.math.uwaterloo.ca>
In article <335E3AFB.73B4@polaroid.com>,
M. Prasad <prasadm@polaroid.com> wrote:
>We seem to have lots of opinions, with a fair amount
>of blame placement on management. But you don't get to manage
>a start-up with that many high-powered brains, unless
>you are really good and proven.
???
You have a frightening faith in capitalism. It doesn't work that well,
though that's what they would like you to believe.
Paul Prescod
------------------------------
Date: 24 Apr 1997 16:28:09 GMT
From: mhc@sigmund.Eng.Sun.COM (Mike Coffin)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <5jo1mp$11s@engnews1.Eng.Sun.COM>
In article <335E4E2F.776E@polaroid.com>,
M. Prasad <prasadm@polaroid.com> wrote:
>Is it just my perception, or does this gent [Eric Naggum] really
>have a severe attitude problem?
Eric is a very smart and knowledgable person who makes a lot of very
good points on many subjects. I suggest you do what many of us do:
ignore his rhetorical flourishes and personal opinions, but pay
attention to his technical arguments.
-mike
------------------------------
Date: Thu, 24 Apr 1997 13:05:17 -0400
From: "M. Prasad" <prasadm@polaroid.com>
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <335F92CD.2D3F@polaroid.com>
Mike Coffin wrote:
>
> In article <335E4E2F.776E@polaroid.com>,
> M. Prasad <prasadm@polaroid.com> wrote:
>
> >Is it just my perception, or does this gent [Eric Naggum] really
> >have a severe attitude problem?
>
> Eric is a very smart and knowledgable person who makes a lot of very
> good points on many subjects. I suggest you do what many of us do:
> ignore his rhetorical flourishes and personal opinions, but pay
> attention to his technical arguments.
>
> -mike
OK. As long as it is clear that even though I have
hacked Lisp at times, I am by no means at all a "Lisper" as
exemplified by Erik and his followers here....
Pray tell, what technical argument?
Let me summarize my understanding here.
We seem to having comments on Ousterhout's paper.
Ousterhout's thesis: Scripting languages are
a phenomenon in their own right, and are quite
distinct from systems languages. They are
becoming significant, and this is likely
to continue.
Some side theses: Scripting languages tend to
be typeless. Strings are a good uniform data type
for scripting languages.
Approximate Summation of Responses:
Scheme/Lisp is good for everything.
I can do this in Lisp.
I can do that in Scheme.
I can do this in this here system written in Lisp/Scheme.
Everybody must read such-and-such book.
Everybody must learn about such-and-such system.
JO hasn't responded to the "real" stuff.
Tcl is <derogatory> and <derogatory> and <derogatory>
JO is <derogatory> and <derogatory> and <derogatory>
People who use Tcl are <derogatory> and <derogatory>...
People who object to the derogatory language are ...
The mind boggles. Which of these pieces of
technical insight should one respond to?
I have barely seen the basic thesis discussed, only
agendas pushed.
------------------------------
Date: Thu, 24 Apr 1997 13:31:55 -0400
From: "M. Prasad" <prasadm@polaroid.com>
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <335F990B.6D5F@polaroid.com>
Paul Prescod wrote:
>
> In article <335E3AFB.73B4@polaroid.com>,
> M. Prasad <prasadm@polaroid.com> wrote:
> >We seem to have lots of opinions, with a fair amount
> >of blame placement on management. But you don't get to manage
> >a start-up with that many high-powered brains, unless
> >you are really good and proven.
>
> ???
>
> You have a frightening faith in capitalism. It doesn't work that well,
> though that's what they would like you to believe.
>
> Paul Prescod
I don't mean all startups are like that... But the
cases discussed here were very high visibility ones.
------------------------------
Date: Thu, 24 Apr 1997 17:55:27 GMT
From: Mehdi Beygi <mjb@voodoo.ca.boeing.com>
Subject: Need help with Perl
Message-Id: <335F9E8F.41C6@voodoo.ca.boeing.com>
I am new to Perl and would appreciate to get help with
a Perl problem.
Problem: I want to run a process and redirect STDOUT to a file.
for example how to do:
in C-Shell: ls -l > myfile in Perl: ???
I know I can do domething like this:
system("ls -l > myfile");
but what I do is a bit more complex and this does not quite work.
I basically start a process in which I get user's input from
<STDIN> and save it to MyFile. Then I start another process and
set up an input filter and redirect the output of this process to
another MyFile2 (or append to a MyFile) and finally I want
to read MyFile, MyFile2 and mail it to an address.
When I read MyFile2 it is empty. Although after the Perl program
is finished when I look at the file it has new data. It seems
like my program terminates while the other process has not yet finished.
I tied to add a pause to allow the second process to finish but that
did not work either.
#********************** Mail Info Script *****************************
print "Print your message\n";
print "> ";
$eof = ".\n";
open(DESCFILE, ">desc");
$line = <STDIN>;
if ($line eq $eof) {
print DESCFILE "No Comment\n";
} else {
print DESCFILE $line;
while($line ne $eof) {
print "> ";
$line = <STDIN>;
print DESCFILE $line;
}
}
close(DESCFILE);
# start dbx process
system("perl dbxit >> desc");
#system("sleep 5");
&mail_data;
sub mail_data {
open(DESCFILE, "desc") || die "could not open file: core_desc";
open (MAIL, "|mail mjb@voodoo");
while ($line = <DESCFILE>) {
print MAIL $line;
}
close(MAIL);
close(DESCFILE);
1; # return value is TRUE
}
#**************************dbxit scipt ******************************
# open dbx as a file and initiate commands to look at stack
open(DBX, "|dbx myexe my_core");
print DBX "where\n";
print DBX "quit\n";
close(DBX);
--
mjb thanks you
------------------------------
Date: Thu, 24 Apr 1997 13:28:17 -0400
From: "Edward F. Hinton" <#fmlysoft@smtp.ix.netcom.com>
Subject: Need source for calling search engines
Message-Id: <335F9831.51D0@smtp.ix.netcom.com>
I am looking for any Perl example source code that
can send a request to any of the popular web search engines and
can get back the results to then be post-processed
before presenting a web page of results to a user.
I have seen several meta-search tools out there (without source),
so it obviously can be done (perhaps not in perl???),
but I can't figure out how.
Is there some simple way for a Perl program to invoke
a cgi on another system and use stdin for results, or is
there some other trick?
Thanks.
-Ed Hinton
Inter-Objects, Inc.
------------------------------
Date: Thu, 24 Apr 1997 14:18:07 -0400
From: Bert Robbins <brobbins@pls.com>
To: fmlysoft@ix.netcom.com
Subject: Re: Need source for calling search engines
Message-Id: <335FA3DF.265C@pls.com>
Go and grab the URL: http://www.thedaily.com/overlook.html and
look at the bottom of the page/file. You will find there how
this page allows you to enter a search term and have it passed
to a few search engines.
Thanks
--
Bert Robbins
------------------------------
Date: Thu, 24 Apr 1997 18:10:44 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: No syntax errors, but still the thing won't run
Message-Id: <E95MHw.DL@world.std.com>
[a copy of this article was sent by e-mail to rant@lp-llc.com]
Kevin Cotter <rant@lp-llc.com> writes:
>In closing, If I ever again have a script, that a -w shows no syntax
>errors yet I still get an error 500 when running from the web, what
>would be the best step for me to take in solving this problem.
Learn or review the syntax of the protocol you are implementing, (in
this case CGI) and ensure that your program adheres to that protocol.
There is a difference between a program that follows the syntax rules
of a language, and a program that performs its desired result. Just
think, even if you get a "General Protection Fault" (or whatever they
are called now.) from a Windows Application, it must have compiled
without errors.
Once you're program correctly follows the syntax rules of the
language, you must ensure that it performs the actions you
intend. Perl can't tell the difference between:
print "Location: $success\n"; #success
and
print "Location: $success\n\n"; #success
It can't even tell the difference between
print "Location: $success\n"; #success
and
print "Hello World\n"; #success
In other words, perl doesn't have any concept of the separator between
a CGI header and data. This is because the perl language has _nothing_
to do with CGI. The CGI issues are the same regardless of which
language is used. For a shell script,
echo "Location: $success"; #success
echo
will work, but
echo "Location: $success"; #success
alone will not.
This is what upsets most of the long time comp.lang.perl
contributors. Few of them spend much time developing CGI
scripts. (They've been programming perl long before the WWW ever
existed.) There are questions that people have about the perl
language. There are reasons for people to discuss things about writing
programs in perl. (Efficiency, tricks and tips, techniques, wish lists
of features that perl doesn't yet have, etc.) Helping implement the
CGI protocol over and over again isn't very interesting to them.
If your question really was about perl, an appropriate subject line
would be:
Subject: "How do I print two consecutive newlines"
So, next time you want to find out how to print two consecutive
newlines, post here. (After checking the man pages, FAQ, and other
relevant documentation.) We'd be glad to help. If you want to find out
how to make your program do something in particular, check the
resources that deal with that matter. If it is graphics, look at books
on computer graphics, graphics file formats, the comp.graphics
newsgroup. If it is CGI, check the CGI spec. books on CGI, and the
newsgroup comp.infosystems.www.cgi.
After finding out precisly what you want your program to do. (In your
case, the CGI protocol.) you'll have to learn to ensure that program
is doing what you expect. This is debugging. One tool to use when
debugging is a piece of software called a "debugger". The perl
debugger is very minimalist, but very flexible. The time spent
learning to use it will be worth it. (If you are about to ask how to
debug your CGI script, you are still missing the difference between
comp.lang.perl.misc and comp.infosystems.www.cgi. A
comp.lang.perl.misc question might be "How can I use the perl debugger
when my program is not being run from a terminal." We'll get to that
later.)
Another tools for debugging are temporarily inserting special output
statements into your code. Another would be to create some sort of
method faking input into your program. (This is especially useful if
the input to the program doesn't come directly from a user. CGI might
fit this criteria) The "diff" program might be another
tool. (Determine what the output should be and keep making changes
until the actual output and the expected output match.) The server
logs are another debugging tool.
Microsoft Press has released some titles over the past few years that
aren't about language syntax itself, but higher level aspects of
product development. Maybe you should start taking a look at those and
see if they might be useful. One title that I'm thinking of off the
top of my head is "Code Complete" and "".
OK, I haven't figured out a good transition from here to "How can I
use the perl debugger when my program is not being run from a
terminal", (but that's OK, because I don't think I've made a good
transition between anything so far.) Maybe the better thing to do is
to figure out how to run your program from a terminal, and mimic the
environment your program expects. One method would be to figure out
how to pass input the same way that your program is and figure out
some way to convert output into something that you can understand. You
might have to write more programs that can set things up in this way,
or you might have to make small modifications to your program so you
can input things in a more natural way. I bet you could create
something like this:
#!/usr/bin/perl -w
$ENV{QUERY_STRING} = # something that fits the CGI spec.
$ENV{...} = # whatever else a CGI script needs.
...
system("perl -d cgiscript >output.txt");
system("lynx output.txt");
Now the issue of the CGI module was brought up before. Basically, what
that module has done is packaged up a lot of the functionality that a
programmer needs for developing programs that conform to the CGI
protocol, and put them in a format that can easily be invoked from a
program. Instead of learning the CGI protocol, all you have to do is
learn how to use the CGI.pm library. Assuming the interface to CGI.pm
is simpler than handling the CGI protocol yourself, you should come up
with an easier time by learning how to use the CGI.pm module. You
might want to consider this route. Then instead of posting "why
doesn't this CGI program work", you can post "Why doesn't my call to
xxx in CGI.pm produce yyy" to comp.lang.perl.modules, and people won't
complain about you being off topic.
--
Andrew Langmead
------------------------------
Date: Thu, 24 Apr 1997 12:01:06 -0500
From: Eryq <eryq@enteract.com>
To: Will Morse <will@Starbase.NeoSoft.COM>
Subject: Re: Perl and EBCDIC
Message-Id: <335F91D2.41766435@enteract.com>
I'm not familiar with EBCDIC, but wouldn't a tr/// expression
have been a better choice for TRanslating EBCDIC characters to ASCII?
A character-by-character lookup table is apt to be slooooooooooooow.
--
___ _ _ _ _ ___ _ Eryq (eryq@enteract.com)
/ _ \| '_| | | |/ _ ' / Hughes STX, NASA/Goddard Space Flight Cntr.
| __/| | | |_| | |_| | http://www.enteract.com/~eryq
\___||_| \__, |\__, |___/\ Visit STREETWISE, Chicago's newspaper by/
|___/ |______/ of the homeless: http://www.streetwise.org
------------------------------
Date: Thu, 24 Apr 1997 18:19:33 +0100
From: Douglas Seay <seay@absyss.fr>
Subject: Re: Perl as its own metalanguage?
Message-Id: <335F9625.E014B9B@absyss.fr>
Ronald L. Parker wrote:
>
> On 23 Apr 1997 17:05:41 -0700, brannon@bufo.usc.edu (Terrence M.
> Brannon) wrote:
>
> >Tom Christiansen <tchrist@mox.perl.com> writes:
> >
> >> int i = (1,2);
> >is this C syntax? what does it mean?
>
> It's a slightly obfuscated way of saying "int i = 2;"
>
> The comma operator executes its operands in order, then takes its
> value from the value of the second operator.
But it isn't all that obscure because many C programs use a
fgets/feof construct, something like
while ( fgets(buffer, LEN, file) , !feof(file) )
{ ... }
Which calls fgets(), ignores that return code, and then call feof().
The return of feof() is the value of the expression. This is the
same as
while ( !feof(file) )
{ ... }
other than the side effects of fgets (setting the EOF flag, copying
data to buffer, moving the file pointer, stuff like that).
- doug
------------------------------
Date: 24 Apr 1997 10:06:42 -0700
From: brannon@bufo.usc.edu (Terrence M. Brannon)
Subject: Re: Perl as its own metalanguage?
Message-Id: <ysizbu74wdt2.fsf@bufo.usc.edu>
Luca Passani <lpa@sysdeco.no> writes:
> Logic programming is the wrong answer, the right one is called
> Object-Orientation: do whatever kind of dirty acts your immagination can
> think of in your objects, but provide a clean interface to the others.
> Once it works, it will work for good.
Try Object-oriented logic programming
--
o============o Sending unsolicited commercial e-mail (UCE) to this address
Legal Notice is indication of your consent to pay me $120/hour for 1 hour
o============o minimum for professional proofreading & technical assessment.
terrence brannon * brannon@kappa.usc.edu * http://rana.usc.edu:8376/~brannon
------------------------------
Date: Thu, 24 Apr 1997 12:50:32 -0500
From: "Mike Eggleston" <mikee@spindle.net>
Subject: perl backup script?
Message-Id: <335f9d4b.0@news1.ibm.net>
Anyone have a good *generic* backup up script in perl? I'm looking for
multi-level backups, with compression, that can work across a network
and maybe with a tape jukebox.
Any ideas?
TIA
mikee
------------------------------
Date: Thu, 24 Apr 1997 16:41:18 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: raw input
Message-Id: <adelton.861900078@aisa.fi.muni.cz>
Sascha Teske <slash@deil.de> writes:
> hi everybody,
>
> this is my first time "talking news" so sorry for my maybe dump behavior
>
> I have a Problem i want to write an more intelligent chat and want to
> use perl is there a way to get data before or without a newline "amen" ?
> don't say RTFM to me, I DID !!!
Hmmm ;-)
Check you nearest CPAN for module Term::ReadKey, or maybe some other
module in the category 8) User Interfaces.
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 24 Apr 1997 12:39:22 -0400
From: Mike Campbell <mcampbel@tvmaster.turner.com>
Subject: Re: recursive directtory tree walk
Message-Id: <r5pvvkqssl.fsf@tvmaster.turner.com>
lg@kt.dtu.dk (Lars Gregersen) writes:
> >I want all the directory filelists to go into @allfiles.
>
> Don't reinvent the wheel. Check out if there is an existing module
> that does what you want. In this case the module File::Find does it
> all for you.
Exactly.
Another (albeit cheezy) solution might be something like:
@allfiles = `find . -type f -print 2>/dev/null`
------------------------------
Date: Thu, 24 Apr 1997 17:52:01 +0200
From: Petr Novak <novak@microcomp.de>
Subject: Sybperl for NT ?
Message-Id: <335F81A1.31A3@microcomp.de>
Hallo !
I tried to find Sybperl for NT. On archives I found only Unix versions.
Any hints ?
Petr
------------------------------
Date: 24 Apr 1997 17:38:54 GMT
From: "Christer A. Wittusen" <christer@dtc.se>
Subject: test, just ignore it.
Message-Id: <01bc50d8$78592f40$04460ec1@multix.dtc.se>
Im having trouble posting on the news so this is only a test.
/cw
------------------------------
Date: Thu, 24 Apr 1997 16:31:32 GMT
From: jawalker @ ccgate dp beckman com
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <335f8a4b.69819965@134.217.241.216>
On Tue, 22 Apr 1997 23:59:07 GMT, t21@ix.netcom.com (Stephan Schaem)
wrote:
>In article <5ja3nu$9as$1@diana.ibernet.es>, Santiago Mediodia <moony@maptel.es> wrote:
>>Da Borg <vla_di_mip@uniserve.com> escrituras: > [.............]
>>> > > My company is planning to start a project. We have a big question
>>> > > about our investments. We don't know if we should use Microsoft
>>> > > compiler or Borland. Some myth we heard over the net.
>>> > >
>>> > > 1) 90% of the programmer uses Microsoft Compiler.
>>> > > 2) Borland will vanish in 2 years (NASDAQ:BORL)
>>> > > 3) Borland has better compiler
>>> > > 4) 99% of the College in US have/use Borland Compiler.
>>> > >
>>> > > Some one show us the way?
>>>
>>I cant understand why is people still using Microsoft or Borland to
>>make projects. Just, if I see the size of an integer in my Pentium with
>>Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
>>the size of the data bus? Something is wrong 'cause Linux gives me 4 bytes
>>so 32 bits, and thats really the size of the data bus in a Pentium...
>>
>
> Actually the data bus is 64bit... int is more representative of the regiter
> size.
Int doesn't have to correlate to the width of the data bus in any way.
There is no standard that requires this. If your code assumes that,
it is broken.
>
>>Another one, Borland gives me restrictions when i ask for memory. Only 64
>>k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter
>>
>>Another one. Linux is free so, very cheap, Microsoft or Borland ....
>>
>
> linux is not a compiler.... and cant you run gcc under dos/windows?
>
> Stephan
>
>
>>
>>
------------------------------
Date: Thu, 24 Apr 1997 15:50:11 GMT
From: ajai@nwt.com (Ajai Khattri)
Subject: Re: Things that work on $_
Message-Id: <335f7f40.82799@news.infohouse.com>
On 19 Apr 1997 02:47:24 GMT, Tom Christiansen <tchrist@mox.perl.com>,
wrote:
| [courtesy cc of this posting sent to cited author via email]
|
|In comp.lang.perl.misc,
| searlea@aston.ac.uk (ash) writes:
|:How many functions will operate on $_ or @_ as the default
|:if no other variables/arrays are specified? All?
|:
|:Is there a list anywhere?
O'Reilly publish a slim PERL5 reference book which lists all the
function and which operate on $_ if no arg is provided.
Regards,
--
Aj. (ajai@nwt.com)
New World Technologies - `the Psion house'
Any mistakes I make are prob. due to human OOM errors ;-)
(800) 886-4967 | +1 (212) 941-4633 | http://www.nwt.com
------------------------------
Date: Thu, 24 Apr 1997 14:29:09 -0400
From: Jeff Seaton <j.m.seaton@larc.nasa.gov>
Subject: url_get on Solaris
Message-Id: <335FA675.5859@larc.nasa.gov>
I've got url-get working under SunOS 4.1.3, but I am now trying to get
it to work on a Solaris machine with Perl5.003, and whenever I run it
with a simple test case (./url_get "http://www-genome.wi.mit.edu/") I
get the error message chat'open(www-genome.wi.mit.edu, 80): Protocol not
supported" In the chat package (chat2.pl), the error is occurring on
the statement: socket(S, 2, 1, 6)
Anyone know what I'm missing?
Please email me at j.m.seaton@larc.nasa.gov
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 364
*************************************