[13868] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1278 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 4 12:10:29 1999

Date: Thu, 4 Nov 1999 09:10:20 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941735420-v9-i1278@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 4 Nov 1999     Volume: 9 Number: 1278

Today's topics:
    Re: Need nifty code for displaying Web Graphics (Randal L. Schwartz)
        Net::FTP scheduler Problem user Linux vikatan@my-deja.com
    Re: Net::FTP scheduler Problem user Linux <rootbeer@redcat.com>
        nmap like script? <peter@berghold.net>
    Re: Perl / NIS+ <rootbeer@redcat.com>
    Re: Perl and commonsense part 2 (Kragen Sitaker)
    Re: Perl and commonsense part 2 (Kragen Sitaker)
    Re: Perl and commonsense part 2 <slanning@bu.edu>
    Re: perl and commonsense <dan@tuatha.sidhe.org>
    Re: perl and commonsense (Kevin Reid)
    Re: perl and commonsense <lr@hpl.hp.com>
    Re: perl and commonsense (Randal L. Schwartz)
    Re: perl and commonsense shapirojNOSPAM@logica.com
    Re: perl and commonsense <dan@tuatha.sidhe.org>
    Re: Perl and Excel Charting <jtolley@bellatlantic.net>
        Perl modules to build Explorer-like HTML GUI?? <shmooth@yahoo.com>
        Problem Retrieving a File Date (Bill Feidt)
    Re: Problem with perl and MSIE5 <peter@berghold.net>
    Re: Recursive Directory Search (Lars Gregersen)
    Re: replace " " with &nbsp; (Randal L. Schwartz)
    Re: replace " " with &nbsp; <lr@hpl.hp.com>
    Re: replace " " with &nbsp; (Randal L. Schwartz)
        Round off a number <fyd@u-picardie.fr>
    Re: Round off a number <rhomberg@ife.ee.ethz.ch>
    Re: Round off a number <fyd@u-picardie.fr>
    Re: Running perl on NT shapirojNOSPAM@logica.com
        Secure Sockets ??? <fx77@dial.pipex.com>
    Re: Secure Sockets ??? <rootbeer@redcat.com>
        starting a process without waiting <dstiff@symantec.com>
    Re: starting a process without waiting <ramvinod@eng.umd.edu>
    Re: starting a process without waiting <rootbeer@redcat.com>
        Suggestion:  Putting URLs in POD-files by U<..> or L<.. <tmp0000@unixsnedkeren.dk>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 04 Nov 1999 07:27:23 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Need nifty code for displaying Web Graphics
Message-Id: <m1r9i6uvj8.fsf@halfdome.holdit.com>

>>>>> "Neko" == Neko  <tgy@chocobo.org> writes:

Neko> Here's some HTML that may not be HTML:

Neko> <html><title>Perl Mongers</title>
Neko> <img src="data:image/gif;base64,
Neko> [...]

And how many browsers understand a "data:" URI?  I'm using two
that don't.

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Thu, 04 Nov 1999 14:25:10 GMT
From: vikatan@my-deja.com
Subject: Net::FTP scheduler Problem user Linux
Message-Id: <7vs504$pa3$1@nnrp1.deja.com>

perl Version 5.005_03 bulit for i386_linux
Libnet Version 1.0607

Purpose : To FTP 2 files every 1 hour from an NT
server that allows anonymous access.

Problem : When I run the script from the command
line, it runs just fine. However, if I schedule
it under cron, the FTP does not work.

Script :

use Net::FTP ;

$ftp = Net::FTP->new("121.0.1.184") ||
die "cannot FTP: $@\n";
$ftp->login("anonymous", "me\@ther.com") ||
die "cannot login as anonymous\n";
$ftp->ascii || die "cannot set the mode to
ascii\n";
$ftp->get("giflist.txt") || die "cannot get the
file\n";
$ftp->get("pnglist.txt") || die "cannot get the
file\n";
$ftp->quit || die "cannot quit\n";


