[17545] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4965 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 25 11:05:53 2000

Date: Sat, 25 Nov 2000 08:05:07 -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: <975168307-v9-i4965@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 25 Nov 2000     Volume: 9 Number: 4965

Today's topics:
        [Perl] Finding a file <perl@dotexpress.com>
    Re: [Perl] Finding a file (Tad McClellan)
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
        ActivePerl ppm help <wstsoi@hongkong.com>
    Re: ActivePerl ppm help <carvdawg@patriot.net>
    Re: How many free space on my Hd ? <hh@mailserver.dk>
    Re: How to find what is between n'th and the next tab? <lincmad001@telecom-digest.zzn.com>
        Mime type - Binary File <finster@mailexcite.com>
    Re: Need a fast $150???  Write (or find) me a couple of <nospam.newton@gmx.li>
        Newbie Q <dante@mvd.chalmers.se>
    Re: Newbie Q (Garry Williams)
    Re: Perl and Mysql <bwalton@rochester.rr.com>
        perl for win 32 setup question (Grimpoteuthis)
    Re: perl options [OT] <joe+usenet@sunstarsys.com>
    Re: perl sysadmin script <s2mdalle@titan.vcu.edu>
        Perl-Expert need (read) <PCXsoft@intag.de>
        PerlIS.dll headers in html <web@web.com>
        Problem with Term::ANSIColor under Win32 (WinME) <Barna@MegaPage.ch>
    Re: Problem with Term::ANSIColor under Win32 (WinME) <jdrumm@blazenetme.net>
    Re: Restrict HTTP daemon to a list of IP addresses <iltzu@sci.invalid>
    Re: Retrieving HTML variables in Perl (Tad McClellan)
        Trying a bit of a rewrite in Net::Whois. Need a bit of  <robert@chalmers.com.au>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 25 Nov 2000 19:55:43 +0800
From: "TommyAu@497179" <perl@dotexpress.com>
Subject: [Perl] Finding a file
Message-Id: <8vo9bd$oe0$1@imsp026.netvigator.com>

Hi all,
i am finding a file about " the stage of learning perl" (something like
this)
Thanks!




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

Date: Sat, 25 Nov 2000 09:55:51 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: [Perl] Finding a file
Message-Id: <slrn91vknn.3ce.tadmc@magna.metronet.com>

TommyAu@497179 <perl@dotexpress.com> wrote:

>i am finding a file about " the stage of learning perl" (something like
>this)

It appears that English is not your native language, so I'm not
at all sure what you are trying to ask (or say as there is no
question mark anywhere).

But that won't stop me from guessing  :-)


Perhaps you are looking for "Stages of a Perl Programmer":

   http://prometheus.frii.com/~gnat/yapc/2000-stages/


Which incorporates Tom Christiansen's "Seven Levels of Perl Mastery":

   http://larc.ee.nthu.edu.tw/~cfwu/perl/japh.txt


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sat, 25 Nov 2000 11:21:48 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage975151445.7079@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://www.cpan.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

For an alternative way to get answers, check out the Perlfaq website.

    http://www.perlfaq.com/

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

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


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

Date: Sat, 25 Nov 2000 22:14:26 +0800
From: "Lucas" <wstsoi@hongkong.com>
Subject: ActivePerl ppm help
Message-Id: <8voher$gmo14@imsp212.netvigator.com>

Hi,

I used ActivePerl 5.22 as my Win32 perl tool, but today I just install some
modules
by enter 'ppm' and type 'search', there is an error and kick me out the ppm:

>not well-formed at line 1, column 1, byte 1 at
C:/Perl/site/lib/XML/Parser.pm li
>ne 168

my ppm still was working several days ago!!

Could anybody tell me what happened?
Thanks...




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

Date: Sat, 25 Nov 2000 10:00:09 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: ActivePerl ppm help
Message-Id: <3A1FD3F9.2D53BD20@patriot.net>

Have you considered upgrading to the latest version of Perl from ActiveState?

Lucas wrote:

> Hi,
>
> I used ActivePerl 5.22 as my Win32 perl tool, but today I just install some
> modules
> by enter 'ppm' and type 'search', there is an error and kick me out the ppm:
>
> >not well-formed at line 1, column 1, byte 1 at
> C:/Perl/site/lib/XML/Parser.pm li
> >ne 168
>
> my ppm still was working several days ago!!
>
> Could anybody tell me what happened?
> Thanks...

