[11266] in Perl-Users-Digest
Perl-Users Digest, Issue: 4866 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 10 20:07:18 1999
Date: Wed, 10 Feb 99 17:00:22 -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, 10 Feb 1999 Volume: 8 Number: 4866
Today's topics:
Re: "control-c" kills fork and script (I don't want thi (Martien Verbruggen)
Re: @INC and dos path names <baliga@synopsys.com>
cgi help with form <jldorner@bsuvc.bsu.edu>
Re: cgi-lib.pl (Martien Verbruggen)
Re: CGI/Perl Counter for MIIS (Martien Verbruggen)
Re: change column of nmbers to 2 dim array (Randal L. Schwartz)
Re: change column of nmbers to 2 dim array <uri@ibnets.com>
Re: change column of nmbers to 2 dim array <jglascoe@giss.nasa.gov>
Re: Converting CSV to LDIF (Martien Verbruggen)
Re: File max. size (Tad McClellan)
Re: File max. size <uri@ibnets.com>
Re: fun with strings... <uri@ibnets.com>
Re: fun with strings... (Larry Rosler)
Re: fun with strings... <uri@ibnets.com>
Re: fun with strings... (Bart Lateur)
Re: fun with strings... <uri@ibnets.com>
Re: gethostbyaddr (Andre L.)
Re: Help extracting Internet Address with Regular Expre (Tad McClellan)
HELP!!! PERL and NT!!! <support@mekagames.com>
Hex 0a always prints 0d followed by 0a joedevon@my-dejanews.com
Re: Hex 0a always prints 0d followed by 0a (Bart Lateur)
Re: How do I delete a hash element ?? <ludlow@us.ibm.com>
Re: OS-supported open-time mandatory file locks from Pe <chess@watson.ibm.com>
Re: Problem in writing the following expression in Perl <ludlow@us.ibm.com>
Re: Python vs. Perl vs. tcl ? <larsga@ifi.uio.no>
Re: Question: Arrays of associative arrays (Clay Irving)
Re: Question: Arrays of associative arrays (Clay Irving)
Re: send mail using perl and Microsoft Post Office on N (Martien Verbruggen)
Re: Simple win32 questions from an unlearned Perl novit (Scott Carpenter)
Re: Win32 perl how to do system(set var= $var) (Bill Moseley)
win32::odbc error right out of the box foobar678@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 10 Feb 1999 23:03:14 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: "control-c" kills fork and script (I don't want this)
Message-Id: <Seow2.637$Uh.7662@nswpull.telstra.net>
In article <36C1FCA6.627DD1B0@tivoli.com>,
Bruce Hartley - TPS Consultant <bruce.hartley@tivoli.com> writes:
> I have commands coming back with pages of data I am forking a process
> and piping the data to "more -c". The operators want to press ctrl-c
> when they have seen enough and the ctrl-c kills the fork and the script.
>
> I have traps in place, but the script still gets killed. Does anyone
> have any hints as to how I can get around this (besides writting on
> there hands not to push ctrl-c and use "q" instead)
traps? You mean you did install a handler for $SIG{INT}? And that is
what your terminal sends as a signal when ctrl-c is pressed?
Try stty -a on a unix system to see what the key mapping is. I don't
know how to do it on a dos box.
Martien
--
Martien Verbruggen |
Interactive Media Division | This matter is best disposed of from a
Commercial Dynamics Pty. Ltd. | great height, over water.
NSW, Australia |
------------------------------
Date: Wed, 10 Feb 1999 14:08:03 -0800
From: Yogish Baliga <baliga@synopsys.com>
To: Greg Griffiths <greg2@surfaid.org>
Subject: Re: @INC and dos path names
Message-Id: <36C20343.AE93B48C@synopsys.com>
You need to set environment variable PERLLIB to the directory containing the
ODBC.pm and CGI.pm
-- Baliga
Greg Griffiths wrote:
> I have all my PERL stuff installed in C:\PERL5\ etc, but have recently
> added some new modules (ODBC.pm and CGI.pm), when running scripts using
> these, I have to use the -I parameter on the PERL.EXE file, which is not
> a good idea whne the section goes live, any idea what the problem is and
> how to fix it. All other stuff works fine.
------------------------------
Date: Wed, 10 Feb 1999 18:43:39 -0500
From: Jennifer Dorner <jldorner@bsuvc.bsu.edu>
Subject: cgi help with form
Message-Id: <36C219AB.D8923F8E@bsuvc.bsu.edu>
I have created a form that includes a drop down menu of
goals. Using the MULTIPLE tag I've made it
possible to select more than one goal at a time. But
the CGI script is sending only one of the goals in the mail
message. How do I make it send all of the goals selected?
Jennifer
jldorner@bsu.edu
------------------------------
Date: Wed, 10 Feb 1999 22:54:57 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: cgi-lib.pl
Message-Id: <57ow2.633$Uh.7662@nswpull.telstra.net>
In article <79qja1$gcm$1@news.doit.wisc.edu>,
choij@cae.wisc.edu (Choi Jae-ho) writes:
> I think I have to put cgi-lib.pl on my WWW directory.
Use the CGI module instead. Every recent version of perl has it installed.
# perldoc CGI
It even has some sort of compatibility mode to make it look more like
cgi-lib, I believe. For you to find out.
> But My server doesn't have this file and also WWW directory.
Huh? What does 'and also WWW directory' mean?
If you insist on using cgi-lib.pl, check out perlfaq9 and perlfaq8.
# perldoc perlfaq9
# perldoc perlfaq8
Martien
--
Martien Verbruggen |
Interactive Media Division | That's funny, that plane's dustin'
Commercial Dynamics Pty. Ltd. | crops where there ain't no crops.
NSW, Australia |
------------------------------
Date: Wed, 10 Feb 1999 22:51:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: CGI/Perl Counter for MIIS
Message-Id: <Y3ow2.631$Uh.7662@nswpull.telstra.net>
In article <79s44u$gmj$1@nnrp1.dejanews.com>,
panic98@Hotmail.com writes:
> Hello,
>
> I dont know much about PERL or CGI but i'm looking for a CGI or PERL script
> that can keep up with the number of visitors on my site. I got my own server
> with my own CGI-BIN dir. Please give me some advice, and if possible also
> ways to install it..
You would normally do that by processing the web server logs. Not this
way. if you need specific counters to display for each page, go to
www.cgi-resources.com, and find something there. This is a group for
perl programming, not CGI programming, and not a software handout.
Martien
--
Martien Verbruggen |
Interactive Media Division | This matter is best disposed of from a
Commercial Dynamics Pty. Ltd. | great height, over water.
NSW, Australia |
------------------------------
Date: 10 Feb 1999 14:35:54 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: change column of nmbers to 2 dim array
Message-Id: <m1pv7hkhth.fsf@halfdome.holdit.com>
[THIS evil message was stealth-cc'ed to me.
EITHER DON'T COPY ME, or mark it as such.
Thank you.]
>>>>> "Jay" == Jay Glascoe <jglascoe@giss.nasa.gov> writes:
Jay> "Randal L. Schwartz" wrote:
>>
>> push @new, [splice @original, 0, 36] while @original;
Jay> huh...
Jay> map { [map { shift @original } (1..72)] } (1..36)
That's a use of map in void context, considered bad form by most.
print "Just another Perl hacker,"
--
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@teleport.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: 10 Feb 1999 18:12:09 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: change column of nmbers to 2 dim array
Message-Id: <39r9rxlupi.fsf@ibnets.com>
>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>>> push @new, [splice @original, 0, 36] while @original;
>>>>> "Jay" == Jay Glascoe <jglascoe@giss.nasa.gov> writes:
Jay> map { [map { shift @original } (1..72)] } (1..36)
RLS> That's a use of map in void context, considered bad form by most.
he probably just forgot to assign it to something. and if i see
correctly, you are each the reverse of the other regarding rows/columns.
anyway this should be done in apl since reordering matrices is builtin:
NEW<-36 72 R OLD
where R is the rho char.
:-)
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 10 Feb 1999 18:32:21 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject: Re: change column of nmbers to 2 dim array
Message-Id: <36C21705.B1C99A10@giss.nasa.gov>
"Randal L. Schwartz" wrote:
>
> [THIS evil message was stealth-cc'ed to me.
>
> EITHER DON'T COPY ME, or mark it as such.
>
> Thank you.]
excuse me? what? did I break some rule of etiquette here?
if randal won't explain... perhaps someone else will?
> 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@teleport.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
Jay Glascoe
--
whatever.
------------------------------
Date: Wed, 10 Feb 1999 22:00:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Converting CSV to LDIF
Message-Id: <uknw2.613$Uh.7398@nswpull.telstra.net>
In article <79se2s$qbf$1@nnrp1.dejanews.com>,
dragnovich@my-dejanews.com writes:
> In article <36C0A261.89E534EC@cs.berkeley.edu>,
> Aaron Tavistock <aarontav@cs.berkeley.edu> wrote:
>> What is a CSV file?
> A CSV is in fact a simple text file in were all of the camps of the
> database are separated by COMAS "," if a field contains a coma in
> the body the field starts with ".
Is that where you have to have a
while ($brain->isInactive())
{
sleep($very_long);
}
in your code?
Martien
--
Martien Verbruggen |
Interactive Media Division |
Commercial Dynamics Pty. Ltd. | Can't say that it is, 'cause it ain't.
NSW, Australia |
------------------------------
Date: Wed, 10 Feb 1999 17:22:40 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: File max. size
Message-Id: <0c4t97.7bl.ln@magna.metronet.com>
Andrew Fry (andrewf@beausys.demon.co.uk) wrote:
: I have a program which generates a log file. At present,
: it appends to the file on each session, and the file just
: gets larger and larger.
: What I really need is to set a maximum size on this
: file, but in such a way that I can still append data
: to it (...and if it goes over the maximum size, the
: earliest N lines are discarded).
: Does anyone know of an easy way to do this ?
To keep only the last 10,000 lines (UNTESTED!):
perl -n -i -e 'print if $. > 10000' log_file_name
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 10 Feb 1999 19:04:06 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: File max. size
Message-Id: <39ogn1lsax.fsf@ibnets.com>
>>>>> "TM" == Tad McClellan <tadmc@metronet.com> writes:
TM> Andrew Fry (andrewf@beausys.demon.co.uk) wrote:
TM> : I have a program which generates a log file. At present,
TM> : it appends to the file on each session, and the file just
TM> : gets larger and larger.
TM> : What I really need is to set a maximum size on this
TM> : file, but in such a way that I can still append data
TM> : to it (...and if it goes over the maximum size, the
TM> : earliest N lines are discarded).
TM> : Does anyone know of an easy way to do this ?
no. files can't be truncated at the beginning. they have to be read and
overwritten with the shorter file.
TM> To keep only the last 10,000 lines (UNTESTED!):
it would seem so!
TM> perl -n -i -e 'print if $. > 10000' log_file_name
that prints only the lines AFTER 10,000, not the ast 10k lines. there is
no direct way to do that since you can't tell how many lines there are
in the file without reading the whole thing. my new module (coming to
CPAN soon but it is at http://www.sysarch.com/perl/Backwards.pm)
File::ReadBackwards.pm will read those lines backward and you can save
them in an array and then write that to the log. that will give you the
last N lines (assuming you have memory for them).
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: 10 Feb 1999 17:01:34 -0500
From: Uri Guttman <uri@ibnets.com>
To: lr@hpl.hp.com (Larry Rosler)
Subject: Re: fun with strings...
Message-Id: <39ww1plxz5.fsf@ibnets.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> [Posted and a courtesy copy mailed.]
LR> $this_is_given =~ s/\\([nt])/$1 eq 'n' ? "\n" : "\t"/eg;
i seem to be the only one who supplied a solution without the use of
eval.
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 10 Feb 1999 14:39:04 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: fun with strings...
Message-Id: <MPG.112baa66632fd4cb989a15@nntp.hpl.hp.com>
In article <36c2e087.830520@news.skynet.be> on Wed, 10 Feb 1999 19:58:44
GMT, Bart Lateur <bart.lateur@skynet.be> says...
> alves@sparky.webmetro.com () wrote:
>
> >: :s/(\\[nt])/"\"$1\""/gee;
> >
> >
> >: Can't resist: gee that's cool.
> >
> >Thanks for all the replies! And yes, gee that is cool.
>
> Shouldn't that be: "gee, that's slow"? After all, the double e indicates
> an eval() on a string, which is usually frowned upon, mainly for speed
> reasons.
>
> This calls for a benchmark! Where are the volunteers!
>
> Bart.
#!/usr/local/bin/perl -w
use Benchmark;
$x =
'This is a string\nwith \tpseudo-tabs and \npseudo-newlines\t in it.\n';
timethese(1 << (shift || 0), {
Cntrl => sub { $_ = $x; },
Larry => sub { $_ = $x; s/\\([nt])/$1 eq 'n' ? "\n" : "\t"/eg; },
Ronald => sub { $_ = $x; s/(\\[nt])/"\"$1\""/gee; },
Uri => sub { $_ = $x; s/\\n/\n/g; s/\\t/\t/g; },
});
__END__
Benchmark: timing 16384 iterations of Cntrl, Larry, Ronald, Uri...
Cntrl: 1 wallclock secs ( 0.19 usr + 0.00 sys = 0.19 CPU)
(warning: too few iterations for a reliable count)
Larry: 1 wallclock secs ( 1.56 usr + 0.00 sys = 1.56 CPU)
Ronald: 28 wallclock secs (26.70 usr + 0.00 sys = 26.70 CPU)
Uri: 1 wallclock secs ( 0.73 usr + 0.00 sys = 0.73 CPU)
So the performance is inversely proportional to the cleverness! Not the
first time, nor -- in all likelhood -- the last. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 10 Feb 1999 18:05:42 -0500
From: Uri Guttman <uri@ibnets.com>
To: lr@hpl.hp.com (Larry Rosler)
Subject: Re: fun with strings...
Message-Id: <39u2wtlv09.fsf@ibnets.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> Larry => sub { $_ = $x; s/\\([nt])/$1 eq 'n' ? "\n" : "\t"/eg; },
LR> Ronald => sub { $_ = $x; s/(\\[nt])/"\"$1\""/gee; },
LR> Uri => sub { $_ = $x; s/\\n/\n/g; s/\\t/\t/g; },
LR> Larry: 1 wallclock secs ( 1.56 usr + 0.00 sys = 1.56 CPU)
LR> Ronald: 28 wallclock secs (26.70 usr + 0.00 sys = 26.70 CPU)
LR> Uri: 1 wallclock secs ( 0.73 usr + 0.00 sys = 0.73 CPU)
just spell eval as evil!
:-)
just another perl benchmark winner,
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 10 Feb 1999 23:08:01 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: fun with strings...
Message-Id: <36c31037.13038206@news.skynet.be>
Uri Guttman wrote:
>i seem to be the only one who supplied a solution without the use of
>eval.
But you used repeated substitutons. Evil! (Though it's quite harmless in
this particular case.)
The next one doesn't use eval either:
%replace = ( n => "\n", t => "\t");
s/\\([nt])/$replace{$1}/g;
Besides, you need to differentiate between s///e which behaves much as
an "eval BLOCK" (= precompiled), and s///ee, which behaves as an "eval
STRING". Also in execution speed.
Bart.
------------------------------
Date: 10 Feb 1999 18:54:42 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: fun with strings...
Message-Id: <39pv7hlsql.fsf@ibnets.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> The next one doesn't use eval either:
BL> %replace = ( n => "\n", t => "\t");
BL> s/\\([nt])/$replace{$1}/g;
larry will have to add yours to the benchmark.
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Wed, 10 Feb 1999 17:26:21 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: gethostbyaddr
Message-Id: <alecler-1002991726210001@dialup-520.hip.cam.org>
In article <Agnw2.3334$1l1.339@wards>, "Graham Wharton"
<graham@dotdot.force9.co.uk> wrote:
> I've been trying to write a perl script to convert a host address into a
> host name.
> I know you do it with gethostbyaddr but i don't know how
> Can anyone help
use Socket;
$addr = '127.0.0.1';
$hostname = gethostbyaddr inet_aton($addr), AF_INET;
HTH,
Andre
------------------------------
Date: Wed, 10 Feb 1999 17:19:38 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help extracting Internet Address with Regular Expression.
Message-Id: <a64t97.7bl.ln@magna.metronet.com>
Nelson Beaman (nbeaman@msn.com) wrote:
: I am trying to extract an Internet address (i.e. beaman@hboi.edu) from a
: string by using pattern matching - with little success.
Perl FAQ, part 9:
"How do I check a valid mail address?"
: I know someone has
: figured this out.
So it is very likely to be in a FAQ somewhere then.
The answer is probably already on your hard disk (though you
may well not _like_ the answer).
Shame on you for posting a FAQ for the bazillionth time.
: Please help!
Learn how to do a word search on the standard Perl docs
and hely yourself!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 11 Feb 1999 00:34:06 GMT
From: "MekaGames Staff" <support@mekagames.com>
Subject: HELP!!! PERL and NT!!!
Message-Id: <01be5555$c5e5b7a0$6489accf@default>
Please help me...I'm running a script that works perfectly fine on unix on
a windows NTmachine with has NT 4.0, IIS 4.0, the latest version ActivePerl
and PerlExfrom www.activestate.com. The problem is that when I try to run
the scripton NT, it does not retrieve the values of my arrays every time
the script runs... Therefore, my input data gets input into an array, and
the next thattime I input the data, it gets ADDED to the previous array...
can anyonehelp me clear out or close my arrays everytime NT runs the
program? Thanksfor any help - email would be strongly preferred
- Kaveh Pahlevan
------------------------------
Date: Wed, 10 Feb 1999 22:41:48 GMT
From: joedevon@my-dejanews.com
Subject: Hex 0a always prints 0d followed by 0a
Message-Id: <79t1ur$def$1@nnrp1.dejanews.com>
Hi,
How do I cause perl to write oa only? The code:
$line = $_."\x0a";
print FILE $line;
and I get an 0d and 0a!!! I want 0a only!
What the heck is going on?
@#$@#$@#$@#$@#$@#$@#$#@$
thx.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 10 Feb 1999 22:54:21 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Hex 0a always prints 0d followed by 0a
Message-Id: <36c20df0.12455397@news.skynet.be>
joedevon@my-dejanews.com wrote:
>How do I cause perl to write oa only? The code:
>$line = $_."\x0a";
>print FILE $line;
>
>and I get an 0d and 0a!!! I want 0a only!
You on PC?
If so, set the output handle to binary, using binmode().
Bart.
------------------------------
Date: Wed, 10 Feb 1999 16:22:50 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: How do I delete a hash element ??
Message-Id: <36C206BA.5CDC0718@us.ibm.com>
paulosa@gcm.com wrote:
> I tried "undef" does not work.
You're right, it doesn't. You want the delete command.
perldoc -f delete
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Wed, 10 Feb 1999 21:05:59 GMT
From: David M. Chess <chess@watson.ibm.com>
Subject: Re: OS-supported open-time mandatory file locks from Perl?
Message-Id: <79ssbd$87o$1@nnrp1.dejanews.com>
Upon digging about in Fcntl.pm, I see that mysterious constants like
O_EXLOCK and O_SHLOCK are defined. These seem promising! But from
the newsgroups, it looks like these are defined to support advisory
locks in BSD. Has anyone, or is there any plan to, or would it be
truly idiotic to, map them into DOS-style mandatory open-time locks
on systems that support those? Or should sysread() get new constants
like SH_DENYWR and so on for those systems? (I tried O_EXLOCK on my
Win95 system here, and it didn't seem to do anything; but I coulda
done it wrong.)
Continuing clueless,
DC
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 10 Feb 1999 17:34:01 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Problem in writing the following expression in Perl
Message-Id: <36C21769.6CAF8499@us.ibm.com>
k-lo@cs.yorku.ca wrote:
>
> I have loaded a database into the system as a background, commands to the db
> are written in the command line. I find difficulty while I tried to write the
> following command using Perl.
>
> db2 create tablespace tspace1 managed by system using ('con1', 'con2',
> 'con3')
>
> Note: the brackets and quotes are essential.
^^^^^^^^
parenthesis
> Any help will be appreciated...
Any example code would be appreciated. It's hard to say where you went
wrong, when you don't say what you did.
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: 10 Feb 1999 23:13:27 +0100
From: Lars Marius Garshol <larsga@ifi.uio.no>
Subject: Re: Python vs. Perl vs. tcl ?
Message-Id: <wkvhh96h6g.fsf@ifi.uio.no>
* Lars Marius Garshol
|
| I agree that these are weak points in the syntax. However, I can't
| really think of any better alternatives myself,
* Garry Hodgson
|
| well, the obvious one for "print" is to give it a newline if you
| want one, rather than have to tell it not to add one.
Well, I don't like that better. If you do I guess you should put
def write(string):
sys.stdout.write(string)
somewhere in your Python programs. :)
| and since most of the time i intend "print" to print a line of text,
| it declutters the code a bit, not having to explicitly mention all
| the newlines.
This is why I prefer the implicit newlines too.
--Lars M.
------------------------------
Date: 10 Feb 1999 17:55:24 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Question: Arrays of associative arrays
Message-Id: <79t2os$12a$1@panix.com>
In <36ca7187.601920721@news.ford.com> cpierce1@ford.com (Clinton Pierce) writes:
>http://www.perl.com is becoming a poorer and poorer Perl Resource
>portal than it was. For example there are no longer pointers to
>binary distributions of Perl. (The development community taking the
>holier-than-thou road, according to the distribution page.)
How about:
http://reference.perl.com/query.cgi?binaries
--
Clay Irving
clay@panix.com
------------------------------
Date: 10 Feb 1999 17:59:09 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Question: Arrays of associative arrays
Message-Id: <79t2vt$1bj$1@panix.com>
In <36d09a44.677897627@news.ford.com> cpierce1@ford.com (Clinton Pierce) writes:
>Now that perl.com is more firmly in ORA's grip, they've "trimmed"
>pointers to non-ORA resources (consultants, Activestate, etc...). I
>find myself being _very_ specific about trying to indicate which
>resources may be tainted in which directions, and which resources are
>clearly better than others.
No so with reference.perl.com...
--
Clay Irving
clay@panix.com
------------------------------
Date: Wed, 10 Feb 1999 22:59:17 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: send mail using perl and Microsoft Post Office on NT?
Message-Id: <9bow2.635$Uh.7662@nswpull.telstra.net>
In article <01be551c$eeff0c10$cc34dea1@cbcgren091454>,
"Fuzzy" <fuzzy825@hotmail.com> writes:
> Is it possible to send mail to a microsoft post office in NT or windows 95?
Yes, otherwise it would be pretty useless.
> We use post office and exchange for all incoming and outgoing mail. For
> some automation, perl would be perfect, but we need to be able send mail
> with attachments.
Yes, that is possible with that piece of software.
And your perl question is?
Are you looking for perl modules to do this? Since you probably have a
gateway somewhere that moves mail from Internet to your proprietary
software, use that. there are many perl modules available to deal with
the standard mail protocols on the Internet. You can get them from
CPAN: http://www.perl.com/CPAN/modules/
Martien
--
Martien Verbruggen |
Interactive Media Division |
Commercial Dynamics Pty. Ltd. | Can't say that it is, 'cause it ain't.
NSW, Australia |
------------------------------
Date: Wed, 10 Feb 1999 22:25:41 GMT
From: Sorry@No.Reply.Due.To.Spam (Scott Carpenter)
Subject: Re: Simple win32 questions from an unlearned Perl novitiate (Can't find the win32 FAQ)
Message-Id: <36c202ac.2346665@enews.newsguy.com>
On Tue, 09 Feb 1999 20:55:11 -0600, James Ludlow <ludlow@us.ibm.com>
wrote:
>Scott Carpenter wrote:
> <snip>
>> works for entering line after line, but then CTRL-D doesn't work, and
>> CTRL-Z causes strange results. Can anyone tell me how to indicate
>> EOF?
>
>ctrl-z should work. Please elaborate on "strange results".
If I try:
@a = <STDIN>;
print @a;
The first line of input is not printed after CTRL-Z. If I add another
"print @a;" right after the first, it prints all of the elements just
fine. So:
C:\temp\perl test.pl
one <- type and enter
two <- type and enter, CTRL-Z
two <- first "print @a;"
one <- second "print @a;"
two
C:\temp>
>> Another thing that isn't a big deal: -w doesn't seem to work the same
>> in Win32. "Learning Perl" says you should get a warning if you use
>> something that's undef. I'm not getting that in Win32 (I did see it
>> on a Linux box so I believe the truth of it).
>
>-w is a big deal. It should also be working on you Win32 system.
I didn't mean that -w isn't a big deal, just that this behavior wasn't
as troubling for me at the moment - a thousand apologies for my narrow
thinking ;-) Anyway, my bad on this one. My DOS addled brain was
putting -w after the name of the script so that it must have been
treated as an argument. When I moved it over it worked as expected.
Thanks,
Scott
------------------------------
Date: Wed, 10 Feb 1999 14:43:42 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: Win32 perl how to do system(set var= $var)
Message-Id: <MPG.112bab78befd67339896ad@206.184.139.132>
In article <79sn5g$329$1@nnrp1.dejanews.com>, sirron@mail.mcoe.k12.ca.us
says...
> $return_code = system("set myvar=$data");
..
> When I do this, I find that the return code is always 0. When I do a set
> command in a dos window after running this script, I find that the variable
> is not being set.
Isn't the environment you are setting in the system call long gone when
you exit the perl program? Even after you exit the system call?
--
Bill Moseley mailto:moseley@best.com
------------------------------
Date: Wed, 10 Feb 1999 22:38:40 GMT
From: foobar678@my-dejanews.com
Subject: win32::odbc error right out of the box
Message-Id: <79t1ov$da8$1@nnrp1.dejanews.com>
This happened by running the script test.pl. Anyone know about this.
IF this is the wrong module to do this on win95, which is correct. Thanks
gurus.
This is the error running test.pl:
"We are using the DSN:
DSN = "Win32 ODBC Test --123xxYYzz987--"
Driver = "Microsoft Access Driver (*.mdb)"
------------------ T E S T 3 Open several ODBC connections -----------------
Open several ODBC connections
Opening ODBC connection for "Win32 ODBC Test --123xxYYzz987--"...
Failure.
-------------------------- T E S T Error Report: -------------------------
Error Report:
The following were errors:
Test 3a = new(): [-1811] [] "[Microsoft][ODBC Microsoft Access 97 Driver]
Couldn't find file '(unknown)'."
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4866
**************************************