Appreciate any help on this.





Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Thu, 4 Nov 1999 08:40:06 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Net::FTP scheduler Problem user Linux
Message-Id: <Pine.GSO.4.10.9911040836160.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999 vikatan@my-deja.com wrote:

> Problem : When I run the script from the command
> line, it runs just fine. However, if I schedule
> it under cron, the FTP does not work.

Running under cron, your program will typically have a different
environment than it does in the shell. The current working directory, the
environment variables, and the lack of a human being attached to the
standard I/O streams are often the most noticeable changes.

Fortunately, when a Perl program fails, it should send its last words to
the standard error stream just before everything goes black. That standard
error stream is the "Black Box" of programming; it's a vital clue for
finding the cause of a crash. What were your program's last words, and
does perldiag offer any advice on their meaning?

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Thu, 04 Nov 1999 14:46:28 GMT
From: "Peter L. Berghold" <peter@berghold.net>
Subject: nmap like script?
Message-Id: <Pine.LNX.3.96.991104094434.17620D-100000@uboat.berghold.net>

Before I go ahead and re-invent the wheel.... is there anybody out there
who has written or knows of a perl script that "safely" emulates nmap?
I'd like to use one to collect data on my network at my firm...

TIA

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



------------------------------

Date: Thu, 4 Nov 1999 08:25:32 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl / NIS+
Message-Id: <Pine.GSO.4.10.9911040822210.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999, Jakob wrote:

> I need to run nispasswd (or equvivalent) from within a Perl script. 

> I've tried using filehandles but that doesnt seem to work ...

You may want the Expect module, from CPAN. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Thu, 04 Nov 1999 14:09:01 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl and commonsense part 2
Message-Id: <1sgU3.26999$23.1448216@typ11.nn.bcandid.com>

In article <brian-0411990203040001@40.new-york-68-69rs.ny.dial-access.att.net>,
brian d foy <brian@smithrenaud.com> wrote:
>In article <vl7U3.26391$23.1387141@typ11.nn.bcandid.com>,
>kragen@dnaco.net (Kragen Sitaker) wrote:
>
>>In article <If3U3.86$KN4.1769@nsw.nnrp.telstra.net>,
>>Martien Verbruggen <mgjv@comdyn.com.au> wrote:
>
>>>Comparing JavaScript to Perl is of course nonsensical, but that's
>>>another issue.
>>
>>I don't think it's nonsensical at all.  Anything that can be done in
>>one language can be done in the other. 
>
>that's not really true, especially since Javascript is a sandboxed
>langauge (meaning that it is intentionally crippled as part of its
>security model).

That's a matter of how you run JavaScript.  It's perfectly possible to
run it unsandboxed -- I believe LiveScript does so, in fact.

>but of course, there are things that you can't do in Perl that you
>can do in C, like access memory addresses, because Perl doesn't
>let you do that.

The 'anything' I was referring to was computational power.  You can
write an 8086 virtual machine in Perl and run compiled C on it if you
want.  Then C won't be able to access memory addresses either.

There are a wide variety of 'anything's you can do in one
implementation of one language, but not another.  In C you can't do
decimal arithmetic; in COBOL you can.

>and in FORTRAN you can't ...

In FORTRAN you can do anything if you make a big enough array :)

>and the list goes on and on.  langauges have design limits - some
>intentional and some not.  not all langauges are the same, and not 
>all of them have the same capabilities.

It's more a matter of (a) how they're implemented; (b) how they're
integrated into the system; (c) how convenient it is to do various
things.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: Thu, 04 Nov 1999 14:22:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl and commonsense part 2
Message-Id: <gEgU3.27026$23.1450378@typ11.nn.bcandid.com>

In article <7vs1s0$mmk$1@nnrp1.deja.com>,  <ajmayo@my-deja.com> wrote:
>In article <7vphkm$tap$1@nnrp1.deja.com>,
>  ajmayo@my-deja.com wrote:
> - the fact is that server-side
>Javascript is pretty new, especially in the Open Source community.