--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.




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

Date: Sat, 25 Nov 2000 11:54:30 +0100
From: "Henrik Hansen" <hh@mailserver.dk>
Subject: Re: How many free space on my Hd ?
Message-Id: <iUMT5.6742$VR3.150220@news010.worldonline.dk>

"Frederic" <NonDisponible@Not.Available.com> wrote in message
news:8vliq9$r2q@aix4.segi.ulg.ac.be...
> I'd like to know how many free space available on my HD ??
>
> which function ??
>

I've found 3 perl modules 'for unix' avaliable for this purpose, named

Filesys::DiskSpace
FileSys::Df
FileSys::DiskFree

An example: (from perl sys adm with perl)

use FileSys::Df;

$fobj = df("/");
print $fobj->{su_bavail}*1024." bytes of".
        $fobj->{su_blocks}*1024." bytes free\n";

If you use windows you can use Win32::AdminMisc, like this

use Win32::AdminMisc;

($total, $free) = Win32::AdminMisc::GetDriveSpace("c:\\");

print "$free bytes of $total bytes free\n";

--
Henrik Hansen




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

Date: Fri, 24 Nov 2000 20:41:31 -0800
From: Linc Madison <lincmad001@telecom-digest.zzn.com>
Subject: Re: How to find what is between n'th and the next tab?
Message-Id: <241120002041315631%lincmad001@telecom-digest.zzn.com>

In article <3A1E6A39.5228B414@mit.tut.fi>, Pekka Kumpulainen
<kumpu@mit.tut.fi> wrote:

> I am a newbie with perl but I have read the faq, searched from books
> and web tutorials. I want to get a column from tab-separated
> ascii-file. Is it possible to find where in my line is the n'th tab
> and then get the characters from that to next tab?
> 
> Now I do it with split:
>         (@stuff) = split /\s/, $_;
>         print OUT "$stuff[$colnum-1]\n";
> 
> It works but this it takes ages to run. If I get the first one or second
> limiting the split:
>       (@stuff[0..1],$rest) = split /\s/, $_, 3;
>        print OUT "$stuff[1]\n";
> 
> This runs fast. So splitting entire string seems to be inefficient when
> I only want one value.
> 
> Can I find positions of tabs n and n+1? Then I could use substr.
> Or is there a feature in split (which I could not find yet) that allows
> to pick n:th value directly, something like: ($crap,$mystuff,$morecrap)
> = split /\s/, $_, n;
> 
> Thanks in advance
> 
> Meanwhile I 'll try running index n times increasing startpoint etc. to
> see how it performes.
> My current datafile has 1376216 rows and 82 columns and there is more
> coming...

I haven't timed this for efficiency, but you could play around with
something like this:

my $n = 43 - 1;      # i.e., $n = 42 for the 43rd column
while (<IN>) {
   ...
   my $temp = $_;    # in case you want to do something else with $_
   $temp =~ s/([^\t]*\t){$n}//o;    # discard the first 42 columns
   my ($stuff) = split /\t/, $temp; # discard all columns after 43
   print OUT "$stuff\n";
   ...
}

You can extend this to pick out the 14th, 32nd, and 59th columns, or
whatever you need.

By the way, you don't want to use "split /\s/" if there might be spaces
in the text of any of your fields.

The /o flag on the substitution operation causes the search pattern to
be compiled only once, instead of being recompiled each time you run
through the loop.

Note also that

   my $stuff = split ...

and

   my ($stuff) = split ...

produce very different results.


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

Date: Sat, 25 Nov 2000 14:59:13 +0800
From: "h" <finster@mailexcite.com>
Subject: Mime type - Binary File
Message-Id: <3a1f5937$1@usenet.per.paradox.net.au>

Hi,

I am trying to do the Netscape Customisation Kit signup server.  I can
create all the file can create the accounts but am having trouble returning
the correct Mime file back to the user.

The instruction from NEtscape are as follows...
=======
application/x-netscape-autoconfigure-dialer-v2

