[9127] in Perl-Users-Digest
Perl-Users Digest, Issue: 2745 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 28 09:07:22 1998
Date: Thu, 28 May 98 06:01:04 -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, 28 May 1998 Volume: 8 Number: 2745
Today's topics:
Re: Clearly define "free software" <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de>
Re: Clearly define "free software" (le Fanttme)
Re: Clearly define "free software" (Chris Nandor)
Re: Copylefting manuals (Isaac)
Re: Copylefting manuals (Chris Nandor)
hash keys order returned by keys() reproducible ? <blacroix@soleil.biomerieux.fr>
Re: Help: Delete a file with Perl Script in WinNT <perlguy@inlink.com>
how to init three dimentional array using perl <johnvun@asiapac.net>
Re: HOWTO : Perl5/NT user authentication <perlguy@inlink.com>
Re: Modules in Perl <jaeguy@hotmail.com>
Re: OO - explicit package name required (Chris Nandor)
Re: ord(),bitshifting problem <qdtcall@esb.ericsson.se>
Re: Perl for WindowsNT? (/\oo/\ the original)
Re: Perl for WindowsNT? (Paul Groves)
Re: Perl question about Leap year <Dave.Cross@gb.swissbank.com>
Re: Perl Win95 Question <sharmstr@nomail.com>
Re: Perl32 on NT <msergeant@ndirect.co.uk_NOSPAM_PLEASE>
Re: SECURITY - simple perlscript for taking orders (/\oo/\ the original)
Re: Substitute gurus... got a better word wrap? <PROCURA_BV@CompuServe.com>
Re: system() in NT-Perl (Jonathan Stowe)
Re: Text File Manipulatoin (John)
Visibility of "my" vars (Bob Kline)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 28 May 1998 12:32:21 +0200
From: David Kastrup <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de>
Subject: Re: Clearly define "free software"
Message-Id: <m2yavmu1my.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
fantome/@/usa/./net (le Fanttme) writes:
> On 27 May 1998 22:44:16 GMT, ehood@geneva.acs.uci.edu (Earl Hood)
> wrote:
>
> Maybe one of these days, people will learn to read and understand and
> not act stupid. Where have I suggested that I use anything but vim for
> code editing? Rather, I have taken the opposite approach: why the hell
> should I require that someone who wants to write a letter to the
> editor (or whatever) use a text/code editor?
Because there is no integrated word processing system producing
consumer level quality with consumer level stability around at
consumer level price. So one has to make do with components (editor,
typesetter, etc) that are available with consumer level quality at
consumer level prices.
> No, you're not a typical consumer. What do you use to write your
> letters to the editor, or to your parents, or your reports for your
> boss? If you say that you use LaTeX, you're not a typical consumer.
My girl friend is doing her text processing needs with LaTeX, and gets
them done typically faster and at a higher quality level than others.
Of course, if "consumer level" means a person not using LaTeX by
definition, we can save ourselves a lot of discussion. LaTeX will
never become consumer quality then, because if you use it, you are
automatically no longer a consumer.
--
David Kastrup Phone: +49-234-700-5570
Email: dak@neuroinformatik.ruhr-uni-bochum.de Fax: +49-234-709-4209
Institut f|r Neuroinformatik, Universitdtsstr. 150, 44780 Bochum, Germany
------------------------------
Date: Thu, 28 May 1998 11:53:24 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Clearly define "free software"
Message-Id: <F82CB2CDAA8778F2.DF02E2C016F00B41.5B079AC4FCF4B11A@library-proxy.airnews.net>
On 28 May 1998 12:32:21 +0200, David Kastrup
<dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:
>fantome/@/usa/./net (le Fanttme) writes:
>> On 27 May 1998 22:44:16 GMT, ehood@geneva.acs.uci.edu (Earl Hood)
>> wrote:
>> Maybe one of these days, people will learn to read and understand and
>> not act stupid. Where have I suggested that I use anything but vim for
>> code editing? Rather, I have taken the opposite approach: why the hell
>> should I require that someone who wants to write a letter to the
>> editor (or whatever) use a text/code editor?
>Because there is no integrated word processing system producing
>consumer level quality with consumer level stability around at
>consumer level price. So one has to make do with components (editor,
>typesetter, etc) that are available with consumer level quality at
>consumer level prices.
You misunderstand my use of 'require' in that sentence. If the only
tools you have are those, you're right -- that's what you have to
offer. But this is why Windows remains important, despite the fervent
desires of many people [including myself, in case you had missed that]
-- not *everyone* wants to have to learn how to use the fine tools
available in a watch toolkit just to get the job done. Not everyone
can think in abstract terms to understand that "<em>text</em>" is
going to result in bold text -- they want to *see* it on-screen as
they're typing.
>> No, you're not a typical consumer. What do you use to write your
>> letters to the editor, or to your parents, or your reports for your
>> boss? If you say that you use LaTeX, you're not a typical consumer.
>My girl friend is doing her text processing needs with LaTeX, and gets
>them done typically faster and at a higher quality level than others.
That may be a wholly subjective evaluation.
>Of course, if "consumer level" means a person not using LaTeX by
>definition, we can save ourselves a lot of discussion. LaTeX will
>never become consumer quality then, because if you use it, you are
>automatically no longer a consumer.
Having not seen Lyx, this statement (although almost a tautology) is a
true one. If Lyx allows you to use LaTeX without having to know all of
the "unnecessary" markup tags (believe me: to most people, markup tags
are unnecessary -- it should just work), then the people using Lyx
might be closer to typical consumers. If you can envision layout by
using markup tags (I can; but then again, unlike some of the folks
here, I've never claimed to be a typical consumer), then you're not a
typical consumer.
This really isn't a hard concept to grasp: as long as you demand that
everyone meets your tool needs, you're being an arrogant ass and
dooming that free software will ultimately be irrelevant for the
consumer.
-f (kinda like OS/2 -- it just didn't have the consumer level software
to keep it going as a desktop operating system)
--
austin ziegler * fantome*@*vnet*.*net * http://fantome.vnet.net/
---------------* aziegler*@*vcela*.*com * -------------------------
Remove the stars to email me * Ni bhionn an rath ach
my words my opinions my ideas * mar a mbionn an smacht
-- I Argue Ideas, Not Beliefs: Give Up Your Dogma --
------------------------------
Date: Thu, 28 May 1998 12:02:54 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Clearly define "free software"
Message-Id: <pudge-2805980757190001@dynamic265.ply.adelphia.net>
In article <896312938.451699@cabal>, ? the platypus {aka David Formosa}
<dformosa@st.nepean.uws.edu.au> wrote:
# >A computer program is not a mathematical construct, it USES mathematical
# >constructs (usually).
#
# Then what about alogrithums? Where dose a mathimatical alogrythum become
# a program?
I would contend that a program is more than ideas, and mathematical
constructs are ideas. Take this program:
#!perl
print 2+2;
This program has lots of components by the time it is executed, but we can
break it down to at least two:
1. Mathematical construct
2. Directive to do something with data (e.g., output result)
Even if it simply calculated and did nothing else, you would still have
lots in the guts of the program that are not strictly mathematical
constructs (by the time it is compiled and executed), unless you want to
define "mathematical constructs" loosely enough to include every string of
0s and 1s on a computer, no matter what its purpose.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 28 May 1998 11:57:33 GMT
From: Isaac@yellow.submarine.pla (Isaac)
Subject: Re: Copylefting manuals
Message-Id: <slrn6mq638.akp.Isaac@submarine.yellow.org>
In article <jad8czk0i4.fsf@gatsby.u-net.com>, David Wragg wrote:
>
>If someone asked me a question to which the answer had to be a
>significant chunk of code, and I suspected that they would incorporate
>that code into their work for their employer, I would be reluctant to
>answer that question. I like helping people, but I won't do their jobs
>for them (and I'm sure that you wouldn't either).
>
I think there are huge numbers of people who don't feel this way. I
see large amounts of code posted on usenet all the time in response
to queries that don't hide the fact that they are work related. I
don't have any problem with your reluctance, but your position is
far from universal.
Isaac
------------------------------
Date: Thu, 28 May 1998 11:57:50 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Copylefting manuals
Message-Id: <pudge-2805980752150001@dynamic265.ply.adelphia.net>
In article <IO%a1.29$443.900243@cam-news-reader1.bbnplanet.com>, Barry
Margolin <barmar@bbnplanet.com> wrote:
# In article <87solxoi5b.fsf@io.oryxsoft.com>, Paul Fisher <rms@gnu.org> wrote:
# >One other limit on your flexibility is that you can't stop people from
# >copying small examples no matter what you say. Small quotations from
# >a book are "fair use"; people don't need special permission for them.
#
# I wish a lawyer would join the discussion and say whether the above is
# really true. As I've posted elsewhere, my lay understanding of "fair use"
# is that it's not so liberal. Besides being small quotations, fair use also
# specifies the type of use you make of it, and I'm not sure that
# incorporating examples into a program falls into its limits. The web page
# <http://www.benedict.com/fairtest.htm> describes the factors that are now
# considered when deciding whether use is fair. "Relative amount" is just
# one of the four factors listed there.
You are absolutely correct. If I publish a book of my own algorithms,
which I invented and copyrighted and are fantastic and new to the world, I
can require that you don't use them in a program for sale. However, that
would most likely fall under patent law. You can't copyright an idea, you
have to patent it. And since the code would likely not be used verbatim,
copyright law probably would not have much to say on the matter.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Thu, 28 May 1998 12:40:37 +0200
From: Bruno LACROIX <blacroix@soleil.biomerieux.fr>
Subject: hash keys order returned by keys() reproducible ?
Message-Id: <356D3F25.C7AD3C3F@soleil.biomerieux.fr>
Hi,
I've got two questions.
First, I've always believed that the order in which a hash's keys are
returned by keys() is identical as long as the hash itself is the same;
however, I now doubt it since I've observed varying orders between
different calls to the following sub (in the same process) :
sub merge
{
my($obj_ref1, $obj_ref2, @list) = @_;
my(%inter);
foreach $elem (@list) {
undef %inter;
grep($inter{$_}++, @{$obj_ref1-> getArrayRef($elem));
grep($inter{$_}++, @{$obj_ref2 -> getArrayRef($elem));
push(@result, keys(%inter));
}
}
What's wrong here?
My second question is about memory management with perl5.004_59 on AIX
4; my system is set up with 4 paging areas, 256 Mo each, and my perl
scripts are killed by a "illegal instruction" signal when their running
size reach this 256 Mo value (as far as I can judge with ps). Before
dying, they appear to be correctly split into the different paging areas
by the system. Any hint ?.
Thanks.
------------------------------
Date: Thu, 28 May 1998 10:20:11 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Help: Delete a file with Perl Script in WinNT
Message-Id: <356D3A5B.DA00AE0A@inlink.com>
Use the drive letter and path like so:
$file_remove="d:/wwwroot/testpage/test.txt";
unlink($file_remove);
And it should now be gone...
HTH,
Brent
------------------------------
Date: Thu, 28 May 1998 18:09:17 +0800
From: johnvun <johnvun@asiapac.net>
Subject: how to init three dimentional array using perl
Message-Id: <356D37CD.5704B7CE@asiapac.net>
Dear expert,
how to init three dimentional array and how the syntax look like ???
i want to init the three dimentional array be zero.
for ($in = 1; $in < 13; $in++)
for ($shop =1; $shop < 120; $shop++)
for ($trans=1; $trans<100; $trans++)
@isarray{"$in","$shop","$trans"}=0;
is this syntax ok ????
how i check my array is zero ???
Thanks in advance.
John Vun
------------------------------
Date: Thu, 28 May 1998 10:48:00 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: HOWTO : Perl5/NT user authentication
Message-Id: <356D40E0.6083FE5F@inlink.com>
Have you tried setting the web server up to do the authentication for
you? That should be the easiest, and most secure, way.
Once you overcome that, let me know what you need to do. I have done
some user/group stuff in NT with Perl.
HTH,
Brent
------------------------------
Date: Thu, 28 May 1998 10:25:52 GMT
From: "J" <jaeguy@hotmail.com>
Subject: Re: Modules in Perl
Message-Id: <QYab1.23$Yt5.161542@rockcake>
thanks all!!
will try a few things....
I put Escape.pm in c:\website\perl5\Lib i think.
also tried:
use lib "d:\htdocs\cgi-shl\"
Jan Krynicky wrote in message <356CEF59.5B20@comenius.ms.mff.cuni.cz>...
>J wrote:
>>
>> Sorry for bugging....
>>
>> I'm using Website running with Perl5 installed... (and now Escape.pm)
>> am trying to call it from a perl script using
>>
>> use URI::Escape
>>
>> but every time I include this in the script the server throws back a 500
>> Error......
>> the script is being used to grab a reference number (ie: hmr00001) from
>> QUERY_STRING and search a database, pull out the relevant information
then
>> call a second script as follows:
>> createhtml.pl?a=1&b=2&caption=Hello There My
>> Son&Filename=http://www.domain.com/images/crap.jpg
>>
>> what am I doing wrong?
>>
>> J
>
>Is it working from command prompt?
>What error messages do you get if it is not?
>Where did you place Escape.pm?
>
>A little more info is needed.
>
>Jenda
------------------------------
Date: Thu, 28 May 1998 12:09:22 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: OO - explicit package name required
Message-Id: <pudge-2805980803470001@dynamic265.ply.adelphia.net>
In article <356D27B5.B43C4A96@nortel.co.uk>, "Frank L. Quednau"
<quednauf@nortel.co.uk> wrote:
# Global symbol "ISA" requires explicit package name at
# E:\PERL\lib/Infocentre.pm line 5.
# Compilation failed in require at test.pl line 5.
# BEGIN failed--compilation aborted at test.pl line 5.
The Ferengi Rule of Programming #34 is The error message *means what it
says*. You need to specify a package for @ISA. You can get around it,
though, with use vars.
See perldoc vars, perldoc strict, and perldoc perlsub for my and local.
When you have use strict or use strict qw/vars/ on, every non-special
variable must be either package-specified or made lexical with my().
If you had read any of the fine documents on how to create modules (or
used the h2xs tool to create your skeleton module for you), you would have
seen a line like this:
use vars qw(@ISA @EXPORT $VERSION);
That makes it so you can use those specified variables in your module
without having to say @Infocentre::ISA.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 28 May 1998 12:31:20 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: ord(),bitshifting problem
Message-Id: <isogwi7klj.fsf@godzilla.kiere.ericsson.se>
kek@olympus.irdu.nus.sg (Choo Heng Kek) writes:
> I'm trying to bitwise-shift a character to the right by 4 positions,
Something like this?
perl -e '$a="z";$a = ord($a) >> 4;print chr($a),"\n";'
This prints a bell (ASCII character 7).
> Argument "z" isn't numeric in right_shift at ./d line 7.
As Perl is telling you, "z" is not a number. If you treat it like one,
it'll be converted to 0.
> Shouldn't the ord() of a single character give a length of 1??
> Any suggestions, insights and comments?
Probably not. ord() of most characters is three digits long (for
example, your "y" becomes 121). When you ask for the length, Perl will
convert it to a string (because length() only makes sense for strings)
and then count the characters in the string. "121" => 3 characters.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Thu, 28 May 1998 10:04:59 GMT
From: WarezSpider@Warez.web/\oo/\ (/\oo/\ the original)
Subject: Re: Perl for WindowsNT?
Message-Id: <35783967.15469981@news.sgi.net>
Hey there, if someone else hasn't already told you, you can evenrun
perl on Win95 but to build workable server scripts you'll need a
descent server like IIS on NT4
On Wed, 27 May 1998 16:46:26 +0200, "T.J. Arnesen"
<T.J.Arnesen@collector.org> wrote:
>Sorry for being a bit unclear in my last message.
>
>The reason why I asked the question was anxious to learn more about perl. I
>have read books and studied perl script, and even made some changing in
>scripts. Though I have always thought that I would need to be online.
>Probably because Perl earlier was written for Unix. The phone bill has
>become very high as I have to pay for every second I am using. It would be
>much cheaper to install Windows server software on my computer. It doesn't
>need to be Unix. All I want to do is learn more and make programs in Perl.
>
>Thanks a lot for giving me answer an advises.
>
>T.J.
>
>
>T.J. Arnesen wrote in message <6kh3lf$2sd$1@o.online.no>...
>>Hi.
>>I have heard that there is a Perl Version for WindowsNT. Does that mean if
>>you have NT installed on your computer, you do not need to be online in
>>order to test your Perl scripts.
>>
>>Thanks
>>T.J.
>>
>>
>
------------------------------
Date: Thu, 28 May 1998 11:31:25 GMT
From: paul.groves@oucs.ox.ac.uk (Paul Groves)
Subject: Re: Perl for WindowsNT?
Message-Id: <356d4a59.610915261@news.ox.ac.uk>
On Wed, 27 May 1998 08:10:26 -0700, "Larry Rosler" <lr@hpl.hp.com>
wrotf:
>Some functions that are not "crazy IPC, etc. stuff", such as flock and
>alarm, are nonexistent and difficult to emulate.
flock does not seem to work on Windows 95 ("unsupported platform"
error message), but seems okay on NT 4.
One of the biggest headaches with porting to NT\Win95 (e.g. CGI
scripts downloaded form the Web) are system calls to UNIX programs
(e.g. sendmail) which may not exist on your win32 platform.
Paul
------------------------------
Date: Thu, 28 May 1998 09:19:57 GMT
From: David Cross-cmt <Dave.Cross@gb.swissbank.com>
Subject: Re: Perl question about Leap year
Message-Id: <eq0wwb6ah1d.fsf@gb.swissbank.com>
Billy Strader <straderb@mindspring.net> writes:
> OK I am trying to write a perl script that does this :
>
> It grabs today day subtracts 1 from the day and if day equals 0 then
> make month -1 and if month happens to be a month with only 30 days make
> days 30 days otherwise days = 31 unless month equals Febuary then 28
> unless year is devisiably by 4 then days equal 29.
>
> Now how do I write that in perl.. I got it so it subtracts the day and
> everything but I am stuck on the leap year part. How do I get perl to
> see if it is a real number or not (a year divisable by 4). If anyone
> can help it will be greatly appricaited.
Reading between the lines, it sounds like you might just want to get
yesterday's date.
The script below might be a good start.
perl -e 'print scalar localtime(time - (60*60*24))'
hth,
Dave...
--
If I wasn't so busy writing status reports,
my status report might just become a progress report.
Dave.Cross@swissbank.com
------------------------------
Date: Wed, 27 May 1998 11:21:31 -0700
From: "Shawn" <sharmstr@nomail.com>
Subject: Re: Perl Win95 Question
Message-Id: <6khnv1$s5m$1@tabloid.med.iacnet.com>
Here, do this:
at a command prompt type the following:
set PATHEXT=%PATHEXT%;.pl
This will allow you to type in the name of the script without using the .pl
extention to run it.
-shawn
------------------------------
Date: Thu, 28 May 1998 12:56:02 +0200
From: Matt Sergeant <msergeant@ndirect.co.uk_NOSPAM_PLEASE>
Subject: Re: Perl32 on NT
Message-Id: <356D42C2.913841C7@ndirect.co.uk_NOSPAM_PLEASE>
John Counts wrote:
>
> I don't think it matters what directory you put Perl in, but you need to
> keep the tree intact. i.e you should have \lib and \bin directories
> underneath the top Perl directory.
>
Correction: Don't EVER have perl under your HTML tree - have it totally
separate. It is very dangerous to do this.
It's easiest for Activestate perl to just follow the suggested c:\perl
as the install directory.
--
<Matt/>
------------------------------
Date: Thu, 28 May 1998 09:57:16 GMT
From: WarezSpider@Warez.web/\oo/\ (/\oo/\ the original)
Subject: Re: SECURITY - simple perlscript for taking orders
Message-Id: <357736a1.14759374@news.sgi.net>
I agree, all other folders on NT default to read only except for the
owner and Administrator, but the CGI-BIN does give inherited rights
also, one of which is NO read unless your the Administrator, or Web
Owner.
But to give a file write access there or anywhere usually needs to be
specificlly set on the file.
Seems if i assign read/write properties to a folder every file i
upload there on NT gets those same settings.
Anyone else have any first hand knowledge on this?
On Wed, 27 May 1998 07:47:20 -0400, comdog@computerdog.com (brian d
foy) wrote:
>>On Tue, 26 May 1998 23:43:13 GMT, Peter A Fein <p-fein@uchicago.edu>
>>wrote:
>
>>>An important (non-perl) tip is to make sure that your script does not
>>>have read privleges enabled for all (ie, web) users. You'll need
>>>execute privileges of course, but if someone can d/l your script,
>>>it'll be a lot easier for them to find holes.In article
>
><356e8d0d.27905563@news.sgi.net>, WarezSpider@Warez.web/\oo/\ (/\oo/\ the original) posted:
>
>>If you place it in a active CGI-BIN this is usually no problem as it
>>will inheriet the execute only writes of the folder and the "virtual"
>>folder won't allow downloads unless of course your the Administrator!
>
>
>i've never heard of uploaded files automagically inheriting certain
>characteristics based on their location inthe file system. perhaps
>your umask or the local copy of wuftpd is configure that way, but it
>certainly is not a universal thing.
>
>check your permissions. :)
------------------------------
Date: Thu, 28 May 1998 12:47:46 +0200
From: "H.Merijn Brand" <PROCURA_BV@CompuServe.com>
To: Mid Summers Eve Festival <msef@pyramus.com>
Subject: Re: Substitute gurus... got a better word wrap?
Message-Id: <356D40D2.3F4AD5F1@CompuServe.com>
Besides Text::Wrap, you can choose Text::Format, which
can also justify and indent the text the way you want.
Mid Summers Eve Festival wrote:
>
> I've been using the following for word wrapping :
>
> s/(.{1,80})\s+/$1\n/g
>
> But this appears to remove leading tabs/spaces at the begining of each line...
> does someone have a better method?
>
> Peace,
> Blake
------------------------------
Date: Thu, 28 May 1998 10:09:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: system() in NT-Perl
Message-Id: <356d3125.798170@news.btinternet.com>
On Thu, 28 May 1998 09:26:48 +0200, Jan Setnan wrote :
>> Jan Setnan wrote:
>> >
>> > Hi ..
>> > I'm running this simple program (dir.pl) :
>> > $utfil = "d:\\temp\\utfil.txt";
>> > system(qq(dir > $utfil));
>> > on a PC with Windows NT 4.0.
>> > When I run it from the command prompt, it works OK,
>> > the file utfil.txt is created and it contains the directory listing.
>> > But when I try to schedule it with "at 12:00 perl dir.pl"
>> > nothing happens, no file is created.
>> > What's up ??
>> >
>> > Jan
>>
>> c:\> at 12:00 "perl dir.pl"
>>
>> Note the quotes!
>> You should use full path to the script, I don't know what the current
>> directory will be when the scheduled program (perl.exe) starts.
>>
>> Jenda
>
> Well - that's what I do :
>
>C:\>at 9:19 "perl c:\dir.pl"
>Added a new job with job ID = 11
>C:\>at
>Status ID Day Time Command Line
>----------------------------------------------------------
> 11 Today 09:19 AM "perl c:\dir.pl"
>
>but come 09:19, no file is created at d:\temp
>Does this work for anybody else ??
>
It has to be borne in mind that a program run by the schedule service
has a different exexecution environment from one run at the prompt -
cron on unix is similar but NT also insists on using the accursed
system account for running these jobs.
You can alter the account that the schedule service runs as (I leave
how as an exercise). You also might need to adjust some user rights
for the chosen account in some circumstances. But hey this straying
too far out of Perl-Land - hopefully this will give you a start.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 28 May 1998 12:16:27 GMT
From: johns@cc.gatech.edu (John)
Subject: Re: Text File Manipulatoin
Message-Id: <6kjkir$fu3$1@news-int.gatech.edu>
Jonathan Feinberg (jdf@pobox.com) wrote:
: What you *really* want to do is to buy and read the book _Learning
: Perl_, which will walk you through these elemntary things that you
: want to do, and quite a bit more. You should also begin reading the
: documentation that comes with perl. The perlre document concerns
: regular expressions in Perl.
Thanks for you help. It's good to know people like you are here to
answer my questions...
--
John Q. Sindell Jr.
jqs@pikapp.net
jqsindel@gapac.com
http://www.cc.gatech.edu/~johns
------------------------------
Date: 28 May 1998 12:05:26 GMT
From: bkline@cortex.nlm.nih.gov (Bob Kline)
Subject: Visibility of "my" vars
Message-Id: <6kjju6$rps$1@lhc.nlm.nih.gov>
The man page for perlsub has the following passage:
"Unlike dynamic variables created by the ``local'' statement, lexical
variables declared with ``my'' are totally hidden from the outside world,
including any called subroutines ...."
This would appear to be saying that any called subroutines would not
be able to see a lexically scoped variable declared/defined at file
scope, but this does not appear to be matched by the behavior of Perl
5.004, at least the builds I have been working with:
% cat t.pl
my $foo = 8;
&bar;
sub bar
{
$foo += 3;
print "$foo\n";
}
% perl t.pl
11
%
Is this a bug in the documentation? Can the behavior I'm observing
be relied upon in future versions? Or is the bug in the implementation
(in which case I should avoid code which assumes variables with
file scope are visible to called subroutines from the same file)?
It would be nice if the bug were in the documentation, since the
current behavior matches the file-static variables of C/C++, which
provides a very convenient level of granularity.
Thanks!
Bob Kline
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2745
**************************************