Server-side Javascript is older than client-side Javascript.

>Now, when it comes to these two languages, my practical experience has
>been this. Javascript, for all its sins, is fairly orthogonal. What I
>called 'common-sense extrapolation' works well for Javascript. Some of
>you may say this is because the language is so simple (I am not sure I
>fully agree with this, as it seems to have surprising depth and
>flexibility).

Partly because it's a small language.  And partly because it *is*
orthogonal.  Perl is neither, and for good reasons.

>I have not been so successful with perl. The examples I gave may seem
>ludicrous to the hardened perl expert. But I think they are perfectly
>reasonable extrapolations. I say this because other folks I know have
>stumbled in the same ways. Maybe we are all just 'too low in the
>bellcurve'.

I did not find them ludicrous.

>Much has been made of perl's ability to solve 'quick and dirty'
>problems. It sure does a good job of this, particularly in the text
>processing domain. But trying to create more structured code, with
>complex data structures and solid error handling, has proven to be a
>bit more elusive. I am quite sure it can be done. You folks are living
>proof. But I am growing concerned at the training and support
>commitments perl seems to require.

Well, it's a more flexible language than most.  This translates to
"more than enough rope".  Just like Unix.  But, of course, you can
write broken code in any language.

I don't know about the training and support commitments, myself.  I
would expect them to be larger than for, say, JavaScript, but I would
also expect the benefits to be somewhat larger.

> Remember, the alpha geeks blaze the
>trail. Then lesser mortals come behind them. They must maintain and
>modify the code. They don't necessarily know syntax from semantics. I
>know this sounds awful. I know you're itching to say
>
>This kind of attitude - this kind of unskilled labour - results in
>crappy software. Just look at (insert company here).
>
>I don't deny it.

It's perfectly possible for alpha geeks to write code anybody can
understand, even in Perl.  It's even possible to do it and use most of
the language.

>That debugging will be a bit painful
>because you won't get the context - just a line number and an error
>message.

Oh, by the way, Perl *does* have a #line directive -- #line.  It just
doesn't work inside eval STRING!

> That you can't take a reference to a list (why not, by the
>way?).

Because lists are expressed values, not denoted values.  They can't be
stored; they just exist temporarily during the execution of statements.
You can store their contents in arrays.  So you can do e.g. [ 1, 2, 3 ]
to store the list's contents in an array and return a reference to it.

[I will respond to the rest of your post later]
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: 04 Nov 1999 10:59:06 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: Perl and commonsense part 2
Message-Id: <kusn1suckol.fsf@strange.bu.edu>

kragen@dnaco.net (Kragen Sitaker) writes:
> In FORTRAN you can do anything if you make a big enough array :)

Fortran 90 r0x d00d..

-- 
"It showed a lady, with a fur cap on and a fur stole, sitting upright
and holding out to the spectator a huge fur muff into which the whole
of her forearm had vanished!" --From Franz Kafka's Metamorphosis


------------------------------

Date: Thu, 04 Nov 1999 14:12:43 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: perl and commonsense
Message-Id: <vvgU3.1215$c06.13481@news.rdc1.ct.home.com>

Kragen Sitaker <kragen@dnaco.net> wrote:
> In article <brian-0311991655030001@123.new-york-73-74rs.ny.dial-access.att.net>,
> brian d foy <brian@smithrenaud.com> wrote:
>>In article <5E1U3.25414$23.1318497@typ11.nn.bcandid.com>,
>>kragen@dnaco.net (Kragen Sitaker) wrote:
>>>This puzzles me a bit.  I thought you couldn't ever have a list in a
>>>scalar context, ever, ever, ever. 
>>
>>that's why a conversion happens (but not according to any general
>>rule!).  assign a list to a scalar and you get the last element
>>in the list. try it:
>>
>>   $n = ('a', 'b', 'c');
>>   print $n;