When Navigator sees this MIME type, it expects data in the format described
below. The binary file format used by this MIME type is simple, yet
extensible. It
consists of consecutive name/value pairs separated by 4 bytes of size
information:

| 4 bytes | ------ x bytes ------ | 4 bytes | ------ y bytes ------ |  (x)
(name)            (y)             (value)

The parser iterates as follows until it reaches the end of the stream:

     Read 4 bytes of binary data and cast to int for size of Name in bytes
(x)
     Read (x) bytes of ASCII data for the name
     Read 4 bytes of binary data and cast to int for size of Value in bytes
(y)
     Read (y) bytes of ASCII data for the value
================

Can someone possibly provide a sample of how to do this.

On a related note, the netscape doucmentation says to return the encrypted
password, but how is the password encryted?

Cheers
gavin







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

Date: Sat, 25 Nov 2000 09:22:58 +0100
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
Subject: Re: Need a fast $150???  Write (or find) me a couple of scripts and make em' work!
Message-Id: <8sru1tot92sen84isa45cedcfjfge6ln0i@4ax.com>

On 23 Nov 2000 11:06:16 -0800, merlyn@stonehenge.com (Randal L. Schwartz) wrote:

> >>>>> "Al" == Al Rosetti <al@maystreet.com> writes:
> 
> Al> An invisible counter to be used on multiple pages
> 
> What's an invisible counter?

Presumably, one that works something like this:

    <img src="http://www.example.com/cgi-bin/counter.cgi"
         height="1" width="1" alt="" />

That records calls and returns a transparent ("invisible") GIF or PNG image.

Actually, probably s!counter\.cgi!counter.cgi?page=currentpage.html! so you can
track which page the counter was called from, for display on his master counter
page.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
If you're not part of the solution, you're part of the precipitate.


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

Date: Sat, 25 Nov 2000 14:37:06 +0100
From: Daniel Thuresson <dante@mvd.chalmers.se>
Subject: Newbie Q
Message-Id: <3A1FC082.5F8EC369@mvd.chalmers.se>

Hi

I'm just getting started with perl and I was wondering if anyone could
point me in the right direction.
The problem is as follows: I want to get all the filenames from a
directory, compare those filenames with files in another directory, and
if there exists files in the first directory that does not exist in the
second directory, do some stuff with those files and save them to the
second directory. I'm running Perl 5.00.

Any help appreciated.
Cheers!
//Daniel



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

Date: Sat, 25 Nov 2000 14:07:04 GMT
From: garry@zweb.zvolve.net (Garry Williams)
Subject: Re: Newbie Q
Message-Id: <cIPT5.1701$xb1.101737@eagle.america.net>

On Sat, 25 Nov 2000 14:37:06 +0100, Daniel Thuresson
<dante@mvd.chalmers.se> wrote:
>I'm just getting started with perl and I was wondering if anyone could
>point me in the right direction.
>The problem is as follows: I want to get all the filenames from a
>directory, compare those filenames with files in another directory, and
>if there exists files in the first directory that does not exist in the
>second directory, do some stuff with those files and save them to the
>second directory. I'm running Perl 5.00.

This should be the right direction: 

Read the perlfunc manual page section on opendir(), readdir() and
closedir().  Read the perlfaq4 manual page "How can I tell whether a
list or array contains a certain element?".  Read the File::Copy
manual page.  

-- 
Garry Williams


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

Date: Sat, 25 Nov 2000 04:42:44 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl and Mysql
Message-Id: <3A1F43F5.4038A2DD@rochester.rr.com>

vivekvp wrote:
> 
> Can you use perl to create tables with Mysql.
> 
> Almost like an interface - so you can create custom tables then access
> them?
> 
> Any examples of how to do this?  Or scripts that already do this?
 ...
> V
 ...
The DBI module along with the companion DBD::mysql are tailor-made for
the task you describe.  The chances are good these modules are already
installed with your Perl installation.  For more info:

    perldoc DBI
-- 
Bob Walton


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

Date: Sat, 25 Nov 2000 15:26:55 GMT
From: fish@7cs.net (Grimpoteuthis)
Subject: perl for win 32 setup question
Message-Id: <3a1f087f.412596468@News>

Hi,

