[9976] in Perl-Users-Digest
Perl-Users Digest, Issue: 3569 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 27 22:02:57 1998
Date: Thu, 27 Aug 98 19:00:20 -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, 27 Aug 1998 Volume: 8 Number: 3569
Today's topics:
Re: comp.lang.perl.windows.misc (Ben Coleman)
Re: comp.lang.perl.windows.misc (Andrew M. Langmead)
Re: comp.lang.perl.windows.misc (I R A Aggie)
embedding Perl 5 in C - core memory <alexcohn@photonet.com>
even or odd <andylee@prodigy.net>
Re: even or odd <tchrist@mox.perl.com>
Re: Help - Perl security problem! (I R A Aggie)
Re: Help - Perl security problem! (Ben Duncan)
Re: How do I connect to an MS Access database from perl (Robert Watkins)
Re: Max value in an array <tchrist@mox.perl.com>
Re: Misinterpreted => why no true/false keywords? (Mark-Jason Dominus)
Re: Misinterpreted => why no true/false keywords? <dgris@rand.dimensional.com>
Re: Misinterpreted => why no true/false keywords? (Mark-Jason Dominus)
Re: Perl <-> Database interface module <dante@ar.com.au>
Re: Perl compiler (Abigail)
Re: Perl compiler (John Stanley)
Re: Perl script compiling <tchrist@mox.perl.com>
Re: SWF (Shockwave Flash) file format <aichner@ecf.teradyne.com>
Re: SWF (Shockwave Flash) file format <aichner@ecf.teradyne.com>
Re: SWF (Shockwave Flash) file format (Larry Rosler)
Re: Unreadable Scripts? (Nathan V. Patwardhan)
Re: Unreadable Scripts? (Nathan V. Patwardhan)
Re: Unreadable Scripts? (Nathan V. Patwardhan)
Re: When using CGI.pm to upload file I get extraneous d (Robert Watkins)
Win32 and Perl <stevel@apollo.gti.net>
Re: Y2K Date Support <dgris@rand.dimensional.com>
Re: Y2K Date Support (I R A Aggie)
Re: Y2K Date Support (Larry Rosler)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 Aug 1998 00:00:19 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <35e5f2fb.3405066@news.mindspring.com>
On Thu, 27 Aug 1998 16:18:30 -0400, Dave Stephens
<stepherd@gusun.georgetown.edu> wrote:
>Who isn't
>required to be a little open to multiple platforms nowadays anyway?
Microsoft?
Ben
--
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA
------------------------------
Date: Fri, 28 Aug 1998 00:45:37 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <EyDJG1.EKD@world.std.com>
No.unsoiliciteds@dead.end (Norman UNsoliciteds) writes:
>you are of course assuming the OS needs to have had some contact with Un*x
>OS kernal philosophy - there are Perl ports for the Mac and the Amiga two
>more un Un*x like OS's I can hardly imagine - anyone got any amusing
>anecdotes about how the amiga started out with a command line interface in
>it'S pre beta1 release to the amiga OS test labs?
Although the prefered Mac I/O calls deal with a FSSpec rather than a
pathname, its not all that dissimilar (it is memory management where
things get weird) And from what I remember, the Amiga did have a very
usable command interpreter.
Its the VMS and MVS ports of perl that surprise me.
--
Andrew Langmead
------------------------------
Date: Thu, 27 Aug 1998 20:49:56 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <fl_aggie-2708982049560001@aggie.coaps.fsu.edu>
In article <MPG.104f77f8ea631e35989809@nntp.hpl.hp.com>, lr@hpl.hp.com
(Larry Rosler) wrote:
+ IIRC, that September 1993 date refers to
AOL offering internet services.
James
------------------------------
Date: Thu, 27 Aug 1998 18:07:34 +0300
From: Alex Cohn <alexcohn@photonet.com>
Subject: embedding Perl 5 in C - core memory
Message-Id: <35E57636.6D5F@photonet.com>
I have embedded Perl 5 interpreter in an "HTTP-ish" server written in C.
The server preloads all the necessary scripts, and forks children - new
child per incoming connection. So far so good. The Perl scripts execute
fine and fast.
But some of the scripts open pipes -- and can not. Experiments show that
simple system("/bin/ls") encounters the same problem. But only from the
child process. ERRNO is ENOMEM.
Should I take some special precautions when I fork the children? Should
I set some special flags for Perl?
Thanks in advance,
Alex
PS: some configuration details might be worth mentioning:
perl, version 5.004_04 built for sun4-solaris
gcc version 2.7.2
CFLAGS=-Wall -ansi -pedantic -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -g
------------------------------
Date: Thu, 27 Aug 1998 19:39:23 -0500
From: "Andy Lee" <andylee@prodigy.net>
Subject: even or odd
Message-Id: <6s4thf$7nng$1@newssvr04-int.news.prodigy.com>
Hi,
I need some help to write a script to print out the even number.
This is what I am trying to do. Read a file and print out only the even
number
records. I don't know how to test the number for even or odd. Thanks..
#!/usr/bin/perl
open (file,"phone.dat")
while (<file>)
{
#Test for even number
#print only the even number record
}
close (file)
AndyL
------------------------------
Date: 28 Aug 1998 00:39:55 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: even or odd
Message-Id: <6s4u8r$42m$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Andy Lee" <andylee@prodigy.net> writes:
I don't know how to test the number for even or odd.
You don't? Really? Can you tell us what an even or odd
number means to you? If you can, you can test for it.
It's 4th-grade math stuff. Just think it through.
--tom
--
I forgot what it was like to be a tester...
If you have a conscience, it's not easy
-- Dean Roehrich, soon after coming back from Marketing
------------------------------
Date: Thu, 27 Aug 1998 20:33:28 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Help - Perl security problem!
Message-Id: <fl_aggie-2708982033280001@aggie.coaps.fsu.edu>
In article <35e61b3d.4305444@news.netcom.ca>, ben@smartservers.com wrote:
+ Can anyone give me some ideas how to get around this?
perldoc perlsec
Quote:
You may not use data derived from outside your program to
affect something else outside your program--at least, not by
accident. All command line arguments, environment
variables, locale information (see the perllocale manpage),
results of certain system calls (readdir, readlink, the
gecos field of getpw* calls), and all file input are marked
as "tainted". Tainted data may not be used directly or
indirectly in any command that invokes a sub-shell, nor in
any command that modifies files, directories, or processes.
Later:
If you try to do something insecure, you will get a fatal
error saying something like "Insecure dependency" or
"Insecure PATH".
Later yet:
But testing for taintedness gets you only so far. Sometimes
you have just to clear your data's taintedness. The only
way to bypass the tainting mechanism is by referencing
subpatterns from a regular expression match. Perl presumes
that if you reference a substring using $1, $2, etc., that
you knew what you were doing when you wrote the pattern.
That means using a bit of thought--don't just blindly
untaint anything, or you defeat the entire mechanism. It's
better to verify that the variable has only good characters
(for certain values of "good") rather than checking whether
it has any bad characters. That's because it's far too easy
to miss bad characters that you never thought of.
Much later:
Laundering data using regular expression is the
ONLY mechanism for untainting dirty data, unless you use the
strategy detailed below to fork a child of lesser privilege.
And an example:
if ($data =~ /^([-\@\w.]+)$/) {
$data = $1; # $data now untainted
} else {
die "Bad data in $data"; # log this somewhere
}
James
------------------------------
Date: Fri, 28 Aug 1998 05:39:08 GMT
From: ben@isolve.net (Ben Duncan)
Subject: Re: Help - Perl security problem!
Message-Id: <35e6422b.14272636@news.netcom.ca>
Hi!
I've fixed my problem by writing a c-wrapper which calls setuid/setgid
& then exec's the perl script.
Thanks for your help James,
------------------------------
Date: 28 Aug 1998 00:12:10 GMT
From: r-watkinsNOSPAM@worldnet.att.net (Robert Watkins)
Subject: Re: How do I connect to an MS Access database from perl ?
Message-Id: <6s4skq$hrp@bgtnsc01.worldnet.att.net>
In article <35D1EA61.51E9@nmtec.com>, sucheta@nmtec.com wrote:
>Could anybody please advice me on how do I connect to an Access database
>from my perl scipt?
>
>Thanks,
>Sucheta
The answer lies with the Win32::ODBC package.
Check the documentation and all will fall into place!
Robert Watkins
Supervising Web Developer
Springer-Verlag New York, Inc.
rwatkins@NOSPAMspringer-ny.com
http://www.springer-ny.com
------------------------------
Date: 28 Aug 1998 00:24:32 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Max value in an array
Message-Id: <6s4tc0$42m$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, abigail@fnx.com writes:
:Oh, so now void context isn't a special case of scalar context anymore?
Sure it is.
--tom
--
MAGIC* xmg_magic; /* linked list of magicalness */
--Larry Wall, from sv.h in the v5.0 perl distribution
------------------------------
Date: 27 Aug 1998 20:42:11 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <6s4ud3$43g$1@monet.op.net>
In article <6s4q97$35p$3@client3.news.psi.net>,
Abigail <abigail@fnx.com> wrote:
>++ which does exactly the same thing and is shorter to type anyway!
>
>The number of characters typed is irrelevant.
Then we agree. But not everyone agrees with us. Oftentimes I suggest
that people do X instead of Y, and X is clearly better than Y, but
they complain that X is too much to type. Go figure.
>'use constant' stands out better than the glob.
To me, that sounds like an argument in favor of the glob.
If things stand out, you have to see them whether you want to or not.
But if they fade into the background, you have the option of writing
*true = sub () { 1 }; ##### **** HEY ABIGAIL! LOOK AT ME!!! **** #####
>The question is, why is constant.pm using 1094 lines of code?
Actually that's version 5.005. In 5.004, it's only 968 lines.
------------------------------
Date: Fri, 28 Aug 1998 01:22:34 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <6s4vtj$d1b$1@rand.dimensional.com>
[posted to comp.lang.perl.misc and mailed to the cited author]
In article <6s4ud3$43g$1@monet.op.net>
mjd@op.net (Mark-Jason Dominus) wrote:
>In article <6s4q97$35p$3@client3.news.psi.net>,
>Abigail <abigail@fnx.com> wrote:
>>The question is, why is constant.pm using 1094 lines of code?
>Actually that's version 5.005. In 5.004, it's only 968 lines.
But that isn't _all_ code. For 5.005 you only actually load
474 lines of code after blanks, comments, and pod are
stripped out.
$ perl -e 'while (<>) {
$seen_pod = 1 if /^=\w+/;
$seen_pod = 0 if /^=cut/;
next if $seen_pod;
next if /^\s*(?:#.*)$/;
$line_count++
}
print qq,$line_count lines loaded for constant.pm\n,;
' vars.pm constant.pm strict.pm Exporter.pm Carp.pm
474 lines loaded for constant.pm
$
None of those modules has pod hanging off the end without
a =cut, so nothing is getting skipped that should be
counted.
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
`Train of thought derailed. 7 dead, film at 11.'
------------------------------
Date: 27 Aug 1998 21:54:08 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <6s52k0$4cl$1@monet.op.net>
In article <6s4vtj$d1b$1@rand.dimensional.com>,
Daniel Grisinger <dgris@rand.dimensional.com> wrote:
>>Actually that's version 5.005. In 5.004, it's only 968 lines.
>But that isn't _all_ code.
Yes, you're right. I was lying when I said 968, on purpose, with
intent to deceive. I hadn't done the pod count, but I did know, for
example, that the Exporter was really only 250 lines of code or
thereabouts. My apologies.
But I think the point still stands. It's 474 lines of code (456 in
5.004) so that you can say
use constant true => 1;
instead of
*true = sub () { 1 };
which seems to me like a gross overuse of technology, like those
people who take their laptops on the airplane so that they can play
card solitaire on the laptop.
Other point on the other side of the argument: The 474 lines are all
in things like Exporter, Carp, strict, and vars, that you were
probably going to have to pull in anyway, so the extra cost may really
be zero.
Other point on the same side of the argument: Those packages are
*also* much too big.
------------------------------
Date: Fri, 28 Aug 1998 10:20:57 +1000
From: Dante <dante@ar.com.au>
Subject: Re: Perl <-> Database interface module
Message-Id: <35E5F7E9.2D6CB5D@ar.com.au>
I just thought I'd add something to my original post that I missed before...
Dante wrote:
> I've got this Btrieve database, and I'd like to be able to read from and
> hopefully write/update it using Perl. I'd be interested to hear any info
> about this. Is there a module around to help with this, like for other
> database formats?
This is what I'm still looking for...
> So far I've come up with a way of "sort of" reading the database, but
> only because I know the field widths, and their relation between each
> other, but it would be really good if there was a proper way of doing it
> as my method is very slow (but it works for the purpose at the moment,
> but I'd like to "expand" the purpose of what I'm using the Btrieve db
> for).
What I forgot to say is that: I can read the database, but only because I
know one field has a list of certain possible values, so I read the file, 6
bytes at a time, searching for these possible values, and then the rest of
the record lies on either side of this field. Not very efficient, but it
works. What I'm looking for is a way I can read it properly - the format is
indexed in some way I don't know how it works.
> If not... from what I gather, and I still don't know too much about
> Btrieve yet, but are there other ways to read/update Btrieve databases
> from Linux, perhaps using C/C++? Any suggestions, pointers of where to
> go would be appreciated.
I've only just started learning C++, but, on a side note and now this is
going away from Perl, but hey, were all programmers here, if there's another
way to do this in C/C++ on Linux I'd be glad to hear about it.
Regards,
Dante - iN oZ
dante@ar.com.au
------------------------------
Date: 27 Aug 1998 23:54:31 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl compiler
Message-Id: <6s4rjn$3ll$2@client3.news.psi.net>
Albert W. Dorrington (awdorrin@mail.delcoelect.com) wrote on MDCCCXXII
September MCMXCIII in <URL: news:6s47h6$4s4@ws051eng.ictest.delcoelect.com>:
++
++ In article <6rta8s$1t2$2@client3.news.psi.net>, abigail@fnx.com (Abigail) writes:
++ :> Craig Berry (cberry@cinenet.net) wrote on MDCCCXX September MCMXCIII in
++ :> <URL: news:6rt1jv$9fu$1@marina.cinenet.net>:
++ :> ++
++ :> ++
++ :> ++ Science is not a fair comparison. Science is (in the ideal sense) abou
++ :> ++ the quest for Truth, for the secrets of the world in which we live. It
++ :> ++ strives toward a culture of openness and sharing. Perl is a tool used
++ :> ++ many -- or most -- of us) in our daily, grubby quest for money. We hap
++ :> ++ to love it, and enjoy using it, but money drives the process, by and
++ :> ++ large.
++ :>
++ :> Then don't come here for free advice on hiding your petty source code.
++ :> That makes you into a selfish person.
++ :>
++
++ Oh give me a break! There are many valid reasons for wanting
++ to keep source code hidden from users.
No, there are not.
++ Most of the reasons I can think of off the top of my head
++ deal with security issues or support.
Security? Nope. Support??????? Only in a negative sense.
++ The real answer to the question: 'How can I hide/protect my
++ source code?' is - use another language, such as C, which
++ is compiled.
And which can be decompiled.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
------------------------------
Date: 28 Aug 1998 00:18:56 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Perl compiler
Message-Id: <6s4t1g$cot$1@news.NERO.NET>
In article <opgr9y2dphv.fsf@harper.uchicago.edu>,
Peter A Fein <p-fein@uchicago.edu> wrote:
>stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
>What you could really use here is ssh.
Sigh. No, what I really can't use here is ssh. If I could use ssh for
any of the examples I presented, I would be using it already. Unfortunately,
ssh requires 1) a network connection and 2) a server at the other end,
neither of which is true in example 2 (tides), and the latter is not
true for the other two examples.
------------------------------
Date: 28 Aug 1998 00:18:04 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl script compiling
Message-Id: <6s4svs$42m$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Mee <mee@mine.com> writes:
:I am aware that statements "emperor has no clothes" are
:unpopular and a waste of time, but can't resist
:pointing out that your Bible introduces the Perl creed
:on the page 164 (that's ONE HUNDRED SIXTY FOUR)!
Is there some reason you're confusing two Toms of
different surnames? :-(
--tom
--
Besides, it's good to force C programmers to use the toolbox occasionally. :-)
--Larry Wall in <1991May31.181659.28817@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: 27 Aug 1998 21:16:29 +0200
From: Adrian Aichner <aichner@ecf.teradyne.com>
Subject: Re: SWF (Shockwave Flash) file format
Message-Id: <rxshfyy1bhu.fsf@tomorrow.ecf.teradyne.com>
>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
Larry> I am having difficulty parsing packed binary data from the
Larry> Shockwave Flash file format (.swf), despite having the
Larry> detailed specification in hand. I have found no module
Larry> that helps either.
Larry,
at the danger of stating the obvious...
Are you aware of
pack TEMPLATE,LIST
Takes an array or list of values and packs it into a
binary structure, returning the string containing
the structure. The TEMPLATE is a sequence of
characters that give the order and type of values,
as follows:
A An ascii string, will be space padded.
a An ascii string, will be null padded.
b A bit string (ascending bit order, like vec()).
B A bit string (descending bit order).
h A hex string (low nybble first).
H A hex string (high nybble first).
c A signed char value.
C An unsigned char value.
and
unpack TEMPLATE,EXPR
Unpack() does the reverse of pack(): it takes a
string representing a structure and expands it out
into a list value, returning the array value. (In
scalar context, it returns merely the first value
produced.) The TEMPLATE has the same format as in
the pack() function. Here's a subroutine that does
substring:
sub substr {
my($what,$where,$howmuch) = @_;
unpack("x$where a$howmuch", $what);
}
as documented in the perlfunc man page and HTML docs?
For an unrelated file format I use this:
$wd = pack "f$self->{'wh'}->{'sampsize'}", (@{$self->{'dp'}});
to pack a floating point data array of size sampsize into a binary
data-structure returned in $wh.
HTH,
Adrian
Larry> Would someone who has experience or code in this area
Larry> please help (via email if you think the content might be
Larry> too specific for the Perl newsgroups). In particular, I am
Larry> trying to recover the image size, but Image::Size doesn't
Larry> handle this format.
--
Adrian Aichner
Applications Engineer
Teradyne GmbH
Semiconductor Test Group Telephone +49/89/41861(0)-208
Dingolfinger Strasse 2 Fax +49/89/41861-217
D-81673 MUENCHEN E-mail aichner@ecf.teradyne.com
------------------------------
Date: 27 Aug 1998 22:29:26 +0200
From: Adrian Aichner <aichner@ecf.teradyne.com>
Subject: Re: SWF (Shockwave Flash) file format
Message-Id: <rxsaf4q1849.fsf@tomorrow.ecf.teradyne.com>
>>>>> "APA" == Adrian Aichner <aichner@ecf.teradyne.com> writes:
APA> $wd = pack "f$self->{'wh'}->{'sampsize'}", (@{$self->{'dp'}});
APA> to pack a floating point data array of size sampsize into a binary
APA> data-structure returned in $wh.
Argh! returned in $wd, of course.
--
Adrian Aichner
Applications Engineer
Teradyne GmbH
Semiconductor Test Group Telephone +49/89/41861(0)-208
Dingolfinger Strasse 2 Fax +49/89/41861-217
D-81673 MUENCHEN E-mail aichner@ecf.teradyne.com
------------------------------
Date: Thu, 27 Aug 1998 17:57:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: SWF (Shockwave Flash) file format
Message-Id: <MPG.104fa047e8cca9db98980d@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <rxshfyy1bhu.fsf@tomorrow.ecf.teradyne.com> on 27 Aug 1998
21:16:29 +0200, Adrian Aichner <aichner@ecf.teradyne.com> says...
> >>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
>
> Larry> I am having difficulty parsing packed binary data from the
> Larry> Shockwave Flash file format (.swf), despite having the
> Larry> detailed specification in hand. I have found no module
> Larry> that helps either.
>
> Larry,
>
> at the danger of stating the obvious...
>
> Are you aware of
>
> pack TEMPLATE,LIST
>
> <SNIP>the documentation for pack/unpack, and a trivial example></SNIP>
>
> HTH,
>
> Adrian
Dear Adrian,
I will overlook the patronizing nature of your response. Instead, I will
follow the advice of Jason Moore [jmoore@sober.com], sent to me by email:
"Send the newsgroup a code sample, and the part of the relevant part of
the spec. I'm sure perl can do what you want, and it would probably be
a cool little addition to Image::Size if gets figured it out."
Here is the spec excerpt (from <URL:
http://www.macromedia.com/software/flash/open/spec/SWFfilereference.html
>.
------
Bit Values
Bit values are a linear sequences of bits that describe signed and
unsigned integer and fixed point values. Other types of values that
follow one or more bit values are always aligned to the nearest byte
boundary with zero bits as padding.
Type Comment
SB[n] Signed bit value - n is number of significant bits
UB[n] Unsigned bit value - n is number of significant bits
...
Rectangle Values
A rectangle value represents a rectangular region defined by a minimum X-
and Y-coordinate position with a maximum X- and Y-coordinate position.
The format for a rectangular value within the file is described in the
following table:
Field Type Comment
Nbits nBits = UB[5] Bits in each rect value field
Xmin SB[nBits] X minimum position for rect
Xmax SB[nBits] X maximum position for rect
Ymin SB[nBits] Y minimum position for rect
Ymax SB[nBits] Y maximum position for rect
------
And here are the bytes that I *know* contain the desired values (as I
have successfully decoded the preceding bytes, using unpack -- gee,
Adrian, I've heard of it!):
"\x70\x00\x0c\x80\x00"
The semantics of "Other types of values that follow one or more bit
values are always aligned to the nearest byte boundary with zero bits as
padding." are key here, but I cannot grok them.
I will *not* include my tries at unpack, because they didn't produce
meaningful results. If they had, I wouldn't have made the post.
> HTH,
>
> Adrian
Not even a little bit (or byte, if you wish).
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 28 Aug 1998 01:52:21 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unreadable Scripts?
Message-Id: <p3oF1.74$V5.592028@shore>
Russ Allbery (rra@stanford.edu) wrote:
: news.announce.newusers, I assume you mean. news.announce.newgroups won't
: help new readers of this group very much, since we're not in the process
: of reorganizing it just now. :)
No. I should've said news.announce.* .
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Fri, 28 Aug 1998 01:53:28 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unreadable Scripts?
Message-Id: <s4oF1.75$V5.592028@shore>
Norman UNsoliciteds (No.unsoiliciteds@dead.end) wrote:
: Oh puuuuuhhhleeeeeze I bet you knew all these things before you came on
: Use Net, I never seen such a bunch of BOFs (and this doesn't mean birds
: of a feather) trying to pretend they were never kids.
Someone yelled at me early on.
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Fri, 28 Aug 1998 01:55:29 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unreadable Scripts?
Message-Id: <l6oF1.76$V5.592028@shore>
Norman UNsoliciteds (No.unsoiliciteds@dead.end) wrote:
: Probably for the same reason other people are unable to skip postings
: without making some kind of ironic/sarcstic
^^^^^^^^
Somehow you misunderstand sarcasm. Otherwise you wouldn't have
replied to my statement.
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: 28 Aug 1998 00:21:43 GMT
From: r-watkinsNOSPAM@worldnet.att.net (Robert Watkins)
Subject: Re: When using CGI.pm to upload file I get extraneous data
Message-Id: <6s4t6n$cin@bgtnsc02.worldnet.att.net>
In article <MPG.104f78ce3b89c43598980a@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry Rosler) wrote:
>
>Did you binmode the NEWPDF file too?
>
Eureka!
That did it; the rest will be a piece of cake.
Thank you, (another) Larry!
-- Robert
------------------------------
Date: Thu, 27 Aug 1998 20:13:45 -0400
From: stevel <stevel@apollo.gti.net>
Subject: Win32 and Perl
Message-Id: <Pine.GSO.4.02.9808272009180.27764-100000@apollo.gti.net>
I've been using perl for a few years now on Unix systems for various
little scripts, etc. However, recently I've had to work at a Windows 95
system writing various scripts. I know it's possible to control
applications such as Excel through the OLE package on Perl. What about
pulling up things such as dialog boxes, file browsers, etc for interactive
use in scripts? Is it possible to do this? If so, could someone point me
towards an online guide as to how to do this (with examples?)
Thanks
Steve
stevel@gti.net
------------------------------
Date: Fri, 28 Aug 1998 00:43:57 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Y2K Date Support
Message-Id: <6s4tmm$cu1$1@rand.dimensional.com>
In article <35E5D5BE.E1F81592@mine.com>
Mee <mee@mine.com> wrote:
>Craig:
>
><< Summary: Perl itself is "y2k safe," whatever that means for a
>language. Perl programs can be as y2k-bug-ridden as their authors
>choose to make them. >>
>
>This utterly nonsensical statement is exactly what I referred to as
>"propaganda" in my original post.
What, pray tell, is `utterly nonsensical' about Craig's statement?
Perl has a well defined method of signifying what year it is
when localtime() is called. It will _always_ return the current
year - 1900.
That doesn't stop some clueless person from writing-
$this_year = '19' . (localtime())[5];
and getting the wrong value for $this_year after the
turn of the century. But that isn't a problem with perl,
it's a problem with the brain donor who wrote that code.
You are either being deliberately obtuse and confrontational,
or you are just plain stupid (I suspect the former, but haven't
ruled out the latter).
*plonk*
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
`Train of thought derailed. 7 dead, film at 11.'
------------------------------
Date: Thu, 27 Aug 1998 20:44:22 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Y2K Date Support
Message-Id: <fl_aggie-2708982044220001@aggie.coaps.fsu.edu>
In article <35E5D5BE.E1F81592@mine.com>, Mee <mee@mine.com> wrote:
+ Craig:
+
+ << Summary: Perl itself is "y2k safe," whatever that means for a
+ language. Perl programs can be as y2k-bug-ridden as their authors
+ choose to make them. >>
+
+ This utterly nonsensical statement is exactly what I referred to as
+ "propaganda" in my original post.
Its not nonsensical. Have you looked at the documentation for localtime,
either as a c library, or as the perl interface to that library?
*cough*cough* Begin quote of Ye Old Documenation:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
All array elements are numeric, and come straight out of a
struct tm[1]. In particular this means that $mon has the range
0..11 and $wday has the range 0..6 with sunday as day 0. Also,
$year is the number of years since 1900, that is, $year is 123
in year 2023.
Hence, in the year 2000, localtime() and its allies are going to return
the value '100', not '00'. As such:
$year=1900+$year; # no Y2K problem, because the data is handled correctly
$year='19'.$year; # Y2K problem, because the data is handled incorrectly
If your complaint is that perl will not stop you from doing something
incorrectly, then my response will be:
Many computer scientists have fallen into the trap of trying to define
languages like George Orwell's Newspeak, in which it is impossible to
think bad thoughts. What they end up doing is killing the creativity
of programming.
-- Larry Wall
Perl will quite cheerfully hand you all the rope you need to hang yourself,
your machine, and possibly your entire network. I kind of like it that
way...
James
[1] For your edification, the snippet defining 'struct tm' can be found
in 'man localtime', and is reproduced here:
Declarations of all the functions and externals, and the tm structure,
are in the time.h header file. The structure declaration is:
struct tm {
int tm_sec; /* seconds after the minute - [0, 61] */
/* for leap seconds */
int tm_min; /* minutes after the hour - [0, 59] */
int tm_hour; /* hour since midnight - [0, 23] */
int tm_mday; /* day of the month - [1, 31] */
int tm_mon; /* months since January - [0, 11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0, 6] */
int tm_yday; /* days since January 1 - [0, 365] */
int tm_isdst; /* flag for alternate daylight */
/* savings time */
};
The value of tm_isdst is positive if daylight savings time is in effect,
zero if daylight savings time is not in effect, and negative if the
information is not available. (Previously, the value of tm_isdst was
defined as non-zero if daylight savings time was in effect.)
------------------------------
Date: Thu, 27 Aug 1998 18:05:57 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Y2K Date Support
Message-Id: <MPG.104fa24fff72be3c98980e@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6s4tmm$cu1$1@rand.dimensional.com> on Fri, 28 Aug 1998
00:43:57 GMT, Daniel Grisinger <dgris@rand.dimensional.com> says...
...
> That doesn't stop some clueless person from writing-
>
> $this_year = '19' . (localtime())[5];
Let's not forget my favorite (wagers on which will happen more?):
sprintf '... %.2d ...', (localtime)[5];
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
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 3569
**************************************