> I always thought that was a sequence of expressions separated by the
> comma operator, with the same meaning as in C: evaluate left operand,
> throw away value, then evaluate right operand.  No lists involved.

Nope. List involved. Most of the values are still thrown away, but the
list is built. A list in scalar context returns the last element of the
list.

Not to be confused with list *assignment* in scalar context, of course,
which returns the number of values in the RHS of the list.

					Dan


------------------------------

Date: Thu, 4 Nov 1999 09:40:08 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: perl and commonsense
Message-Id: <1e0pfh8.sp8ixy1i6qsh4N%kpreid@ibm.net>

Kragen Sitaker <kragen@dnaco.net> wrote:

> >Well here's one thing you got right. "Use of uninitialized value at (eval
> >8) line 20" is totally useless.
> 
> Yuck.  Is that really what mod_perl does?  I guess we need a #line
> directive for Perl.

It already has one. See "Plain Old Comments (Not!)" in perlsyn.

The problem here is that mod_perl isn't using it.

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.


------------------------------

Date: Thu, 4 Nov 1999 07:07:37 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: perl and commonsense
Message-Id: <MPG.128b4113342e581b98a19f@nntp.hpl.hp.com>

In article <vvgU3.1215$c06.13481@news.rdc1.ct.home.com> on Thu, 04 Nov 
1999 14:12:43 GMT, Dan Sugalski <dan@tuatha.sidhe.org> says...

 ...

> Nope. List involved. Most of the values are still thrown away, but the
> list is built. A list in scalar context returns the last element of the
> list.

It has been stated here repeatedly (usually in capital letters :-) that 
there is no such thing as a 'list in scalar context'.  There is a 
sequence of expressions, separated by the comma operator, but no list is 
built.

> Not to be confused with list *assignment* in scalar context, of course,
> which returns the number of values in the RHS of the list.

Surely you mean 'array assignment', not 'list assignment'.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 04 Nov 1999 07:17:48 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: perl and commonsense
Message-Id: <m17ljywajn.fsf@halfdome.holdit.com>

>>>>> "ajmayo" == ajmayo  <ajmayo@my-deja.com> writes:

ajmayo> My life isn't helped by perl's infuriating error reporting, which
ajmayo> assumes that printing the line number is sufficient. This is not the
ajmayo> case!. If the code is running inside of Apache (mod_perl) the line
ajmayo> number is meaningless.

mod_perl doesn't run code.  You need to give it a module.  If it's a
real module, the filename and line number are reported accurately.

If it's a module that creates code on the fly by parsing text files to
produce content (like Apache::Registry, Embperl, Mason, etc.), *most*
of those use the right #line directives to again get the error
messages pointing at the right source files.

Sounds like you bumped into a mod_perl module that is incorrectly
written.  You'll need to be more specific about whose code you used.
Don't paint "mod_perl" with such a broad tainted brush.

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Thu, 4 Nov 1999 11:07:18 -0500
From: shapirojNOSPAM@logica.com
Subject: Re: perl and commonsense
Message-Id: <MPG.128b7942b4a4b3f598968f@news.logica.co.uk>

In article <7vpg8n$s8g$1@nnrp1.deja.com>, ajmayo@my-deja.com says...
> I am slowly making the transition from perl newbie to novice guru. In
> doing so, I've found some issues that I don't have good answers to.

> Take the following example. I want to create a reference to an array
> slice. Common-sense extrapolation would indicate that if
> 
> $c=\@a;
> 
> creates a reference to the array @a and places it in the scalar $c,
> and if
> 
> @d=@a[0..2]; copies the array slice $a[0] through $a[2] to array @d,
> then clearly,
> 
> $c=\@a[0..2];
> 
> will create a reference to the array slice. Except it doesn't work. It
> seems to evaluate the slice in scalar context, returning 3 in this case.
> 
 - To defend Perl, the concept of "reference to an array slice" is pretty 
wild. I think it's only because perl does so much high-powered auto-
instantiation that you can even think about working with such wild-cool 
'structures'. 

 - How should one do what ajmayo want to do? Perl coders seem to suffer 
