[10454] in Perl-Users-Digest
Perl-Users Digest, Issue: 4046 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 22 14:04:22 1998
Date: Thu, 22 Oct 98 11: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 Thu, 22 Oct 1998 Volume: 8 Number: 4046
Today's topics:
FILEHANDLE nguyen.van@imvi.bls.com
Re: help shorten one-liner (John Stanley)
Re: Help: string variable $patTar in s/$patSrc/$patTar <r_larsen@image.dk>
Re: Help: string variable $patTar in s/$patSrc/$patTar <r_larsen@image.dk>
Re: how do you add three variables <upsetter@ziplink.net>
How do i send attachment of an Excel spreadsheet? nawani@my-dejanews.com
How to print portion of file baillie@my-dejanews.com
Re: How to view lexical variables in the Perl Debugger? <r28629@email.sps.mot.com>
Re: I digress... <uri@fastengines.com>
Need Help With Win95 Perl Installation (Mike Watkins)
Re: Perl & Y2K - booby trap code <upsetter@ziplink.net>
Re: Perl & Y2K - booby trap code (Mark-Jason Dominus)
Re: Perl & Y2K - booby trap code (Ilya Zakharevich)
Re: Perl & Y2K - booby trap code (Matt Knecht)
Re: PERL ADO ODBC (John Hardy)
Re: PERL ADO ODBC <gellyfish@btinternet.com>
Re: Perl Cookbook - is this the best perl book? (PM Jenkins)
Re: Perl Cookbook - is this the best perl book? <uri@fastengines.com>
perl2exe <commitman@digitalnet.com.br>
Re: Q:Array of Lists <aqumsieh@matrox.com>
Re: Q:Array of Lists dave@mag-sol.com
Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleig (Adam Turoff)
Re: sort (Brand Hilton)
Win32 and Tk (David Hiltz)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Oct 1998 16:38:12 GMT
From: nguyen.van@imvi.bls.com
Subject: FILEHANDLE
Message-Id: <70nn1k$561$1@nnrp1.dejanews.com>
Hi guys,
I have problem with filehandles. I have 3 files and want to open 3 FILEHANDLES
for reading and writing. I also want to pass these FILEHANDLEs one at a time
to a subroutine which will process one line at a time for each FILEDANDLE.
Please give me a general format. Thanks a lot for your help. The following is
my code:
_______________________________________________________________________________
use IO::File;
$HANDLE_AOL = new IO::File "+<aol_out";
$HANDLE_MSIE = new IO::File "+<msie_out";
$HANDLE_NETSCAPE = new IO::File "+<netscape_out";
@proced_files = ( "\*$HANDLE_AOL", "\*$HANDLE_MSIE", "\*$HANDLE_NETSCAPE" );
foreach $out_file ( @proced_files )
{
process_out($out_file);
}
sub process_out
{
while (<$out_file>)
{
$_ =~ s#(AOL|MSIE)\s(\d\.\d+)#$1_$2#g;
print STDOUT;
}
}
You can modify my code or give me a general format.
Van Nguyen
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 22 Oct 1998 17:26:00 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: help shorten one-liner
Message-Id: <70npr8$9rl$1@news.NERO.NET>
In article <saru30zlyfz.fsf@camel.fastserv.com>,
Uri Guttman <uri@camel.fastserv.com> wrote:
>oy gevalt!! that is as old as ronald reagan! and about as useful!
Yep, you are right. Version 4 is about as useful as Ronald Reagan. I've
had it running two data collection systems continuously for more than
four years, with the only trouble coming from interrupted network
connections or foolish people who thought they needed to turn off the
PC when they didn't know what it was doing.
I've also got {pausing to count} many perl 4 scripts that have been
running without trouble for more than 6 years, happily moving data back
and forth just as well as they would if they were all written using
all the fancy capabilities of Perl 5.005.
In other words, yes, perl 4 is very useful. Wait a minute, I'm not sure
that the data collection systems aren't still running perl 3.
Did you really need to take a pot shot at someone who has Alzheimers?
>get the latest perl and drop that 4.x fast.
Some people like spending time upgrading software. Some people realize
that if it works it doesn't need to be upgraded.
------------------------------
Date: Thu, 22 Oct 1998 20:37:18 +0100
From: R. A. Larsen <r_larsen@image.dk>
Subject: Re: Help: string variable $patTar in s/$patSrc/$patTar
Message-Id: <VA.00000068.0005d824@octo>
windog98@my-dejanews.com wrote:
[substitunig using string variable for target pattern impossible?]
> $a = "- 1000";
> $b = "\\1-\\2";
> print("$b\n");
> $a =~ s/-( +)([0-9])/$b/; # use a string variable $b
> print($a);
> #the output is:
> #\1-\2000
>
> Why is it not working? Any kind soul to fix this?
> I want to keep using the variable $b. Is it possible
> to do this?
Yes it is possible, and it DID work but not the way you expected.
Read 'perldoc perlre' and look for 'bracketing construct'.
Hope this helps.
Reni
--
Using Virtual Access
http://www.vamail.com
------------------------------
Date: Thu, 22 Oct 1998 20:41:35 +0100
From: R. A. Larsen <r_larsen@image.dk>
Subject: Re: Help: string variable $patTar in s/$patSrc/$patTar
Message-Id: <VA.00000069.0009c67d@octo>
windog98@my-dejanews.com wrote:
[substitunig using string variable for target pattern impossible?]
> $a = "- 1000";
> $b = "\\1-\\2";
> print("$b\n");
> $a =~ s/-( +)([0-9])/$b/; # use a string variable $b
> print($a);
> #the output is:
> #\1-\2000
>
> Why is it not working? Any kind soul to fix this?
> I want to keep using the variable $b. Is it possible
> to do this?
Yes it is possible, and it DID work but not the way you expected.
Read 'perldoc perlre' and look for 'bracketing construct'.
Hope this helps.
Reni
--
Using Virtual Access
http://www.vamail.com
------------------------------
Date: Thu, 22 Oct 1998 16:14:48 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: how do you add three variables
Message-Id: <YRIX1.305$3i7.65148@news.shore.net>
Marcus J. Foody <marx@idiom.com> wrote:
: Hello, I know this is a lame question. How do you add three variables
: together.
: For example, I want to sum up three fields into on variable.
: This is what I have. Is this a correct format?
: $sum = $data[14]+$data[15]+$data[16];
What happened when you tried it?
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Thu, 22 Oct 1998 17:35:03 GMT
From: nawani@my-dejanews.com
Subject: How do i send attachment of an Excel spreadsheet?
Message-Id: <70nqc7$8lv$1@nnrp1.dejanews.com>
Hi,
Being a rather new user to Perl, i am trying to send a Excel spreadsheet
to be sent as an attachment with the email.
The program right now sends regular mail using sendmail within the program.
The body of the email is being taken from a database table.
I want to modify it so that it can send out an email with an attachment of
an Excel spreadsheet. Is it possible to do that?
Please let me know.
Thanks
Mahesh
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 22 Oct 1998 17:41:58 GMT
From: baillie@my-dejanews.com
Subject: How to print portion of file
Message-Id: <70nqp6$902$1@nnrp1.dejanews.com>
I'm making a little program in which the person can search a file using a
keyword. How can I search for the keyword and print only that entry to
STDOUT, here's an example
file looks like:
-------------------
login name - date
-------------------
person wrote something
about nothing or <- example - person uses KEYWORD: about
something, blah. how do I print from
top --- to ^\n$ ?? to the STDOUT
------------------- also, how could I edit only that and
login name - date put it right back where it was?
-------------------
someone else wrote
something else, blah.
Sorry if this is a lot, any help would be welcome
* Just Another Newbie Wannabe Perl Hacker *
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 22 Oct 1998 12:23:01 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: How to view lexical variables in the Perl Debugger?
Message-Id: <362F69F5.7FA5C824@email.sps.mot.com>
[ posted and cc'ed]
Tom Phoenix wrote:
>
> On Wed, 21 Oct 1998, Tk Soh wrote:
>
> > what are the differences between 'x \@array' and 'x @array'? And
> > hashes?
>
> Did you see what was different when you tried it? :-)
>
Hmn.., Interesting! Now I can even do these:
x keys %hash
x values %hash
Thanks.
-tk
------------------------------
Date: 22 Oct 1998 12:01:56 -0400
From: Uri Guttman <uri@fastengines.com>
Subject: Re: I digress...
Message-Id: <sar90i8mvpn.fsf@camel.fastserv.com>
>>>>> "CKC" == Casper Kvan Clausen <ckc@dmi.dk> writes:
CKC> On 22 Oct 1998, Michael J Gebis wrote: [Making sure a number has
CKC> a leading zero if it's below 10]
i sent a FAQ on this to gnat and it may get into 5.004_05's docs.
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: Thu, 22 Oct 1998 16:24:40 GMT
From: mwatkins@ia-watkins.com (Mike Watkins)
Subject: Need Help With Win95 Perl Installation
Message-Id: <362f5bf0.3383337@news.compuserve.com>
Hi there,
OK, I'm very sorry, but I am new at this. I just downloaded perl and
I'm not sure if I have a C Complier. I don't think I do, so I
probably don't.
Anyway, I read the help file and it said to download a GCC Compiler.
Anyone know where I can download one?
Any help would be much appreciated.
Regards,
Mike Watkins
http;//www.ia-watkins.com/
------------------------------
Date: Thu, 22 Oct 1998 16:13:17 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <xQIX1.304$3i7.65148@news.shore.net>
Tom Phoenix <rootbeer@teleport.com> wrote:
:> I would recommend for anyone responsible for Perl applications, to do a
:> search on "localtime" in the code and ensure that it is handled correctly.
: I would recommend for anyone responsible for any applications, to do a
: search of all tokens in the code and ensure that they are handled
: correctly.
Well, that's a very clever thing to say, but most of us live in the real
world. It's not very practical for me to take a break from my regular work
and check "all tokens" in all of my code to make sure they're handled
correctly.
On the other hand, most programmers could probably spare the time to
search for "localtime" in some if not all of their "current" code, just to
double-check that everything is being handled correctly. Those of us who
maintain legacy code should certainly budget the time to do a quick search
for "localtime". Such a search is more likely to turn up some sort of bugs
(even if they're minor) than, for example, checking every usage of
"print" or "while".
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: 22 Oct 1998 12:43:10 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <70nnau$qkf$1@monet.op.net>
In article <TiHX1.101$6J3.1599027@news2.voicenet.com>,
Matt Knecht <hex@voicenet.com> wrote:
>It makes it easy for the C programmer migrating to Perl.
How so? According to you, they have to read the documentation anyway.
Perhaps there's a small gain, but the price for it was too high.
Suppose Perl's localtime simply returned the year. The C programmer
has to learn something in this case. They can do that by reading the
documentation, which according to you, they are always required to do.
But if the C programmer does not read the manual, and writes a program
supposing that the year will come back -1900, which in fact it
doesn't, the program will have a bug. This bug will be immediately
obvious on the first run of the program, because all the years in the
program will come out in the 40th century. These problems will appear
immediately, and will be easy to detect and diagnose.
On the other hand, with the existing interface, C programmers can use
the function immediately, without consulting the manual, and
fortunately for them everything works out. But many other people who
don't read the manual write programs with bugs. Unlike the bugs of
the previous paragraph, these bugs are not obvious, are difficult to
diagnose, and appear suddenly in programs that have worked properly
for many years.
It seems quite clear that the better design is the more
straightforward one: If your function needs to return the year, it
should simply return the year.
People typically use the year in two ways: They truncate it to two
digits, or else they use it entire, perhaps in a calculation of some
sort.
There are two choices of interface: localtime might return y-1900, or
it might simply have returned y. Let's see how those pan out for the
two typical uses. Here's the code you have to write to accomplish
each task with each interface style. The existing interface is the
right-hand column.
returns just y returns y-1900
need full $y $y+1900
year
need two $y%100 $y%100
digits
Why, look at that. The existing behavior in the right-hand column is
never any simpler or more convenient than the left-hand column. At
best it is no worse.
Let's see what you'd have to do in each case make a Y2K mistake:
returns just y returns y-1900
make error printf "19%02d", printf "19%02d", $year;
($year - 1900);
print "12/25/$year";
It's really hard to imagine anyone writing the code on the left side,
and it's obviously wrong. That's even obvious to a C programmer who
thinks that the interface is the same as in C. The erroneous code in
the right-hand column is easy to write, and we know that many people
have written it.
So here's the feature tradeoff list:
Return the year:
- C programmers find unfamiliar interface
+ Behavior is obvious
+ Hard to make a mistake
+ Consequence of mistake appears immediately
+ Code is shorter
Return y-1900:
+ C programmers find interface identical to struct tm
- Behavior in year 2000 not obvious
- Easy to make a mistake
- Consequence of mistake appears suddenly, perhaps many
years after deployment
- Code is longer
Interfaces should be as simple as possible. The `struct tm' was
designed very badly. Perl's consistency with a bad design doesn't
make it a good design; it's means that Perl interface is bad also.
------------------------------
Date: 22 Oct 1998 17:15:51 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <70np87$rm4$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Russ Allbery
<rra@stanford.edu>],
who wrote in article <ylk91s7w31.fsf@windlord.stanford.edu>:
> The fact that a return value of the year - 1900 is documented does not
> change the fact that returning the year - 1900 when you could have just
> returned the year is stupid.
No, I do not think so. I think it is hard to find a calendar with
an absolute year number (as opposed to relative one of Perl or AD)
which is not moon-phase based. And I do not think many would
appreciate it if Perl returned date in a moon-phase based format.
Ilya
------------------------------
Date: Thu, 22 Oct 1998 17:30:08 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <AYJX1.107$6J3.1680321@news2.voicenet.com>
Mark-Jason Dominus <mjd@op.net> wrote:
>In article <TiHX1.101$6J3.1599027@news2.voicenet.com>,
>Matt Knecht <hex@voicenet.com> wrote:
>>It makes it easy for the C programmer migrating to Perl.
>
>How so? According to you, they have to read the documentation anyway.
>Perhaps there's a small gain, but the price for it was too high.
I'm not sure about the price for it. I'm not a language designer, or
even an analyst. I'm a self-taught programmer. As such I like
documentation a *lot*. I speak only for my own case. When I went from C
to Perl, and read through perlfunc, localtime stuck with me, because it
was exactly what I was used to. It was nice. It was easier. But it
wasn't the end all be all.
>Suppose Perl's localtime simply returned the year. The C programmer
>has to learn something in this case. They can do that by reading the
>documentation, which according to you, they are always required to do.
You seem to be implying that reading the documentation shouldn't be
nessacery. I know you don't mean this.
[ Snip a lot of good examples ]
>Interfaces should be as simple as possible. The `struct tm' was
>designed very badly. Perl's consistency with a bad design doesn't
>make it a good design; it's means that Perl interface is bad also.
Agreed, but qualified: In may case it was a simpler interface because
time_t was etched in my brain a long time ago. :)
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Thu, 22 Oct 1998 15:59:29 GMT
From: jhardy@cins.com (John Hardy)
Subject: Re: PERL ADO ODBC
Message-Id: <BDIX1.648$KM4.326549@198.235.216.4>
In article <ug1chgfcf.fsf@jimbosntserver.soundimages.co.uk>,
jimbo@soundimages.co.uk says...
>
>jhardy@cins.com (John Hardy) writes:
>
>> and have read is it changes quite frequently. Also ADO (OLE) is faster then
>
>Firstly, join the Win32* mailing list(s) at www.activestate.com, this
>will get you the Win32 specific info you need. In addition, there is a
>decent Win32 FAQ referenced there as well.
>
Already AM
>Second, you have already answered your question. The way you get it to
>work is you use Win32::OLE to create an ADO object, you know, a
>Connection object and a Command object and a Recordset object. Just
>like ASP. Then you tell the Recordset object to do it's thing. The
>results of your query are now in the Recordset which you manipulate
>just like using ASP. You know, you invoke the various Recordset
>methods to access the results, modify the results, update the
>database, etc.
>
>The code example(s) you require have been posted before. Do a search
>on www.dejanews.com and you will find many posts relating to OLE
>et. al. DBI will probably be a better bet in the long run because it
>does not require the continued devotion to MS that ADO requires. If
>you don't mind eating from that poarticular trough, then ADO will do
>the job.
>
>Here is a copy of such a post. In future, serch before you post. All
>the questions have been asked and answered before.
>
>Author: Jan Dubois
>Email: jan.dubois@ibm.net
>Date: 1998/09/29
>Forums: comp.lang.perl.misc
>
>Here is one of my standard samples to use ADO from Perl. If you have further
>questions, don't hesitate to ask them on the Perl-Win32-Database mailing
>list (put ADO and/or OLE on the subject line!).
>
>-Jan
>
>use strict;
>use Win32::OLE qw(in);
>
>my $Conn = Win32::OLE->new("ADODB.Connection");
>$Conn->Open("AdvWorks");
>my $RS = $Conn->Execute("SELECT * FROM Orders");
>
>until ($RS->EOF) {
> foreach my $Field (in $RS->Fields) {
> printf "%-20s: %s\n", $Field->Name, $Field->Value;
> }
> $RS->MoveNext;
> print "\n";
>}
>$RS->Close;
>$Conn->Close;
>--
>Jim Brewer
>e-mailed courtesy copies are unappreciated, please refrain.
>
>
I have searched for over a week including DejaNews etc.The code above
is not what I require.I have already figured that part out. As I have
stated before I am trying to figure out how to get the fields from the
form into a variable that will be sent to the Server by the SELECT or
INSERT statement. Once the Form info is sent to the server, the database
will create an ID number and send it back to the browser along with the
information that was entered into the database as a confirmation it has been
done.
I currently have the form fields coming in and print to the browser but
I have to hard code the INSERT statement into the script to send it to the
server. I also can't figure out how to get the info the server sends back and
send it to the browser. At the risk of being embarased I will post what I have
so far
and maybe then you can get the gist of what I am trying to do. If something
like this
exists already I have not been able to find it.
use OLE;
print "Content-type:text/html\n\n";
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$FORM{$name} = $value;
}
#&get_date;
$cur_date = localtime;
print<<EOF;
<html><head><title>iHR Successful Registration</title></head>
<body bgcolor=#FFFFFF>
<center><table width=100%><tr><td></td><td align=center>
<img src="./images/logohere.jpg">
<br>
EOF
print "<P><i><h3>iHR Registration Successful
</h3></i><hr></center></td><td></td></tr></table>
<center><table border=0 width=80%>";
print "<font size=-1><b>$cur_date \n</b></font>";
print "<hr>";
print "<tr><th align=left>Field<th align=left> You Entered";
#EOF
$listing="Field\tYou Entered\t"; ####### <--NEW!!
foreach $key (sort keys(%FORM)) {
($entered)=split /:/,$FORM{$key};
$listing = "$listing\n$key\t|$FORM{$key}"; ####### <--NEW!! **added "\t|"
to try tabs
$key=~s/\+//g; # strip out +'s
print "<tr><td>$key<td align=left>$entered\n";
#removed hidden fields from above sequence
}
$listing=~s/^\n//; ###### <--NEWLINE!!!
print "</table> \n";
****** The script runs fine through the browser to this point then dies
********
#SQL_INSERT();
#sub SQL_INSERT {
#use OLE;
$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("DSN=iHR;UID=sa;PWD=");
$RS = $Conn->Execute("INSERT INTO
Candidate(Candidate.fname,Candidate.lname,Candidate.ID) VALUES ('Wednesday',
'3:10PM','15')");
if(!$RS) {
$Errors = $Conn->Errors();
print "Errors:\n";
foreach $error (keys %$Errors) {
print $error->{Description}, "\n";
}
die;
}
$RS->Close;
$Conn->Close;
$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("DSN=iHR;UID=sa;PWD=;");
$RS = $Conn->Execute("SELECT * FROM Candidate");
if(!$RS) {
$Errors = $Conn->Errors();
print "Errors:\n";
foreach $error (keys %$Errors) {
print $error->{Description}, "\n";
}
die;
}
while ( !$RS->EOF ) {
($lname, $fname, $id) = (
$RS->Fields('lname')->value,
$RS->Fields('fname')->value,
$RS->Fields('id')->value );
print "<td>$lname, : , $fname, : , $id \n";
$RS->MoveNext;
}
$RS->Close;
$Conn->Close;
#}
#}
Parts of this script are from an old script I wrote a couple of years back.
As I have been away from PERL for a while I cannot remember half the stuff
I knew. So it is just like starting over for me. The script is quite a mess
because I am trying to figure out what the hell Im doing!
The script goes through all the motions from the command line.
Thanks
------------------------------
Date: 22 Oct 1998 17:19:20 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: PERL ADO ODBC
Message-Id: <70nlu8$dr$1@gellyfish.btinternet.com>
On Thu, 22 Oct 1998 15:59:29 GMT John Hardy <jhardy@cins.com> wrote:
>
> use OLE;
>
> print "Content-type:text/html\n\n";
>
>
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
<snip>
I would recommend that you use the module CGI.pm to do your form processing
(of CGI::Lite or even cgi-lib.pl if you really must).
A module will allow you to extract the form parameters into variables easily
from which you can build your insert statements dynamically.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Thu, 22 Oct 1998 15:45:24 GMT
From: pmj@hotmail.com (PM Jenkins)
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <70njqh$9s5@ohnasn01.houston.omnes.net>
In article <zszX1.24$Vs4.128786@nsw.nnrp.telstra.net>, mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>In article <362E3722.31C7@oreilly.com>,
> Linda Mui <lmui@oreilly.com> writes:
>
>> I hope Mr. (Ms.?) Jenkins has been sending us errata
>> so we can incorporate them into the next printing.
Exactly Ms. Mui.
Actually, I created some errors intensionally just to
let them know how they would feel. I knew exactly
what would happen, when you say bad things about
O'Reilly or any authors of the books from ORA. They
are heavily USENET-oriented people. Their friends and
flatterers will stomp like storms.
What they feel is that some errors against them is
unbearable, but their 350+ errors that can be printed
in 27 pages should be an excellent quality and that readers
should not complain. And they don't hesitate to do their
habitual personal attacks. Will they ever listen ?
I guess not. I am giving them to continue to have such fun
in yet another personal attacks series, since that's their
life. While they are doing it, I will take a coffee break :-)
------------------------------
Date: 22 Oct 1998 12:15:26 -0400
From: Uri Guttman <uri@fastengines.com>
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <sar7lxsmv35.fsf@camel.fastserv.com>
>>>>> "PJ" == PM Jenkins <pmj@hotmail.com> writes:
PJ> In article <zszX1.24$Vs4.128786@nsw.nnrp.telstra.net>,
PJ> mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>> In article <362E3722.31C7@oreilly.com>, Linda Mui
>> <lmui@oreilly.com> writes:
>>
>>> I hope Mr. (Ms.?) Jenkins has been sending us errata so we can
>>> incorporate them into the next printing.
PJ> Exactly Ms. Mui. Actually, I created some errors intensionally
PJ> just to let them know how they would feel. I knew exactly what
PJ> would happen, when you say bad things about O'Reilly or any
PJ> authors of the books from ORA. They are heavily USENET-oriented
PJ> people. Their friends and flatterers will stomp like storms. What
PJ> they feel is that some errors against them is unbearable, but
PJ> their 350+ errors that can be printed in 27 pages should be an
PJ> excellent quality and that readers should not complain. And they
PJ> don't hesitate to do their habitual personal attacks. Will they
PJ> ever listen ? I guess not. I am giving them to continue to have
PJ> such fun in yet another personal attacks series, since that's
PJ> their life. While they are doing it, I will take a coffee break
PJ> :-)
so go buy some perl for morons books. who cares if you don't like
o'reilly books. the fact they they PUBLISH errata is so far and above
any other technical publisher that it makes o'reilly the premier honest
publisher. i bet you could pick ANY other technical book and we could
find FAR more errors per page than the ones published by o'reilly. i
have never seen tech books without loads of errors, typos (which are not
true errors as you seem to count them) and out and out falsehoods. so go
back under the rock you crawled out from, and buy IDG dummies
books. they are above you but you could use the growth.
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: Thu, 22 Oct 1998 13:47:32 -0000
From: "Commitman" <commitman@digitalnet.com.br>
Subject: perl2exe
Message-Id: <70nk09$fk2$1@srv4-poa.nutecnet.com.br>
Where may I found something like perl2exe or perl2c ???
------------------------------
Date: 22 Oct 1998 10:57:38 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Q:Array of Lists
Message-Id: <x3yg1cgiqzh.fsf@tigre.matrox.com>
stefan_007@my-dejanews.com writes:
>
> Hi,
>
> sorry about this question (I'm not familiar with perl), but why doesn't this
> work ?
>
> @Data[0] = ( "red", "green", "blue" );
> @Data[1] = ( "Apple", "Orange", "Peanuts" );
> print "First: ",$Data[0][0],"\n";
> print "Second: ",$Data[0][1],"\n";
Oh boy .. back to the drawing board for you. You should read some
documentation on Perl's data structures. I recommend you start by
reading perldsc.
In summary:
An array is a list of SCALARS. @Data[0] is not defined. To access a
*SCALAR* value in an array you have to use $Data[0]. You seem to want
arrays of arrays. Since arrays can only hold scalars, what you want is
actually implemented as an array of references to arrays.
try:
@{$Data[0]} = ( "red", "green", "blue" );
@{$Data[1]} = ( "Apple", "Orange", "Peanuts" );
>
>
> Thanks for your answer,
>
> Stefan.
>
Hope this helps
--
Ala Qumsieh email: aqumsieh@matrox.com
ASIC Design Engineer phone: (514) 822-6000 x7581
Matrox Graphics Inc. (old) webpage :
Montreal, Quebec http://www.cim.mcgill.ca/~qumsieh
------------------------------
Date: Thu, 22 Oct 1998 16:37:44 GMT
From: dave@mag-sol.com
Subject: Re: Q:Array of Lists
Message-Id: <70nn0o$55m$1@nnrp1.dejanews.com>
In article <70ne37$scu$1@nnrp1.dejanews.com>,
stefan_007@my-dejanews.com wrote:
> Hi,
>
> sorry about this question (I'm not familiar with perl), but why doesn't this
> work ?
>
> @Data[0] = ( "red", "green", "blue" );
> @Data[1] = ( "Apple", "Orange", "Peanuts" );
> print "First: ",$Data[0][0],"\n";
> print "Second: ",$Data[0][1],"\n";
There are many misunderstandings going on here. I could spent time, trying to
explain them all to you, but why bother when you already have an extremely
well-written explanation on your system.
perldoc perldsc
will answer all of your questions.
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://london.pm.org/>
[Note Changed URL]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 22 Oct 1998 12:03:50 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Scotch drinkers Unite! [was] Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <70nl16$9em@panix.com>
Brad Murray <murrayb@vansel.alcatel.com> wrote:
>Just have to put my bids in now---I found Bowmore quite dull, although
>there's a cask strength out there that's very tasty. Recently we in
>Canada had the good fortune of receiving the big seven from United
>Distilleries, which has renewed my taste for the islands---Talisker and
>Lagavulin are both big favourites around our house now.
Ah, talisker. Yum. We affectionately refer to Lagavulin as 'Listerine'
here. Makes a good medicine!
>Highland Park is our staple.
Highland Park is ver' ver' nice.
>I have heard people rave about the Macallan 25, but I
>was not terribly impressed. I wasn't put off, either, I just found that
>it lacked distinction.
Might mean more if a Macallan was your staple than Highand Park. The
distinction is very subtle, I understand. I don't get it either.
I'm more of a Glenmorangie man myself.
>Obligatory Perl (yes, this is a perl newsgroup): I wrote a series of man
>pages for single malt scotches a while ago. In POD format. I know, it's
>pretty thin but it's all I have for you.
URL? I'd love to see them. It would make a nice corpus to hack with perl,
assuming we could get enough input on the matter.
I can see it now: comp.lang.perl.scotch. :-)
Z.
------------------------------
Date: 22 Oct 1998 15:52:28 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: sort
Message-Id: <70nkbs$gov5@mercury.adc.com>
In article <362F5D32.5989@worldnet.att.net>,
Carl Fox <foxindustries@worldnet.att.net> wrote:
>I am blue in the face with this problem. Please help. I am sorting and
>searching a flat database file field, numerically, and am having
>problems. For example: when I searcch for 50, any record with 5000,
>500, 50, and 5 pops up. Is there any way to get an EXACT match instead
>of a greater than, less than, or equal to? None of the operators, so
>far, are returning the proper match, so please don't just refer me to
>some apparently "textbook" solution.
Things I don't know that would help me answer your question:
* How is the data represented in your program? Is it a hash? An
array? A string?
* Which operators have you tried that didn't work? I can't imagine
'==' not working properly for this case.
You really should post some code to get the best results here.
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: 22 Oct 1998 16:16:34 GMT
From: dhiltz@ultra2.whoi.edu (David Hiltz)
Subject: Win32 and Tk
Message-Id: <70nlp2$c6v1@dilbert.whoi.edu>
Is it possible to get the Windows95/NT look and feel with the Win32 Tk
module?
Thanks
-----------
David Hiltz
Email: dhiltz@whsun1.wh.whoi.edu
Unix System and Network Administrator
Northeast Fisheries Science Center
######&@&######
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4046
**************************************