I hate to ask a silly question but I've been searching through the
perl documentation and can't find anything really specific to this. 
I've included a lengthy example so anyone can be quite specific as to
what I've missed with this setup somewhere when I installed apache or
activestate perl.

The end result is : apache works, perl works in DOS, but my test html
file that links to a perl script gets a windows dialogue box that asks
you what would you like to do with this file ( save or open ), if you
open it you get a DOS window for a split second. That's all really.
Apache/windows obviously doesn't know what to do with the file and I'm
none to clear, despite having read through a days worth of
documentation, on how to fix this. So I turn now to the generous,
wonderful web community for assistance.

 Thanks in advance

-greg


the install path was D:\apache 

removed the # to leave ServerName new.host.name 

Started the Apache console app ether from the Start menu or by opening
a DOS Prompt window and typing D:\apache\Apache.exe -d d:\APACHE -s

Win32 Apache server  runs on http://localhost 

installed Perl to a directory path of D:\apache\usr and the cgi-bin
directory as D:\apache\cgi-bin 

added the path statement 
SET PATH=d:\APACHE\USR\BIN;%PATH% 
to autoexec.bat

Opened the file httpd.conf located in d:\apache\conf using Notepad and
changed the following lines read as follows.......

UserDir "d:/apache/usr/"

ScriptAlias /cgi-bin/ "d:/apache/htdocs/cgi-bin/"

<Directory "d:/apache/cgi-bin/">
        AllowOverride None
        Options None
</Directory>

AddHandler cgi-script .cgi (removed the #)

opened the file srm.conf located in d:\apache\conf using Notepad and
addded
ScriptAlias /cgi-bin/ "d:/apache/htdocs/cgi-bin/"
to this file as well

Restart your machine and ran the Apache console app again,

used the following file stored in my d:\apache\cgi-bin folder as
ps01.pl

#!d:/apache/usr/bin/perl.exe
print "Content-type: text/html\n\n";
print "Hello world";

with an html file in d:\apache\htdocs with the following code:

<html>
<a href="d:\apache\cgi-bin\ps01.pl"> test </a>
</html>





These instructions I'm following are from:

http://www.egovision.com/htmlresources/articles/apache_win32.html

and

"Perl and cgi for the world wide web" by E. Castro

I have the camel book but wanted to start with something really easy
first.


Thanks again.


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

Date: 24 Nov 2000 21:07:06 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: perl options [OT]
Message-Id: <m3ofz4oldh.fsf_-_@mumonkan.sunstarsys.com>


I hope it's safe to post here again - there might be at most a half-dozen
stale messages in the gunked-up newsfeed I was using last week. I'll
keep an eye out and cancel them should they ever appear.

mgjv@tradingpost.com.au (Martien Verbruggen) writes:

> On Sat, 25 Nov 2000 00:35:57 GMT,
>	Flint Slacker <flint@flintslacker.com> wrote:
> > I'm not new to programming and I still think my question is valid.  If
> > perl reads in a script, it most likely balances brackets, braces,
> > looks for barewords, and whatever other tests... and finally runs the
> > script.  I was just wondering if that step could be skipped, that's
> > all.  
> 
> No, it cannot be skipped. Only if perl were stored as bytecode could it
> maybe be skipped. Compilers HAVE to do syntax checking. It's their job.

Although I suppose it's difficult to argue that shell scripting 
constitutes real programming, I think a generous read of 
OP's question might be based on such experience.  Basically, I
would interpret what he's asking as:

Q:
1) Is there a way for a programming language like perl to do 
on-the-fly compilation and execution, similar to the line-by-line 
execution of shell scripts? 

2) Would/could it be better than the 2 phase compilation/execution
process?  

A:

eval does this (sort of) for perl, and HTML rendering
engines (i.e. browsers) depend heavily on this idea as well.
So does embedded javascript (in case you don't consider HTML a 
programming language).

=begin html

<html>
<head><title>Incremental Compilation</title></head>
<script language='Javascript1.2' type='text/javascript'>
<!--
    var message = "This block was compiled/executed.";
//-->
</script>
<body>

<script language='Javascript1.2' type='text/javascript'>
<!--
    alert(message);