from 'one-line-osis'. The following seems to work for me

my @a = qw/one two three four five/;
my @b = @a[0 .. 2];
my $z = \@b;

Unless you want to be able to, say, 
    $z->[1] = "zwei", and have $a[1] eq "zwei", this should work for you. 
I'm guessing a little more thought as to why you wanted a slice-
reference, i.e. in what ways you wanted to use this beast, would have 
lead to a fine solution.

 - I was discussing hashes (associative arrays) with a java-ish friend of 
mine, and I was re-impressed with the coolness of perl when I realized 
that I could use a hash-of-hashes-of-hashes by just writing 
$a->{key1}{key2}{key3}.


Jonathan




------------------------------

Date: Thu, 04 Nov 1999 16:19:14 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: perl and commonsense
Message-Id: <6miU3.1331$c06.13617@news.rdc1.ct.home.com>

Larry Rosler <lr@hpl.hp.com> wrote:
> In article <vvgU3.1215$c06.13481@news.rdc1.ct.home.com> on Thu, 04 Nov 
> 1999 14:12:43 GMT, Dan Sugalski <dan@tuatha.sidhe.org> says...

> ...

>> Nope. List involved. Most of the values are still thrown away, but the
>> list is built. A list in scalar context returns the last element of the
>> list.

> It has been stated here repeatedly (usually in capital letters :-) that 
> there is no such thing as a 'list in scalar context'.  There is a 
> sequence of expressions, separated by the comma operator, but no list is 
> built.

I'd say that'd teach me not to post before drinking sufficient coffee,
except that I only remember to not do that after I've had enough. :(
You're very right, no list involved. My bad. (And I even know that)

>> Not to be confused with list *assignment* in scalar context, of course,
>> which returns the number of values in the RHS of the list.

> Surely you mean 'array assignment', not 'list assignment'.

Nope. Witness:

  perl -e "$foo = () = (1,2,4); print $foo"

prints 3, as it should, with no arrays involved.

A quick search of the docs does show the array assignment term, though the
example used to illustrate it has no arrays involved. :( The paragraph
immediately after the example says list assignment.

This is in the PDF of the 5.005_02 docs, so it might be fixed for
5.005_03.

					Dan


------------------------------

Date: Thu, 04 Nov 1999 14:33:12 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: Perl and Excel Charting
Message-Id: <3821989C.8465B248@bellatlantic.net>

Samuel Kilchenmann wrote:

> Your AddNew procedure in Perl:
> sub AddNew {
>   my $newBook = $app->Workbooks->Add();
>   $newBook->{Title} = "1995 Sales";
>   $newBook->{Subject} = "Sales";
>   $newBook->SaveAs({Filename => "95Sales.xls"});
>   return undef;
> }

Thanks a lot! I used the same technique to add comments as well. Somehow I
didn't recognize filename:="whatever" as a named param. Now that I know, it
seems so obvious!

Thanks again,

James



------------------------------

Date: Thu, 04 Nov 1999 16:59:20 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Perl modules to build Explorer-like HTML GUI??
Message-Id: <3821BC22.1C7DA118@yahoo.com>

Hi,

I want to build an M$ Windows Explorer-type interface in HTML.
Basically, I want to be able to upload my Bookmark list, and display it
in a representative fashion.  I browsed through the Perl Modules on
CPAN, but couldn't really find the two things I think I'd need:

1) A 'list of lists'-type module - ideally with some functions like
add(), remove(), expand(), collapse(), etc.

