[7868] in Perl-Users-Digest
Perl-Users Digest, Issue: 1493 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 17 19:08:15 1997
Date: Wed, 17 Dec 97 16:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 17 Dec 1997 Volume: 8 Number: 1493
Today's topics:
Re: 6 elementary questions <eike.grote@theo.phy.uni-bayreuth.de>
Re: 6 elementary questions (Chip Salzenberg)
Re: 6 elementary questions (Chip Salzenberg)
autoresponders where to get one hostmaster@localhost.com
Re: Beginner with a ? <reibert@mystech.com>
Re: Beginner with a ? <webmaster@fccj.cc.fl.us>
embedding perl in C <Rakesh.Chitradurga@sdrc.com>
Re: getting the pid from a system call (Mike Stok)
Re: Help with counting script (Hunter Johnson)
How get which day is in the week? <peter.fejes@sysdata.siemens.at>
Re: how to clear terminal screen (Clay Irving)
Re: localtime() _is_ year-2000 compliant, right? (Abigail)
LOOK! 45,000 Uncensored Usenet Newsgroups Only $5/month uagtetfo@realnews.net
Re: LWP for Windows (Adam Turoff)
Re: mod_perl question... <khera@kciLink.com>
Re: NEED: Fast, Fast string trim() <ajohnson@gpu.srv.ualberta.ca>
Re: newbie file input question <jack_h_ostroff@groton.pfizer.com>
Re: Password encription (Honza Pazdziora)
Perl Database search with html output <Jahan@PriceCut.com>
Q: Perl control of Solaris serial line (a la cu) <hobbes@hobbes.mitre.org>
Random access read/write possible in Perl? hagani@worldnet.att.net
Re: Teaching programing <david.martin@biotek.uio.no>
Re: Teaching programing <merlyn@stonehenge.com>
Re: Win32 Perl with MS Access <qball@ti.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 17 Dec 1997 13:05:11 +0100
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: 6 elementary questions
Message-Id: <3497BFF7.15FB@theo.phy.uni-bayreuth.de>
Hi,
Let's see, if I can help ...
Xah wrote:
>
> # Question: How to explicitly force a conversion between number and string?
> (if there's way.)
Use an appropriate operator:
$number = $string + 0; # add the number 0
$string = $number .""; # concatenation with empty string
But, in fact, it's usually not necessary to do such kinds of
conversions - Perl will take care of it automagically).
> ---------------
>
> # Question: Why does the following returns 4 and 5, not all 5?
>
> @array = (0 .. 9);
> %hash = @array;
> print 0 + %hash, "\n";
This value is NOT the number of elements (or keys), but has to do
something with the internal usage of the hash (see the camel book
for a short explanantion).
> print 0 + keys(%hash), "\n";
>
> ---------------
>
> # Question: in the following code, it seems that the second argument of
> foreach is automatically converted into an array. Is this behavior somewhere
> in man page?
>
> while (<>) {
> foreach $word (m/(\w+)/g) {
> # do something with $word here
> }
> }
In list context a pattern matching using the 'g'lobal option returns
an array of the matched pieces (see also 'perlop' man page).
>
> ---------------
>
> # Question: explain the behavior of the following code. i.e. What is the
> context of @a in print and when is a separator added automatically?
>
> @a = (1 .. 10);
> print "@a\n";
In this case ("list interpolated into a double-quoted string")
the separator is $" (default: space). (see also 'perlvar')
> print @a;
Here the separator is $, (default: empty). (see also 'perlvar')
>
> ---------------
>
> # Question: Why the following two versions of code differ? one prints just
> one line, the other prints the whole file.
>
> print <FILE>;
List context => whole file (each line being one element of an array)
> $line = <FILE>;
Scalar context => only one line
> print $line;
>
> ---------------
>
> # Question: Suppose I want to split a string, and get the second element,
> split it again and get the last element. What's the appropriate perl style
> code? For example, $str = 'GET /~xah/Curves_dir/Spc.html HTTP/1.0', and I
> want to split it by a space, then split the second element by a slash, then
> taking the last element 'Spc.html' as result.
>
> If I'm working with a functional language, then I can nest them something
> like
>
> (split(m@/@, (split(m@ @, $str))[2]))[-1]
>
> but such code doesn't work in perl.
Are you sure ? Works fine here ... ;-)
Remember that indices of arrays in Perl start with 0 (not 1). That's
why your line above gives '1.0'. Replace '[2]' by '[1]' and it yields
'Spc.html' (at least on my machine ...).
> I could write a series of assignments,
> but I'm looking for a good perl style code.
>
> PS I'm not asking for ways to extract Spc.html. I'm looking for perl codes
> comparable to nested expressions in functional languages. (without creating
> a bunch of variables on the side.)
Hope this helps, Eike
--
=======================================================================
>>--->> Eike Grote <eike.grote@theo.phy.uni-bayreuth.de> <<---<<
-----------------------------------------------------------------------
Home Page, Address, PGP,...: http://www.phy.uni-bayreuth.de/~btpa25/
-----------------------------------------------------------------------
PGP fingerprint: 1F F4 AB CF 1B 5F 4B 1D 75 A1 F9 C5 7B 3F 37 06
=======================================================================
------------------------------
Date: Wed, 17 Dec 1997 16:41:20 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: 6 elementary questions
Message-Id: <678va9$17k$1@cyprus.atlantic.net>
According to Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>:
>Chip Salzenberg wrote:
>> According to Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>:
>> >This value is NOT the number of elements (or keys), but has to do
>> >something with the internal usage of the hash (see the camel book
>> >for a short explanantion).
>>
>> Well, it's a string consisting of the number of keys, and a slash,
>> and the number of buckets. As a number, it _is_ the number of keys.
>
>As far as I can count, there are 5 keys, but %hash equals to '4/8' ...
Yes, you are right, and I was wrong. To get the key count, you need
to use the keys(%hash) operator in a scalar context.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
|| Perl Training from Stonehenge Consulting Services: (503) 777-0095 ||
"Aarrrr! Sixteen men on a dead Dodge Dart!" // MST3K
------------------------------
Date: Wed, 17 Dec 1997 14:28:36 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: 6 elementary questions
Message-Id: <678nhc$s9$1@cyprus.atlantic.net>
According to Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>:
>Xah wrote:
>>
>> # Question: How to explicitly force a conversion between number and string?
>> (if there's way.)
>
>Use an appropriate operator:
>
> $number = $string + 0; # add the number 0
> $string = $number .""; # concatenation with empty string
>
There's also:
$string = "$number";
which uses the "stringify" op internally, instead of concatenation,
for what's likely a small performance improvement.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
|| Perl Training from Stonehenge Consulting Services: (503) 777-0095 ||
"Aarrrr! Sixteen men on a dead Dodge Dart!" // MST3K
------------------------------
Date: Wed, 17 Dec 1997 14:28:45 GMT
From: hostmaster@localhost.com
Subject: autoresponders where to get one
Message-Id: <3497e1a4.0@news.oanet.com>
Keywords: autoresponder
I am looking for a Email autoresponder that has anti ping-pong code
That is that the autoresponder will not get in a loop.
vacation is not option.
Any idea's
------------------------------
Date: Wed, 17 Dec 1997 11:05:31 -0700
From: "Mark S. Reibert" <reibert@mystech.com>
Subject: Re: Beginner with a ?
Message-Id: <3498146B.335A1217@mystech.com>
Webmaster wrote:
> ActiveWare (ActiveState) web site shows a bug with IE 4.0 on stripping
> comments from a PerlScript, and somethimes in a Perl CGI as well...
>
> HTH,
> Bill
>
> PS - Build 313 is the latest from ActiveWare (or ActiveState, depending upon
> what they are calling themselves these days :-)
ActiveState just release Build 314 yesterday - still based on 5.003_07, but with
some minor fixes.
-----------------------------
Mark S. Reibert, Ph.D.
Mystech Associates, Inc.
3233 East Brookwood Court
Phoenix, Arizona 85044
Tel: (602) 732-3752
Fax: (602) 706-5120
E-mail: reibert@mystech.com
-----------------------------
------------------------------
Date: Wed, 17 Dec 1997 07:15:46 -0500
From: "Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: Beginner with a ?
Message-Id: <3497c30c.0@usenet.fccj.cc.fl.us>
ActiveWare (ActiveState) web site shows a bug with IE 4.0 on stripping
comments from a PerlScript, and somethimes in a Perl CGI as well...
HTH,
Bill
PS - Build 313 is the latest from ActiveWare (or ActiveState, depending upon
what they are calling themselves these days :-)
Tom Phoenix wrote in message ...
>On Tue, 16 Dec 1997, Diran A. wrote:
>
>> Subject: Beginner with a ?
>
>Please check out this helpful information on choosing good subject
>lines. It will be a big help to you in making it more likely that your
>requests will be answered.
>
> http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
>
>> I'm writing perl scripts on my NT server. They seem to run fine with
>> all the web browsers that I use, except Microsoft Internet Explorer
>> 4.0.
>
>If you're following the standards, the bug is in IE. If you're not
>following the standards, the bug is in your code. If you haven't read the
>standards, you should. If you've read the standards, but you're still not
>sure, then you may ask in a newsgroup about the protocol you're using.
>(Probably HTTP, but maybe CGI, HTML, or something else. Almost always, the
>newsgroup's name includes the name of the protocol. There's no protocol
>named 'perl'. :-)
>
>Hope this helps!
>
>--
>Tom Phoenix http://www.teleport.com/~rootbeer/
>rootbeer@teleport.com PGP Skribu al mi per Esperanto!
>Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
> Ask me about Perl trainings!
>
------------------------------
Date: Wed, 17 Dec 1997 09:56:25 -0500
From: Rakesh Chitradurga <Rakesh.Chitradurga@sdrc.com>
Subject: embedding perl in C
Message-Id: <3497E819.E4A7C58F@sdrc.com>
--------------7B593EFBC36C8B312D7A3E90
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am trying to embed perl in C.
When I try to link I get the msg that
perl_run and the other routines in the perlembed manpage are not found
by the linker.
Does anybody know what *.so or *.a || *.dso I have to link to to get
resolution.
Thanks
Rakesh
--
Rakesh.Chitradurga@sdrc.com________________________
2000, Eastman Drive, SDRC, Milford 45150.
513-576-7668(W) 513-576-5919(Fx) 513-528-0884(R)
13, Arbor Circle, #1318, Cincinnati, OH 45255.
____________________________SDRC Product Development
--------------7B593EFBC36C8B312D7A3E90
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
I am trying to embed perl in C.
<BR>When I try to link I get the msg that
<BR>perl_run and the other routines in the perlembed manpage are not found
by the linker.
<BR>Does anybody know what *.so or *.a || *.dso I have to link
to to get
<BR>resolution.
<BR>Thanks
<BR>Rakesh
<BR>
<PRE>--
Rakesh.Chitradurga@sdrc.com________________________
2000, Eastman Drive, SDRC, Milford 45150.
513-576-7668(W) 513-576-5919(Fx) 513-528-0884(R)
13, Arbor Circle, #1318, Cincinnati, OH 45255.
____________________________SDRC Product Development</PRE>
</HTML>
--------------7B593EFBC36C8B312D7A3E90--
------------------------------
Date: 17 Dec 1997 07:15:09 -0500
From: mike@stok.co.uk (Mike Stok)
Subject: Re: getting the pid from a system call
Message-Id: <678fod$io$1@stok.co.uk>
In article <3497B3D1.C0C60646@amdocs.com>,
Keren Westreich <kerenw@amdocs.com> wrote:
> if ($pid = fork)
> {
> your program code...
> }
> else if ($pid == 0)
This should probably be eslif (defined $pid) so that the exec happens if
$pid is defined and has a 0 value and the error processing will happen if
$pid isn't defined.
> {
> exec scriptName
> }
> else
> {
> error
> }
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 17 Dec 1997 14:09:03 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Re: Help with counting script
Message-Id: <678mdv$r58@mailgate.lexis-nexis.com>
[Migrating to comp.lang.perl.misc]
In article <676ssa$qkf@news-central.tiac.net>, <insmonia@tiac.net> wrote:
> I have a list of 1000 names. There are only 50 unique names. Some
> names exist in the list only once, others 50 or 60 times. Can
> somebody point me in the right direction to construct a script that
> can parse this list (plain text file) to determine the number of
> occurrences of each unique name? I'm vaguely familiar with shell
> scripting, perl, etc but can't even think of where to start. Any
> hints appreciated.
> Example:
> [Input-file]
> Ed
> Joe
> Nancy
> Frank
> Joe
> Theresa
> Nancy
> Joe
> [Output-file]
> Ed 1
> Joe 3
> Frank 1
> Theresa 1
> Nancy 2
In perl,
while (<>) {
chop;
$count{$_}++;
}
foreach (sort keys %count) {
print $_, " ", $count{$_};
}
modeled after "Tabulating the count of some items", old Camel p. 254.
As a bonus, the output is sorted alphabetically.
Hunter
--
J. Hunter Johnson | "I know that I came face-to-face with God's
jhunterj@lexis-nexis.com | love at my worst, not my best, and that
(937) 865-6800 x5385 | amazing grace saved a wretch like me."
Lexis-Nexis, Dayton, OH | Philip Yancey, _What's So Amazing About Grace?_
------------------------------
Date: Wed, 17 Dec 1997 17:42:02 +0100
From: "Fejes Peter" <peter.fejes@sysdata.siemens.at>
Subject: How get which day is in the week?
Message-Id: <678ui0$3o3@scesie10.sie.siemens.at>
My beginner question is:
I have tree parameter: year, month and day, I want to know how can I get
which day is in the week (Sun, Mon, ...)?
Thans, for all.
By,
pety
------------------------------
Date: 17 Dec 1997 08:59:28 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: how to clear terminal screen
Message-Id: <678ls0$b0g@panix.com>
In <ELAECp.B8H@world.std.com> aml@world.std.com (Andrew M. Langmead) writes:
>Russ Brewer <russ@laker.net> writes:
>>I am just beginning to study perl. I want clear the screen, something a
>>shell script does with the "clear" command. What is the perl command to
>>simply clear the screen?
>>In several books I do not see a reference to a perl "clear" command in
>>the indexes. Obviously it is called something else.
>One simple way, portable to all unix and unixlike systems would be to
>just say:
> system('clear');
>If shelling of another program bothers you, you could either minimize
>your aggravation by capturing the output of clear and printing it when
>needed.
>$clear = `clear`;
>print $clear;
>(and I guess that could possible me more efficient if you are clearing
>the screen often, but I can't imagine a program where clearing the
>screen this way would cause significant overhead.)
>You could also use the Term::Cap module that would enable you to use
>all of unix's terminal handling abilities.
><URL:http://reference.perl.com/module.cgi?Term::Cap>
Tony Sanders and Term::Cap don't appear in CPAN anymore.
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: 17 Dec 1997 18:28:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: localtime() _is_ year-2000 compliant, right?
Message-Id: <slrn69g6hh.50c.abigail@betelgeuse.wayne.fnx.com>
Chipmunk (rjk@coos.dartmouth.edu) wrote on 1569 September 1993 in
<URL: news:34976A65.DC5FA9EE@coos.dartmouth.edu>:
++ Michael Budash wrote:
++ >
++ > The camel book says the $year portion of the list returned by localtime()
++ > "has had 1900 subtracted from it". Do i dare make the assumption that in
++ > the year 2000, that value will be 100 and not 0?
++
++ I don't know, what is 2000 - 1900?
(0x)64.
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: 16 Dec 97 20:25:11 GMT
From: uagtetfo@realnews.net
Subject: LOOK! 45,000 Uncensored Usenet Newsgroups Only $5/month!
Message-Id: <3496e3a7.0@diamond.diamondmm.com>
--PART_BOUNDARY_GDGZJPZZEW
Content-Type: text/html; charset=us-ascii; name="test.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="test.html"
Content-Base: "file:///C|/test.html"
<BASE HREF="file:///C|/test.html">
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT language="JavaScript">
<!--
B = open("http://www.realnews.net")
blur(B)
//-->
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
--PART_BOUNDARY_GDGZJPZZEW
Need good access to the usenet newsgroups? Don't want to switch your
ISP or pay to much? Than maybe we can help. We offer access to usenet
for the flat rate price of $5 a month. Over 40,000 groups to search
from and we are adding feeds as fast as we can..We sell company,School
and ISP accounts starting at only $49.95 a month..Go to
www.realnews.net to signup online. Your login and password will be
sent to you in less then 24 hours.. You can also call 203-888-4527 to
signup the same day... For the first 100 new customers you can get
realnews along with a unlimited dialup ppp account for only $9.97 a
month. Thats right both accounts for $9.97 a month when paying 12 months in advance..We have dialup access to most major US cities.
--PART_BOUNDARY_GDGZJPZZEW
------------------------------
Date: 17 Dec 1997 14:39:28 -0500
From: ziggy@panix.com (Adam Turoff)
Subject: Re: LWP for Windows
Message-Id: <6799pg$qf5@panix.com>
In article <678r16$lhr@fridge.shore.net>,
Nathan V. Patwardhan <nvp@shore.net> wrote:
>Yuksel Aslandogan (aslan@dbis.eecs.uic.edu) wrote:
>
>: Is the LWP module available for Win95 or NT?
>
>I'm pretty sure that it's bundled with Sarathy's 5.004_0x port.
Version 5.11 is bundled (v 5.18 is current on CPAN).
-- Adam.
------------------------------
Date: 17 Dec 1997 12:24:43 -0500
From: Vivek Khera <khera@kciLink.com>
Subject: Re: mod_perl question...
Message-Id: <x7sorrnaqs.fsf@kci.kciLink.com>
>>>>> "w" == webmaster <webmaster@heaven.nl> writes:
w> <Files *.pl>
w> SetHandler perl-script
w> PerlHandler Apache::Registry
w> Options ExecCGI
w> </Files>
w> When i try to run a script from the browser the server don't execute it
w> but like to send it to me, the following message in Netscape:
w> You have started to download a file of the Application/x-perl.....
Find where in your Apache configuration you tell it that files ending
with .pl are application/x-perl and remove that configuration
statement.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-301-258-8292
PGP/MIME spoken here http://www.kciLink.com/home/khera/
------------------------------
Date: Tue, 16 Dec 1997 16:43:05 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: NEED: Fast, Fast string trim()
Message-Id: <349703F9.2818352E@gpu.srv.ualberta.ca>
Aaron Harsh wrote:
[snip]
>
> Is it cheating to do some of it outside a regex? Here's my entry, which is
> about four times faster than Andrew's (to run, not to type :-):
>
> $_ = join(" ", /\S+/g);
cheating?? guess it depends on what the poster meant
by doing it in 'one-pass' ... its certainly an improvement...
and in the same vein, here's a slight adjustment:
$_=join(' ',split);
regards
andrew
------------------------------
Date: Wed, 17 Dec 1997 11:17:11 -0500
From: "Jack H. Ostroff" <jack_h_ostroff@groton.pfizer.com>
Subject: Re: newbie file input question
Message-Id: <3497FB07.15AF@groton.pfizer.com>
E. Brian Depenbrock wrote:
>
> The easiest way to read in a file, if this will work for you, is to include
> it on the command line.
>
> foo.pl infile
>
> that makes it the default infile "STDIN"
>
No it doesn't. It does mean you can read from it with <>, but STDIN is
still
STDIN, which is usually the terminal, not a file specified on the
command line.
However,
foo.pl < infile
would get it into STDIN.
------------------------------
Date: Wed, 17 Dec 1997 17:34:26 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Password encription
Message-Id: <adelton.882380066@aisa.fi.muni.cz>
mgeorgeadis@fallschurch.esys.com writes:
> I'll get right to the point ... I've developed a sequence of html pages
> from perl scripts. The first of these html pages asks the user to enter
> a user name and a password. When the user submits the info the password
> field can be seen in the next page's URL. I need help in correcting this
> problem as well as figuring a way to check the validity of the entered
> password with the corresponding user name. Any advice would be greatly
> appreciated. Thanks.
The basic question is: is this a problem specific to Perl? No, it is
not. So the definitive answer will be found in some cgi/http/html
documentation. To give you some direction, you should check the
directives for your .htaccess (or whatever it's called) file and the
POST method.
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: Wed, 17 Dec 1997 06:45:19 -0800
From: "Jahan K. Jamshidi" <Jahan@PriceCut.com>
Subject: Perl Database search with html output
Message-Id: <3497E57F.7826F045@PriceCut.com>
This is a multi-part message in MIME format.
--------------DFDACCE6447AA54362D4B53C
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
I am looking for a Perl script to search a text database and generate
html output.
I would like to use this for catalog searches on my web page.
Thank you
-Jahan
--------------DFDACCE6447AA54362D4B53C
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jahan K. Jamshidi
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Jahan K. Jamshidi
n: Jamshidi;Jahan K.
org: Price Cut Inc.
adr: 10353 Azuaga St. #105;;;San Diego;CA;92129;US
email;internet: Jahan@PriceCut.com
tel;work: (619) 203-7553
tel;home: http://www.PriceCut.com
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
end: vcard
--------------DFDACCE6447AA54362D4B53C--
------------------------------
Date: Wed, 17 Dec 1997 10:22:30 -0500
From: Robert H'obbes' Zakon <hobbes@hobbes.mitre.org>
Subject: Q: Perl control of Solaris serial line (a la cu)
Message-Id: <3497EE36.EE62BA65@hobbes.mitre.org>
Is there a perl module/routine which allows me to interact with
a computer's serial line. Am looking for something similar to the
'cu' command under Solaris2.
Please reply directly to rhz@po.cwru.edu
------------------------------
Date: Wed, 17 Dec 1997 14:34:09 GMT
From: hagani@worldnet.att.net
Subject: Random access read/write possible in Perl?
Message-Id: <678njm$i0g@bgtnsc01.worldnet.att.net>
Is there any way to perform a RANDOM ACCESS read or write in a perl
script? I know how to do sequential reads/writes, but they are far
less efficient in many cases (eg., i want to read only the last XX
bytes of a file)....
Any thoughts?
Thanx
------------------------------
Date: Wed, 17 Dec 1997 12:20:38 +0100
From: David Martin <david.martin@biotek.uio.no>
Subject: Re: Teaching programing
Message-Id: <3497B586.5CBC099E@biotek.uio.no>
Rhodri James wrote:
> This does depend rather on the BASIC being taught. BBC BASIC, for
> instance, is a proper procedure-based language with moderate typing but a
> rather loose attitude to pointers (makes a damn good macro assembler,
> actually, by no accident whatsoever).
I first learnt to program (apart from a very minor dabble on a TRS80)
with BBC BASIC, so I had a reasonable idea of what a subroutine was,
what an if statement was and an elder brother who refused to run any
code of mine that had a GOTO in..
many years later I learnt enough C to write some programs to do a little
simulation for my PhD. So I got into the habit of chucking almost
everything into subroutines with pretty descriptive names. Still haven't
a clue about memory management.
And finally I got offered a project that would involve learning PERL so
I've grabbed a few books, fumbled my way through a bit and can seem to
get things to work. My dialect ends up being 'C made easy' rather than
something else..
Still haven't a clue about the finer points of programming (like garbage
collection and so on .. just about getting my brain around OOP) but
slowly getting there.
>
> I'd still recommend starting with something like Pascal, however. The
> rigid typing makes sure that when you are free and easy with another
> language, you at least know that you are breaking rules.
Never tried it. I suppose it would be good for the soul, but then again
so would learning assembler or some such.
The biggest incentive to learning a language IMHO is to have a project
you want to get done. In my case I have learnt everything I know (which
isn't terribly much) by trying to get particular things to work.
Learning style along the way is a bonus, and (from what I hear) probably
important for transfer between languages.
So If anyone can reccommend a good basic Computer Science text that
would bring me from my self taught + half an hour of actual tuition up
to speed on the very basics of program structure and memory allocation
and how the things work once you peer under the hood of a HLL and get to
the machine, I would be more than grateful. (Probably best by email).
..d
--
* David Martin - Atherosclerosis and Thrombosis research group *
* http://www.uio.no/~damartin/ david.martin@biotek.uio.no *
* Lab +47 22 95 84 54 Fax +47 22 69 41 30 GSM +47 90 74 27 65 *
------------------------------
Date: 17 Dec 1997 06:10:46 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Teaching programing
Message-Id: <8clnxkw1wp.fsf@gadget.cscaper.com>
>>>>> "?" == ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> writes:
?> Is it just me or are most perlers are quite polyliguial. Thay seem to
?> have a great number of langugers under there belt.
Most good *programmers* know many languages. It's not peculiar to
Perl hackers. If you can't pick up a working knowledge of a new
programming language within a few days of exposure, you will die in
this highly competitive industry. So most of us have had to learn to
adapt. :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 258 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Wed, 17 Dec 1997 12:34:12 -0600
From: "Andrew C. Risehnoover" <qball@ti.com>
Subject: Re: Win32 Perl with MS Access
Message-Id: <6795v4$jsp@sf18.dseg.ti.com>
On the Perl Win32 page, their is a description for the use of perl with
excel through the OLE extension. Since Access, is also OLE
Compliant, it would work in a similar manner.( I think) I have not done it
myslef, but I am going to experiment some with the excel
OLE connection.
Ray Ho wrote in message <676l5l$qn0$1@nclient5-gui.server.virgin.net>...
>
>Does anyone know how to access a MS Access database using Win32
>version of Perl? What modules, sample codes will be much appreciated.
>
>
>
>Ray Ho
>
>to reply remove "__delete_this_bit__" from my address
>
------------------------------
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 1493
**************************************