//-->
</script>
(lots of webcrud here)
<script language='Javascript1.2' type='text/javascript'>
<!--
    document.writeln("What happens here?" . "Damned plus sign!" );
//-->
</script>

</body>
</html>

=end html

In summary, I would say

(1) "yes, it's possible for some languages to do this."
(2) "no, it would not be better for perl to this. In fact,
     it would almost invariably lead to slower, buggier, crappier
     software. As an example, the brief history of the www 
     confirms this view."

Congenially yours,
-- 
Joe Schaefer



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

Date: Fri, 24 Nov 2000 21:27:14 +0500
From: "David Allen" <s2mdalle@titan.vcu.edu>
Subject: Re: perl sysadmin script
Message-Id: <8vnq01$6oh$1@bob.news.rcn.net>

In article <slrn91tugh.lp.tom.hoffmann@localhost.localdomain>,
tom.hoffmann@worldnet.att.net  wrote:
> There is a program called 'sarge' lurking on the web (I forget where)
> written by Ed Finch that performs this function for multiple hosts, and
> it goes so far as to set up the whole sa1/sa2 processes in cron
> automatically.  

I was interested in this query enough to go checking...

What the original poster may be looking for is
"sarge" written by Ed Finch:

http://users.sitestar.net/~efinch/

-- 
David Allen
http://opop.nols.com/
----------------------------------------
"I just went visual on this goofy looking Finn riding on a gnu,
 wielding one pissed off penguin... gah"
 - Bob The Sane


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

Date: Sat, 25 Nov 2000 11:43:35 +0100
From: "Alexander Adam" <PCXsoft@intag.de>
Subject: Perl-Expert need (read)
Message-Id: <8vo551$ta4$06$1@news.t-online.com>

Hello,

We need someone who can programm a gui around the perl-debugger, just like
in ActiveState's Debugger or the Perlbuilder 2.0!
Programming language: Delphi(OP) prefered, but C++ (Visual C++) also
accepted!!

So, can u help us ?
You'll be payed very good, of course, but it's very hurry, so please reply
us very fast!

Thanks to all,

A. Adam
--
PCX Software




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

Date: Sat, 25 Nov 2000 05:05:24 GMT
From: "web" <web@web.com>
Subject: PerlIS.dll headers in html
Message-Id: <oMHT5.31499$kd.7346077@news3.rdc1.on.home.com>

I am currently running windows 2000 and have installed ActiveState perl 5.6.

My IIS (pws) is configured to run perl.exe (.pl) and perlIS.dll (plx).

The problem I'm having is that when I run a simple hello world script using
the plx extension which uses the perlIS.dll  my html file outputs the header
as well ex:

HTTP/1.1 200 OK Date: Thu, 23 Nov 2000 14:37:48 GMT Server:
Microsoft-IIS/5.0 Content-Type: text/html; charset=ISO-8859-1 hello world

I am executing this as a SSI <!--#exec
cgi="/intrawebs/cgi-bin/hello.pl" -->

my code is as such:

#!/usr/bin/perl -w

use strict;
use CGI qw(:standard);

print header;

print "hello world";

When I use the pl extension which uses the Perl.exe I just get the hello
world.

I want to take advantage of using the PerlIS.dll but I don't want to see
that header, how do I turn it off?

I've looked at the online documentation that came with PERL 5.6 and it
mentions to turn off header by changing an entry in the registry

Excerpt: The Registry value that governs this is EnableCGIHeader, a
REG_DWORD value that is set to 1 by default. This value is stored under the
Registry key HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlIS. If you need to
turn off the automatic generation of the header, set this value to 0.

Unfortunately I do not have this in my registry.  Is it a Windows2000
problem?

Your help is grealy appreciated.

Thank you

Luc Martel

intrawebs@home.com








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

Date: Sat, 25 Nov 2000 04:38:31 +0100
From: Barna <Barna@MegaPage.ch>
Subject: Problem with Term::ANSIColor under Win32 (WinME)
Message-Id: <3A1F3437.81A6AF38@MegaPage.ch>

Hi All

I have a problem with Term::ANSIColor under Windows Millenium Edition.
When I try to write something bold blue (from the sample in the
documentation) i just get "This text is bold blue." without any
colors...

What can I do?

Thank you all!