2) An HTML-type module that can display the tree (and possibly help to
maintain state between pages, or at least, have a scheme to maintain
state between cgi invocations -> like which parameters to pass and what
they contain, e.g. @expanded_list =
("/MainBranch/Subbranch/etc.","/OtherBranch/Books")

I thought this work might have done considering the usefulness of the
representation and the proliferation of newsgroups/discussions on the
net that use these gui's.

Thanks for any pointers.





------------------------------

Date: Thu, 04 Nov 1999 16:56:26 GMT
From: wfeidt@cpcug.org (Bill Feidt)
Subject: Problem Retrieving a File Date
Message-Id: <3821bab3.0@news4.his.com>

I've been struggling with the following:

  #!/bin/perl -w
  #
  #Comments

  $tm = time;
  print $tm,  "\n";
  $now = localtime($tm);
  print $now, "\n";

  $curfile = "J19991014f04";
  ($READTIME, $WRITETIME) = (stat($curfile))[8,9];
  $then = localtime($READTIME);
  print $then, "\n";
  $diff = $tm-$READTIME;
  print $diff, "\n";

If I set $curfile to "J19991014f04", the snippet returns the correct date
for that file name.  However, if I set $curfile to "J19991014f04.html"
(as in: $curfile = "J19991014f04.html"), an incorrect and inexplicable
(to me anyway) date is returned.

If someone could point me in the right direction to solve this, I'd be
very appreciative.

Bill Feidt
wfeidt@agnic.org


------------------------------

Date: Thu, 04 Nov 1999 14:35:46 GMT
From: "Peter L. Berghold" <peter@berghold.net>
Subject: Re: Problem with perl and MSIE5
Message-Id: <Pine.LNX.3.96.991104093208.17620B-100000@uboat.berghold.net>




On Mon, 1 Nov 1999 apogee101@my-deja.com wrote:
> However, if I call it in MSIE5 from that same form, instead of
> displaying the generated HTML document, the browser first warns me that
> I'm trying to download a file called "myscript.pl" or "myscript.cgi",
> I've tried both, and then opens the raw HTML text in Notepad.
> 

There are a few possibilities here:

1) This is  a server side issue, in which case this is off topic.

2) Something is wrong with MISE 5's setup, also off topic

3) Check out what headers your perl is returning.  If it is not sending 
a Content-Type: in its header it is possible that MSIE is getting
confused.


Of course, IMHO MSIE is terminally confused....

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958




------------------------------

Date: Thu, 04 Nov 1999 14:29:50 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: Recursive Directory Search
Message-Id: <382197f3.7149804@news.dtu.dk>

On Tue, 2 Nov 1999 05:53:11 -0800 (PST), J Garcia
<garcia868@yahoo.com> wrote:

>I have written a small Perl program to search (regexp
>matching) all files (of user-supplied extension) in
>the current directory for a specific word after
>getting a list of all files using glob().

You may want to look at my programme findgrep that does what you are
trying to do (although I doesn't use glob).

See
http://welcome.to/findgrep

It works on windows, unix and amiga without change.

  Regards

    Lars

 ------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg


------------------------------

Date: 04 Nov 1999 07:25:10 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: replace " " with &nbsp;
Message-Id: <m1vh7iuvmx.fsf@halfdome.holdit.com>

>>>>> "Kragen" == Kragen Sitaker <kragen@dnaco.net> writes:

Kragen> I would be so much happier if you would just use <blockquote>.  I hate
Kragen> nbsp and I hate people who use it.  (Well, maybe not quite.)

I would be so much happier if you would just use <pre> and stop using
<blockquote> for something it wasn't intended, and I hate people who
use it (well, maybe not quite).

:-)

If you want <pre>-like behavior but not the courier font, use Styles.
That's what they're there for.  Stop perverting HTML structure
elements into a word processor!

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Thu, 4 Nov 1999 07:36:29 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: replace " " with &nbsp;
Message-Id: <MPG.128b47d2467f381c98a1a0@nntp.hpl.hp.com>

In article <1999Nov4.124040@ukwit01> on Thu, 04 Nov 1999 12:40:40 GMT, 
Lack Mr G M <gml4410@ggr.co.uk> says...
> In article <7vqsed$6am$1@fir.prod.itd.earthlink.net>, "Blair Heuer" <ab@cd.com> writes:
> |> 
> |> But I have no clue how to tell it to change all " " to "&nbsp;" until there
> |> is not a " " then stop and go to the next.
> |> Basically if i had the line (without quotes) "   Hello World!" I would want
> |> the code to change it to "&nbsp;&nbsp;&nbsp;Hello World!"
> 
>    $line =~ s/^( *)/'&nbsp;' x length($1)/e;

