[9126] in Perl-Users-Digest
Perl-Users Digest, Issue: 2744 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 28 06:07:22 1998
Date: Thu, 28 May 98 03:00:26 -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: 2744
Today's topics:
CGI's slow/Sol2.6/Perl5 wkessler@my-dejanews.com
Re: Clearly define "free software" (le Fanttme)
Re: Clearly define "free software" (Jimen Ching)
Re: Creating and Using Sockets (Martien Verbruggen)
Re: Email address checker - comments welcome <zenin@bawdycaste.org>
Re: file size with perl and win NT (Vasile CALMATUI)
Help: Delete a file with Perl Script in WinNT <thidinh@erols.com>
Re: Help: Delete a file with Perl Script in WinNT (Marc Haber)
HOWTO : Perl5/NT user authentication <gay@aspentech.com>
Re: list context: || vs or <dformosa@st.nepean.uws.edu.au>
Re: list context: || vs or <metcher@spider.herston.uq.edu.au>
OO - explicit package name required <quednauf@nortel.co.uk>
ord(),bitshifting problem (Choo Heng Kek)
Perl question abotu Leap year <straderb@mindspring.net>
Re: Perl question abotu Leap year <quednauf@nortel.co.uk>
Re: Perl32 on NT (Bbirthisel)
Re: press "enter" key to leave (at)trust-me.com (Jason Oakley)
Re: read and write (Ilya Zakharevich)
Re: read and write (Martien Verbruggen)
Re: read and write <zenin@bawdycaste.org>
Re: Substitute gurus... got a better word wrap? (Earl Hood)
Re: system() in NT-Perl <jan.setnan@fm.sintef.no>
Re: system() in NT-Perl <jan.setnan@fm.sintef.no>
Re: Why do I see the source?? (/\oo/\ the original)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 28 May 1998 08:35:28 GMT
From: wkessler@my-dejanews.com
Subject: CGI's slow/Sol2.6/Perl5
Message-Id: <6kj7kh$c0e$1@nnrp1.dejanews.com>
Hi Perl/Solaris 2.6 Gurus,
Just upgraded a major webserver box to an Enterprise 450 running Solaris2.6
(from a U2 with Solaris 2.5.1). The only major difference is the OS.
Recompiled Perl 5.003, and also built 5.004_04. Any CGI's run under those
perls hog much more CPU time than they did on the old Ultra2. In fact, the
machine crawls to a halt under a moderate browser load. The Webservers are
Netscape Enterprise 3.0 or 3.5.1 (tried both), fully patched. The OS is also
fully patched with Sun's latest patches from Sunsolve Online.
I can't believe that an E450 with twice as much ram and CPU speed can be
totally beaten by an ultra2! Something must be wrong with Perl or the
libraries it links against on Solaris 2.6.
Has anyone else experienced this? Does anyone have any suggestions? I've
tried everything I can think of!
TIA! -- W Kessler
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Thu, 28 May 1998 03:07:09 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Clearly define "free software"
Message-Id: <F613C8D937F47A61.2683127A41EBB9A4.A56F4E30F76EEA89@library-proxy.airnews.net>
On 27 May 1998 22:44:16 GMT, ehood@geneva.acs.uci.edu (Earl Hood)
wrote:
>In article <slrn6mokdp.6tn.mdw@catbert.ebi.ac.uk>,
>Mark Wooding <mdw@ebi.ac.uk> wrote:
>>le Fanttme <fantome/@/usa/./net> wrote:
>
>>> And the two "best" editors that the open source community has to offer
>>> are both too difficult for the average person to use, as well as the
>>> fact that they don't produce formatted output without using a
>>> non-WYSIWYG presentation.
>>
>>What on earth are you on about? Why should a text editor have anything
>>at all to do with producing formatted output? It's a text editor. It
>>edits text files. It's not a document formatter, or a word processor,
>>or anything else like that.
>
>Exactly. Fantome is comparing apples to oranges. Maybe he likes
>to code edit in M$Word, but I'll take vi/vim since it is much more
>"usable" for code (and text editing).
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? That's the foolish
response I've gotten from you and Mr. Wooding. Oh, sorry, you've told
me to use LaTeX, too. Right.
>>> ... if they can even use Linux because it doesn't have consumer-grade
>>> software available.
>>
>>So, what is this `consumer-grade' software you keep going on about?
>>What are the criteria?
>
>What Fantome forgets is that *we* are consumers also. I completely
>aggree with your assessment that much commericial software inhibits
>(insults) intelligent (or semi-intelligent) users.
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. If
you use emacs and pica to print, then you're once again not a typical
consumer. To ask that people stoop to your pitiful expectations for
presentations and the like is to ask a fool's errand. Given that there
are a hell of a lot more computer users for whom the computer
experience is a nightmare, and would be a worse nightmare under your
scenario, you might start learning what the fuck you're talking about
before you spout off like a fool.
>Nothing states that proprietary software developers are intrinsicly
>better developers than free software developers. And from my
>experience, it is actually the opposite. Free/open software developers
>are people who love to do what they do and take more pride in there
>work. The proprietary world is saturated with people who just want to
>make a paycheck and are inadequately educated.
If you've read that from what I say, then you have to take a remedial
course in reading. The FSF specifically needs to get its head out of
its ass and start encouraging the development of programs that your
grandmother might use.
-f
--
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: 27 May 1998 17:55:59 +1000
From: jching@flex.com (Jimen Ching)
Subject: Re: Clearly define "free software"
Message-Id: <356ce04f.0@coconut-wireless>
Stefaan A Eeckels (Stefaan.Eeckels@ecc.lu) wrote:
>Again. If the program is solely your own work, and the license
>for libXYZ and libdb do not state that you have to impose a
>particular license on code using them, you have no problem.
You haven't been following the thread have you? ;-) Just to set the
record straight, you and I agree. It is RMS who you need to convince.
See RMS' article for clerification.
--jc
--
Jimen Ching (WH6BRR) jching@flex.com wh6brr@uhm.ampr.org
------------------------------
Date: 28 May 1998 04:24:17 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Creating and Using Sockets
Message-Id: <6kioth$r32$1@comdyn.comdyn.com.au>
In article <356CCBE0.90A46FB4@hub.ofthe.net>,
Drew Wiggins <collier@hub.ofthe.net> writes:
> I am attempting to write a PERL script that acts somewhat like a
> spider. Rather than jumping from link to link, however, it just needs
> to return the contents of a single public file on a remote web server.
> My experience with sockets is limited to Windows, and I would like some
> references for some in depth materials on Unix, or any advice anyone
> might have.
Rather than trying to implement all the socket functionality yourself,
you might want to give the libwww package a try. It has many modules
and tools that facilitate the client side of Web stuff.
http://www.perl.com/CPAN/modules/by-module/LWP/
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: 28 May 98 03:29:37 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Email address checker - comments welcome
Message-Id: <896326864.260091@thrush.omix.com>
sub check_email { return shift }
Works, and is about as reliable as anything else anyone has come up with so
far. :-)
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: Thu, 28 May 1998 07:02:26 GMT
From: vasile@club-internet.fr (Vasile CALMATUI)
Subject: Re: file size with perl and win NT
Message-Id: <356ca9b5.17697798@news.club-internet.fr>
mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>> I have also a problem with big files under Win95.
>>
>> The problem is that I can read only the first 4-5 Mb from the file
>> (total length is 25 Mb).
>
>You don't mention HOW you are reading them. Are you trying to read all
>of it into memory? Are you processing the files line by line? Is it a
>binary file?
Line by line. See the next message I posted with the code.
>The only thing I can think of is that you might be treating a binary
>file as a text file, which will make life hard on Win32 platforms.
It is a file made by the a mail reader program (Eudora Light).
It's composed of text mails separated by 2-3 binary caracters.
But why binary caracters can make life hard to Perl on Win32 ?
Thanks anyway,
- -
Vasile Calmatui
vasile@club-internet.fr
http://www.chez.com/vasile/
------------------------------
Date: Thu, 28 May 1998 03:02:46 -0400
From: "PH" <thidinh@erols.com>
Subject: Help: Delete a file with Perl Script in WinNT
Message-Id: <6kj2co$bu6$1@winter.news.erols.com>
What will be a function to delete a file in Perl scritp with WinNT server ?
I try to use unlink() but it didn't work. Maybe I use wrong syntax, so can
someone help me to write a correct one ?
For example: I run a script in script/ direction. I want to remove a
Test.txt in wwwroot/testpage/ direction. Therefore, I set:
$file_remove="../wwwroot/testpage/test.txt"
Then I use unlink() like this:
unlink $file_remove;
(or) unlink ($file_remove);
It didn't work !!! What should I do ?
Thx for any help
Dinh
------------------------------
Date: Thu, 28 May 1998 08:51:32 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Help: Delete a file with Perl Script in WinNT
Message-Id: <6kj8it$prb$2@nz12.rz.uni-karlsruhe.de>
"PH" <thidinh@erols.com> wrote:
>For example: I run a script in script/ direction. I want to remove a
>Test.txt in wwwroot/testpage/ direction. Therefore, I set:
>
>$file_remove="../wwwroot/testpage/test.txt"
>
>Then I use unlink() like this:
>
> unlink $file_remove;
>(or) unlink ($file_remove);
>
>It didn't work !!! What should I do ?
First, try to do it with the full path. It is possible that your cwd
is broken when the script runs. Verify the cwd your script is running
in (maybe by writing to a test file and looking where that test file
is created).
IIRC, perl should handle "/" as directory separators well, but I'd try
"\\" instead. Note that this will sacrifice UNIX portability.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Thu, 28 May 1998 09:15:25 +0200
From: "Jerome Gay" <gay@aspentech.com>
Subject: HOWTO : Perl5/NT user authentication
Message-Id: <6kj34v$ldc$1@spy.aspentec.com>
Folks,
I'd like to authenticate a user with his/her NT domain username and password
on my NT box... This would require accessing the Win32 API. I couldn't find
anything in the Perl Win32 extensions... Btw I'm using build 316.
Any idea ?
Cheers /jerome
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU d+ s+:+ a31 C++(+++)$ UBS++(+++) P+>++ L- E--- W+(++)
N++ o+(++) K w-- !O !M V-- PS+ PE++ Y+ PGP t 5@ X+ R- tv b+
DI++ D--- G++ e+++ h---- r+++ z++++
------END GEEK CODE BLOCK------
------------------------------
Date: 28 May 1998 02:14:22 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: list context: || vs or
Message-Id: <896321656.493667@cabal>
In <slrn6mobfd.scr.charlie@cs.ed.datacash.com> charlie@antipope.org (Charlie Stross) writes:
[...]
>Now _I'm_ confused. I used the word 'set' colloquially, to
>mean a collection of unindexed thingies, as opposed to a hash (a bunch
>of indexed thingies); as in, "perl understands singular, plural, and
>indexed data". Is my understanding incorrect?
An array is indexed on there postion and can have two or more instences of
the same thing in the hash. However a set can only have one and one only
insedence of a thing in it.
--
I'm a perl programer; if you need perl programing, hire me.
Please excuse my spelling as I suffer from agraphia; see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: Thu, 28 May 1998 16:54:47 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: list context: || vs or
Message-Id: <356D0A36.A3603DE6@spider.herston.uq.edu.au>
Tom Christiansen wrote:
>
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> Jaime Metcher <metcher@spider.herston.uq.edu.au> writes:
> :system LIST or system @array
>
> But that's not right. If it says LIST, you can use any list
> expression there, including but not limited to an array -- or a hash.
>
> Search for ARRAY in perlfunc's protos. Compare this with the LIST
> occurrences.
>
Sure, when it says ARRAY you can't use just any old list. But when it
says LIST you *can* use an array, n'est ce pas? Forget it, my
suggestion wasn't really any clearer.
Anyway, after much camel-searching and reading the rest of this thread,
I've come to this conclusion: Tom (and Larry and Randall) - you've done
what you can. You've documented the sucker to death. But, as you
mentioned in your Y2K piece, you can't fix the wetware.
--
Jaime Metcher
------------------------------
Date: Thu, 28 May 1998 10:00:38 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: OO - explicit package name required
Message-Id: <356D27B5.B43C4A96@nortel.co.uk>
hi there,
I am very new to OO programming, so pardon my terrible
un-knowledge.
I start with my own package:
..see below..
sub new {
my $proto= shift;
my $class = ref($proto) || $proto;
my $self = {};
$self->{TITLE} = undef;
$self->{TEXT} = undef;
bless($self, $class);
return $self;
}
Now I also want methods from Time::Localtime. So I do at the top:
package Infocentre;
use Time::Localtime;
use strict;
@ISA = ("Time::Localtime");
Looks silly to me, and indeed it doesn't work:
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.
Well, I have tried a few things and due to my inexperience with
all this I can't see in the
documentation why this happens, although the error message is
pretty clear...Any help possible?
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 28 May 1998 02:55:31 GMT
From: kek@olympus.irdu.nus.sg (Choo Heng Kek)
Subject: ord(),bitshifting problem
Message-Id: <6kijn3$8ri$1@nuscc.nus.edu.sg>
Hi Perlys
I'm stumped. I'm using perl 5.004.
I'm trying to bitwise-shift a character to the right by 4 positions,
but not getting the desired solution.
--- start of illustrative script ----
#!/bin/perl -w
$char = "z"; # binary value of "0111 1010".
print "binary \$char before bitshift is ", unpack("B*", $char), "\n";
$new_char = ($char >> 4); # binary of $new_char
# expected to be # "0000 0111"
print "binary \$char after bitshift is ",
unpack("B*", $new_char), "\n";
$new_char = (ord($char) >> 4); # binary of $new_char
print "binary \$char after bitshift is ",
unpack("B*", $new_char), "\n";
--- end of illustrative script --
Output:
----
binary $char before bitshift is 01111010
Argument "z" isn't numeric in right_shift at ./d line 7.
binary $char after bitshift is 00110000
binary $char after bitshift is 00110111
----
The ord() thing is a bit strange too:
--- start of illustrative script 2 ----
#!/bin/perl
$char = "y";
$new_char = ord($char);
print "length of $new_char is ", length($new_char), "\n";
# gives a value of 3 instead of the expected 1.
--- end of illustrative script 2 ----
Shouldn't the ord() of a single character give a length of 1??
Any suggestions, insights and comments?
Thanks for reading.
-Heng Kek
------------------------------
Date: Thu, 28 May 1998 01:32:51 -0400
From: Billy Strader <straderb@mindspring.net>
Subject: Perl question abotu Leap year
Message-Id: <356CF703.7B6EB9A0@mindspring.net>
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.
Sincerley,
Billy S.
------------------------------
Date: Thu, 28 May 1998 10:19:09 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Re: Perl question abotu Leap year
Message-Id: <356D2C0C.B7B50AF2@nortel.co.uk>
Billy Strader wrote: ...
it is a real number or not (a year divisable by 4). ...
This is your old Modulo function, I am not sure how it is written in
Perl...Ah, it's
$year%4, which gives you the remainder of $year/4, which is 0 in the case
of $year being 4*n where n is any natural, or in fact whole number.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 28 May 1998 05:13:15 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Perl32 on NT
Message-Id: <1998052805131500.BAA26272@ladder01.news.aol.com>
Hi John:
>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.
True. I have multiple ports installed in separate top directories.
You probably want to avoid a top directory with a space in the name
(e.g "Program Files\perl"). Some of the module install scripts won't work -
some of the Microsoft-supplied command line utilities only work with
terribly ackward "quoting" - any paths in your scripts will be messy, etc.
In spite of Microsoft "preferred practice", there are lots of side-effects:
all of them BAD.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: Thu, 28 May 1998 05:00:17 GMT
From: waulok(at)trust-me.com (Jason Oakley)
Subject: Re: press "enter" key to leave
Message-Id: <356cef29.22207393@news.comcen.com.au>
On Tue, 26 May 1998 20:45:45 -0700, Jan Krynicky
<JKRY3025@comenius.ms.mff.cuni.cz> wrote:
>Johnson Chen ( C. H. Chen)A wrote:
>>
>> How can I make users to leave this following program if user press only
>> enter key ?
>>
>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>> #!/local/paths/perl -w #indicat the path
>>
><stuff deleted>
>>
>> NAMEENTER: while (1) {
>> print "\tEnter the name to see the gif file ...";
>> chomp ($name_input=<>);
>
> last if ($name_input eq '');
>
><rest of script deleted>
>
>>
>> johnson
>
>
ooops! I didnt read it correctly.. yeh what she said :)
or
last if (!$name_input);
should do.
Remember to use eq ne
etc when comparing strings.
------------------------------
Date: 28 May 1998 05:45:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: read and write
Message-Id: <6kitlr$kj9$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <6kice6$d2q$2@csnews.cs.colorado.edu>:
> : open(FILE,"+>".filename);
> : $a = <FILE>;
>
> I've seen obvious ways of setting $a to undef, but this
> isn't one of them.
>
> perlfaq5. Question 2.
Hmm, can anyone give me a heuristic for this? I checked this in
`perl -de0', and this is exaclty as Tom describes, but I cannot sort
it out in my head.
After the first operator one has an empty FILE. Why it is that the
first <FILE> returns `undef'? I would prefer the first <FILE> to
return an empty string, and the second one `undef'. Is it a
limitation of C, which cannot disambiguate empty read() from EOF?
Ilya
------------------------------
Date: 28 May 1998 07:03:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: read and write
Message-Id: <6kj28f$s08$1@comdyn.comdyn.com.au>
In article <6kitlr$kj9$1@mathserv.mps.ohio-state.edu>,
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
> [A complimentary Cc of this posting was sent to Tom Christiansen
> <tchrist@mox.perl.com>],
> who wrote in article <6kice6$d2q$2@csnews.cs.colorado.edu>:
>> : open(FILE,"+>".filename);
>> : $a = <FILE>;
>>
>> I've seen obvious ways of setting $a to undef, but this
>> isn't one of them.
>>
>> perlfaq5. Question 2.
>
> Hmm, can anyone give me a heuristic for this? I checked this in
> `perl -de0', and this is exaclty as Tom describes, but I cannot sort
> it out in my head.
>
> After the first operator one has an empty FILE. Why it is that the
> first <FILE> returns `undef'? I would prefer the first <FILE> to
> return an empty string, and the second one `undef'. Is it a
> limitation of C, which cannot disambiguate empty read() from EOF?
I think I have to disagree. An empty file has 0 byte size.
$a = <FILE>
would return the next line of the file, or undef at the end of file.
Since the file contains 0 bytes, the end of file condition is
encountered on first read. In other words: there is no line to read.
In Perl, I think that this is a logical thing to do. Doing it
otherwise makes it hard to distinguish between a file that contains
nothing, or a file that contains only one line separator.
Martien
--
Martien Verbruggen | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd. | I can ask him what he meant - Steven
NSW, Australia | Wright
------------------------------
Date: 28 May 1998 07:33:35 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: read and write
Message-Id: <896341250.591544@thrush.omix.com>
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
: After the first operator one has an empty FILE. Why it is that the
: first <FILE> returns `undef'?
Because it's at EOF, and the diamond operator is documented to
return undef at EOF (perlop):
Evaluating a filehandle in angle brackets yields the next
line from that file (newline, if any, included), or undef
at end of file.
: I would prefer the first <FILE> to
: return an empty string, and the second one `undef'. Is it a
: limitation of C, which cannot disambiguate empty read() from EOF?
But you're at EOF, so why the empty string? You'd run an invalid
loop if you did something like while (<FILE>) that isn't meant to
test true at EOF, but would if you gave it a null string becase it
only tests defined.
There is no such thing as an "empty read()", except of course at
EOF. Read() is guaranteed not to pull that kind of cheap trick
on you, at least not when talking about normal files. :-)
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: 27 May 1998 23:22:08 GMT
From: ehood@geneva.acs.uci.edu (Earl Hood)
Subject: Re: Substitute gurus... got a better word wrap?
Message-Id: <6ki770$8em@news.service.uci.edu>
[mail & posted]
In article <6ki5m0$8cd$1@core.savvis.net>,
Mid Summers Eve Festival <msef@pyramus.com> 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?
Have a look at the 'm' modifier for s///. Also, checkout the regexp
assertions '^' and '$';
--ewh
--
Earl Hood | University of California: Irvine
ehood@medusa.acs.uci.edu | Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME
------------------------------
Date: Thu, 28 May 1998 09:26:48 +0200
From: Jan Setnan <jan.setnan@fm.sintef.no>
To: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: system() in NT-Perl
Message-Id: <356D11B8.EAEE6811@fm.sintef.no>
> 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 ??
Jan
------------------------------
Date: Thu, 28 May 1998 09:32:25 +0200
From: Jan Setnan <jan.setnan@fm.sintef.no>
Subject: Re: system() in NT-Perl
Message-Id: <356D1308.7481969C@fm.sintef.no>
> 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 ??
Jan
------------------------------
Date: Thu, 28 May 1998 09:42:51 GMT
From: WarezSpider@Warez.web/\oo/\ (/\oo/\ the original)
Subject: Re: Why do I see the source??
Message-Id: <3576313c.13378298@news.sgi.net>
Dear sir,
I had a similar problem once, i had associated .pl with notepad for
easy reading and writing, once i placed my scripts in the cgi-bin on
NT, which normally *is* configured with IIS setup with the correct
permissions, and tried calling them froma web page via a hyperlink
they didn't execute because *I* being a administrator have READ and
Write permissions in the cgi-bin and since i was logged into my LAN
with the correct administrator password and name, and had notepad
associated with .pl my cgi-bin served 'em up as txt.! Try
un-associating them with notepad and not logging is as a administrator
when you want to test them. I've found that my machine sends the user
name and password to the server when one is needed and if it works you
won't be prompt for it. So you get the file as you requested and read
it as you "requested/associated" it with.
if none of this applies then try associating .pl extentions with
perl.exe on the server so they get executed in any folder..
Then i'd recheck the documentation on my web server like some others
suggested.
Hope this is of some help.
Sincerely,
/\oo/\
On 27 May 1998 16:48:28 -0500, Aaron Baugher <abaugher@rnet.com>
wrote:
>Patrick Ohnewein <pohnewein@prodata.it> writes:
>
>> But when I direct my WEB-Browser (Netscape Communicator 4.02)
>> to that location
>> .../cgi-bin/howdy
>> I don't see the HTML-Page that the script should transmit, but I see
>> the scrip source.
>
>It's your server configuration. It doesn't know files in /cgi-bin/
>are scripts.
>
>> Could be I am a fool, but I cannot get it work.
>
>Don't be so hard on yourself, it ruins the fun for everyone else. :-)
------------------------------
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 2744
**************************************