Bye





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

Date: Sat, 25 Nov 2000 08:09:28 -0500
From: Jeffrey Drumm <jdrumm@blazenetme.net>
Subject: Re: Problem with Term::ANSIColor under Win32 (WinME)
Message-Id: <i8ev1tsqj23bekb1antt33d7bcchb4m0im@4ax.com>

[posted to comp.lang.perl.misc]

On Sat, 25 Nov 2000 04:38:31 +0100, Barna <Barna@MegaPage.ch> wrote:

>Hi All
>
>I have a problem with Term::ANSIColor under Windows Millenium Edition.
>When I try to write something bold blue (from the sample in the
>documentation) i just get "This text is bold blue." without any
>colors...
>
>What can I do?

Install the ANSI driver via CONFIG.SYS:

DEVICE=C:\WINDOWS\COMMAND\ANSI.SYS

You'll need to reboot for it to take effect.

PS. If you don't know what CONFIG.SYS or ANSI.SYS is, asking about them in
a Perl newsgroup would be a mistake.

-- 
 - Jeff Drumm




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

Date: 25 Nov 2000 14:16:22 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Restrict HTTP daemon to a list of IP addresses
Message-Id: <975161473.26674@itz.pp.sci.fi>

In article <8vmo8o$k95@junior.apk.net>, Mark W. Schumann wrote:
>In article <slrn91kdst.gsf.rgarciasuarez@rafael.kazibao.net>,
>Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote:
>>
>>  while (my $c = $daemon->accept) {
>>    if ($c->peerhost !~ /^(127\.0\.0\.1|1\.2\.3\.\d+)$/) {
>>      close $c; next;
>>    }
>>    # Handle connection...
>>  }
>
>That seems to be close to right.

Um?  It _is_ right.

>But think about how the compiler will parse
>       \.1|1\.
>in your regexp.

More or less like it'll parse
	e $c; nex
on the line below it.

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post
 something, we discuss its implications.  If the discussion happens to
 answer a question you've asked, that's incidental." -- nobull in clpm



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

Date: Fri, 24 Nov 2000 23:02:28 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Retrieving HTML variables in Perl
Message-Id: <slrn91ueek.1v5.tadmc@magna.metronet.com>

hokiebear <ayambema@adelphia.net> wrote:

>A question for the Perl gurus out there. 


It does not take a guru to answer your question.

It takes only someone who can run the code and try it.


>print <<EOM;
><P ALIGN="LEFT">Email:<INPUT TYPE="TEXT" NAME="Email" SIZE="30"></P>
>EOM

>I can retrieve the email address entered in the above code fragment using:
>$input{'Email'}

>print "<P ALIGN=\"LEFT\">Email:<INPUT TYPE=\"TEXT\" NAME=\"Email\"
>SIZE=\"30\"></P>\n";

>What Perl syntax do I use to retrieve the email address entered?


Since the string that Perl outputs is the same whichever way
is used to output it: the same way as you were doing before.

Did you try that?


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sat, 25 Nov 2000 16:07:09 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Trying a bit of a rewrite in Net::Whois. Need a bit of help..
Message-Id: <xtIT5.424$%92.14662@nsw.nnrp.telstra.net>


About line 325 in Whois.pm is the code to print out the
Administrative
Billing
Technical
details
 .
It of course prints out the whole thing. mail address, phone etc.

I'm trying to rewrite it so it only prints out the email addresses.  Any
clues anyone.



    while (@text) {
      $t = shift @text;
      next if $t=~ /^$/; #discard blank line
      if ( $t =~ s/^domain name:\s+(\S+)$//i) {
          $info{DOMAIN}  = $1;
          $info{DOMAIN} =~ tr/A-Z/a-z/ ;
      } elsif ( $t =~ /contact.*:$/i) {
          my @ctypes = (              $t =~ /\b(\S+) contact/ig);
          my @c;
          while ( $text[0] ) {
              last if $text[0] =~ /contact.*:$/i;
              push @c, shift @text;
          }
          @{ $info{CONTACTS} } {map {uc} @ctypes} = (\@c) x @ctypes;
      } elsif (                       $t =~ /^Record created on (\S+)\.$/) {





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

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 4965
**************************************


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