The '*' should be '+', unless your CPU has extra cycles just sitting 
around waiting to be wasted.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 04 Nov 1999 08:55:06 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: replace " " with &nbsp;
Message-Id: <m1wvrytcwl.fsf@halfdome.holdit.com>

>>>>> "Lack" == Lack Mr G M <gml4410@ggr.co.uk> writes:

Lack> |> Basically if i had the line (without quotes) "   Hello World!" I would want
Lack> |> the code to change it to "&nbsp;&nbsp;&nbsp;Hello World!"

Lack>    $line =~ s/^( *)/'&nbsp;' x length($1)/e;

Look ma, no math needed:

        $line =~ s/\G /&nbsp;/g;

\G is your friend.  Learn to use \G.

print "Just another Perl hacker,"
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Thu, 04 Nov 1999 15:59:37 -0800
From: Francois Dupradeau <fyd@u-picardie.fr>
Subject: Round off a number
Message-Id: <38221DE8.167E@u-picardie.fr>

Dear All,

Is there a function in Perl to round off the 2nd or the third (or the
5th, etc...) number after the decimal point of a number ?
ex:
3.123456789 => 3.123

Thanks
Regards
Francois

-- 
Francois Dupradeau
   ------------ 
Faculte de Pharmacie
1, rue des Louvels
80037 Amiens Cedex
France
   ------------ 
Tel 33 (0)3 22 82 74 94
Fax 33 (0)3 22 82 74 69
Email fyd@u-picardie.fr


------------------------------

Date: Thu, 04 Nov 1999 16:35:22 +0100
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Round off a number
Message-Id: <3821A7BA.69ECF783@ife.ee.ethz.ch>

Francois Dupradeau wrote:
> 
> Dear All,
> 
> Is there a function in Perl to round off the 2nd or the third (or the
> 5th, etc...) number after the decimal point of a number ?
> ex:
> 3.123456789 => 3.123

perldoc -q round


------------------------------

Date: Thu, 04 Nov 1999 17:25:34 -0800
From: Francois Dupradeau <fyd@u-picardie.fr>
Subject: Re: Round off a number
Message-Id: <3822320E.446B@u-picardie.fr>

Thanks
Francois

Alex Rhomberg wrote:
> 
> Francois Dupradeau wrote:
> >
> > Dear All,
> >
> > Is there a function in Perl to round off the 2nd or the third (or the
> > 5th, etc...) number after the decimal point of a number ?
> > ex:
> > 3.123456789 => 3.123
> 
> perldoc -q round

-- 
Francois Dupradeau
   ------------ 
Faculte de Pharmacie
1, rue des Louvels
80037 Amiens Cedex
France
   ------------ 
Tel 33 (0)3 22 82 74 94
Fax 33 (0)3 22 82 74 69
Email fyd@u-picardie.fr


------------------------------

Date: Thu, 4 Nov 1999 09:41:35 -0500
From: shapirojNOSPAM@logica.com
Subject: Re: Running perl on NT
Message-Id: <MPG.128b652567e0bbb98968e@news.logica.co.uk>

In article <DwXT3.24217$23.1266749@typ11.nn.bcandid.com>, tec@amherst.com 
says...
> I am running a very simple perl script on an NT machine. I have installed
> perl and changed my permissions of the perl file. When I execute my form,
> the perl script is called. The perl script executes ok in a DOS shell, but
> when internet explorer executes it it simply writes the perl script to the
> window.
> 
> Thanks for your help.
> 
> 
> 
IE is never going to execute your Perl script (okay, maybe some time  in 
the future IE will support <script language='Perl'> tags). If you tell IE 
to look at file:///my/dir/scripts/myscript.pl, IE will just think it's a 
plain text file and show it to you. If you want some thing to look at a 
URL, realize that it is a Perl (or cgi, or any variety of 'executable'), 
go and execute the file, and return the STDOUT of that process, what you 
need is an HTTP *Server*. IE is an HTTP *client*. There's tons of (free) 
servers out there. I used something called 'microweb' when I wanted to 
start HTTP scripting, it was easy to setup and use.

Jonathan


------------------------------

Date: Thu, 04 Nov 1999 15:16:21 +0000
From: Technical Services - UK Link <fx77@dial.pipex.com>
Subject: Secure Sockets ???
Message-Id: <3821A345.2E6E778A@dial.pipex.com>

I have got two perl script on different machines communicating via a
socket connection. Due to nature of the data transfered I would like to
encrypt the data.

I have been looking for a while, but I am not getting anywhere. Does
anyone know if it is possible to use SSL to create a secure socket
connection from perl. Or is anyone aware of any other secure socket
implementation for perl.

I have build apache with SSL before, but this is for some plain perl
scripts.

Any pointers are welcome, I just don't know where to start looking. I
tried CPAN and www.openssl.com, but I can't find what I am looking for.


Kees Vonk



------------------------------

Date: Thu, 4 Nov 1999 08:48:07 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Secure Sockets ???
Message-Id: <Pine.GSO.4.10.9911040846520.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999, Technical Services - UK Link wrote:

> Does anyone know if it is possible to use SSL to create a secure
> socket connection from perl.

If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-)  Hope this helps!

    http://www.cpan.org/

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Thu, 4 Nov 1999 09:24:51 -0500
From: "David Stiff" <dstiff@symantec.com>
Subject: starting a process without waiting
Message-Id: <7vs4ip$cra$1@news2.symantec.com>

Hi,

Is it possible to launch a process without Perl waiting for it to complete?

I would like to launch an EXE and have the Perl script continue on.

Thanks,
Dave Stiff
Sr. SQA Eng.
Symantec




------------------------------

Date: Thu, 04 Nov 1999 11:10:25 -0500
From: Vinodh R Cuppu <ramvinod@eng.umd.edu>
Subject: Re: starting a process without waiting
Message-Id: <3821AFF1.3B39020@eng.umd.edu>

> Is it possible to launch a process without Perl waiting for it to complete?
>
> I would like to launch an EXE and have the Perl script continue on.

system("program &");



------------------------------

Date: Thu, 4 Nov 1999 08:35:08 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: starting a process without waiting
Message-Id: <Pine.GSO.4.10.9911040832440.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999, David Stiff wrote:

> Is it possible to launch a process without Perl waiting for it to
> complete?

Yes. The manpages even have examples. Start with perlipc. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Thu, 04 Nov 1999 16:23:17 +0100
From: Thorbjoern Ravn Andersen <tmp0000@unixsnedkeren.dk>
To: tchrist@jhereg.perl.com
Subject: Suggestion:  Putting URLs in POD-files by U<..> or L<...> mechanism
Message-Id: <3821A4E5.64F0EF2@unixsnedkeren.dk>

I am currently using podfiles with pod2html to produce internal
documentation which works very fine for internal links, but for external
links I currently need to have the full URL in the visible text part,
which pod2html then recognizes and activates.

After looking in the pod2html code I can see that the L<user sees this
text|the destination> mechanism could very easily be adapted to
recognize URL;s as well, but since an URL may receive different
treatment than a link, I think that a more reasonable approach might be
to activate a new U<> encoding.

The U<text|link> syntax should be exactly the same as the L<> syntax,
but with a little different treatment, i.e. allowing a URL list at the
end or so depending on the translator.

Tom, would you accept a patch to pod2html?

-- 
  Thorbjørn Ravn Andersen               "...plus...Tubular Bells!"
  http://www.bigfoot.com/~Thunderbear


------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 1278
**************************************


home help back first fref pref prev next nref lref last post