[10910] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4511 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 29 10:07:18 1998

Date: Tue, 29 Dec 98 07:00:32 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 29 Dec 1998     Volume: 8 Number: 4511

Today's topics:
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: A big problem an Medium sized one and an Ickle one. (Bart Lateur)
    Re: About Perldoc (Clay Irving)
    Re: Adding a path to the @INC variable dave@mag-sol.com
    Re: Adding a path to the @INC variable <gellyfish@btinternet.com>
        Delimeters in Data <ckdasari@cs.hku.hk>
    Re: EXPERIENCED IN PERL ? (Clay Irving)
    Re: EXPERIENCED IN PERL ? <jdf@pobox.com>
        fix Config.pm nguyen.van@imvi.bls.com
    Re: full GUI development in perl dave@mag-sol.com
        How to access BLOB field from DBI <dmidav@cityline.ru>
    Re: How to Display multiple image files into HTML templ (Clay Irving)
        Install fails under RH5.2 (Daniel)
    Re: Listing files dave@mag-sol.com
    Re: Listing files <carvdawg@patriot.net>
    Re: mkdir and -p <sehughes@mistral.co.uk>
        net::time   question <damoi985@hotmail.com>
    Re: net::time question (Clay Irving)
    Re: net::time question dave@mag-sol.com
    Re: net::time question <damoi985@hotmail.com>
    Re: Newest precompiled version of Perl? dturley@pobox.com
    Re: Newest precompiled version of Perl? <gellyfish@btinternet.com>
    Re: Perl Scripts in MS-DOS (Cameron Laird)
    Re: Perl Scripts in MS-DOS (Bbirthisel)
    Re: Protecting my script from form data <gellyfish@btinternet.com>
    Re: Protecting my script from form data (Cameron Laird)
    Re: Regex question - removing HTML tags.... (Gilly)
    Re: Regex question - removing HTML tags.... (Gilly)
    Re: Regex question - removing HTML tags.... (Gilly)
    Re: Removal of NULL's dave@mag-sol.com
    Re: Thank You everyone :)... <dusty@hofffmain.com>
    Re: When hashing won't work... dave@mag-sol.com
    Re: When hashing won't work... <uri@home.sysarch.com>
    Re: where to download the perl 5.0052.zip for win32 ?? dturley@pobox.com
    Re: where to download the perl 5.0052.zip for win32 ?? <gellyfish@btinternet.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 29 Dec 1998 11:24:05 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage914930641.2816@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 10 Sep 1998

[ 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://cpan.perl.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.

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

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://cpan.perl.org/
    http://www.perl.com/CPAN/
    http://cpan.perl.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.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:

    setdir usenet-by-group/news.announce.newusers
    send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List

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

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: Tue, 29 Dec 1998 10:35:40 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: A big problem an Medium sized one and an Ickle one.
Message-Id: <3688b05f.3798008@news.skynet.be>

Wallace wrote:

>I have a percentage of 1.45343729537057439579749735
>But I only want it to store 1.453 in $Percentage.
>
>I know how to print it using Printf but it has to be stored rounded as well.

then use sprintf instead!

   HTH,
   Bart.


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

Date: 29 Dec 1998 07:37:32 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: About Perldoc
Message-Id: <76aiec$sls@panix.com>

In <76995d$232$1@gellyfish.btinternet.com> Jonathan Stowe <gellyfish@btinternet.com> writes:

>perldoc is a program that allows you to view the Perl documentation from its
>native POD format.  perldoc -f searches for a function of the same name as the
>second argument in the perlfunc documentation and displays the result.
>perlfaq -q similarly searches for a keyword in the perlfaq[1-9] documents.

>The entire set of documentation is available via:

><URL:http://reference.perl.com>

>it is available either in an online format or for download.

Actually, the documentation is found at http://language.perl.com:

    http://language.perl.com/info/documentation.html

-- 
Clay Irving
clay@panix.com


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

Date: Tue, 29 Dec 1998 10:28:24 GMT
From: dave@mag-sol.com
Subject: Re: Adding a path to the @INC variable
Message-Id: <76aas7$ah1$1@nnrp1.dejanews.com>

In article <769e86$f8g$1@news.mel.aone.net.au>,
  "douglas de vine" <douglasd@iig.com.au> wrote:
> How do I add a path to the @INC variable which contains all the paths to
> look for *pm files?

You can set a PERL5LIB environment variable, the contents of which will be
prepended to @INC at runtime.

You can put a 'use lib /my/lib/directory' command in your Perl script.

You can manipulate @INC using any of the standard list functions like unshift
or push.

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 13:25:23 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Adding a path to the @INC variable
Message-Id: <76al83$ch$1@gellyfish.btinternet.com>

On Mon, 28 Dec 1998 20:52:49 -0800 Al in Seattle <alber@seanet.com> wrote:
> Interesting answer. I also find (and I'm no expert so bear with me), that
> the Perl by Example book, on page 213 seems to show that you can also use
> the -I switch at the command line, or set the PERL5LIB environmental
> variable to the full pathname. Does this also seem correct? (By the way,
> Perl by example seems to be a very good book. It is a bit more of  a Unix OS
> oriented book, but I am also learning some new stuff for NT from it).
> 

Yeah both -I and PERL5LIB are fine though use lib is the most often cited
method. There is a section in perlfaq8 about this.

However you need to append your path to the PERL5LIB variable.

I've never read Perl by Example so I cant possibly comment further on that.

/J\ 


-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Tue, 29 Dec 1998 22:34:54 +0800
From: "D.C.Karthikeyan" <ckdasari@cs.hku.hk>
Subject: Delimeters in Data
Message-Id: <Pine.GSO.4.03.9812292229460.21684-100000@virtue.csis.hku.hk>

Hi,

I am trying to join and split a list using a colon as a delimeter. The
problem comes when the actual list contains a colon. For instance:

This one works fine:

$test = join (":", "Test", "Fine");
@test = split (":", $test);

BUT this one does not. 

$test = join (":", "Te:st", "Fine");
@test = split (":", $test);

This is because the delimeter is part of the actual data. I know I could
write a function to get around this problem. But is there a built-in perl
function that could do this or some kind of efficient code to do this as
quickly as calling the actual join and split function.

Regards,
Karthik 



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

Date: 29 Dec 1998 07:54:58 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: EXPERIENCED IN PERL ?
Message-Id: <76ajf2$g5@panix.com>

In <36888849.AA5E2A09@earthlink.net> Dawg Master <dawgmaster@earthlink.net> writes:

>PERL PROGRAMMER
>Very experienced in Perl and Linux Red Hat. Must be able to create
>anything we need in Perl, 
[...]

Anything? Whew, that's a herculean task!

-- 
Clay Irving
clay@panix.com


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

Date: 29 Dec 1998 15:51:15 +0100
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: EXPERIENCED IN PERL ?
Message-Id: <m3zp870zoc.fsf@joshua.panix.com>

Dawg Master <dawgmaster@earthlink.net> writes:

> PERL PROGRAMMER
> Very experienced in Perl and Linux Red Hat. Must be able to create
> anything we need in Perl

"For example, we need a program to determine the optimum route for our
traveling salesmen.  Also, we are writing debugging tools, and we'll
need you to write a program that can determine whether another program
will halt.  Salary commensurate with results."

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Tue, 29 Dec 1998 14:31:31 GMT
From: nguyen.van@imvi.bls.com
Subject: fix Config.pm
Message-Id: <76ap44$l8l$1@nnrp1.dejanews.com>

Hi guys,

I tried to debug my script and get this message:

"Perl lib version (5.00404) doesn't match executable version (5.001) at
/opt/lib/perl5/sun4-solaris/5.00404/Config.pm line 7"

How can I fix this problem? Thanks for your help.

Van Nguyen

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 10:24:32 GMT
From: dave@mag-sol.com
Subject: Re: full GUI development in perl
Message-Id: <76aakv$adm$1@nnrp1.dejanews.com>

In article <slrn78g688.3dg.eric@eric.nafex.com>,
  eric@nafex.com wrote:
> Hi
>
> I understand that work is afoot which will allow development for Windows
> environment of GUI applications in Perl using Java front end.  But I am unable
> to find anything regarding this  on the net.
>
> IS the day really approaching when we may dump windoze dev tools like Delphi,
> Visual basic etc for a Perl Toolkit?

That day is already here. If you get a copy of ActivePerl, the Perl/Tk
extensions and Perl Builder you can develop GUI apps in a GUI environment
using Perl.

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 17:25:52 +0300
From: "Dmitry Davidov" <dmidav@cityline.ru>
Subject: How to access BLOB field from DBI
Message-Id: <914941572.492491@mao.cityline.ru>

Hello!

Could anybody tell me how to write/read to/from BLOB database field by means
of DBI module?
I know that there is a special blob_read(...) function for this action but
it is not documented in the man pages.
Please help me because it is realy important to me.

     Thank u,
           Eugene




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

Date: 29 Dec 1998 07:50:27 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: How to Display multiple image files into HTML template with perl
Message-Id: <76aj6j$t11@panix.com>

In <b7_h2.1694$Hp.2880@news.rdc1.on.home.com> "Webmaster" <shadow01@shaw.wave.ca> writes:

>I have wrote the following code, however it seems to return error 500

>#line that is being executed
># http://www.coversarchive.com/cgi-bin/test.pl?image=Abba_Gold-Back.jpg


>print "Content-type: text/html\n\n";
>print "<html><head><title>Cover Name</title></head><body>\n";
>print "<center><img src=\"../audio/$image"\></center><body>\n";
>print "</body></html>\n";

The CGI module, CGI.pm, *really* is your friend. This works:

    #!/usr/local/bin/perl -w
    
    use CGI qw(:standard);
    
    my $image = param('image');
    
    print header,
        start_html(-title=>'Image Page', -author=>'clay@panix.com'),
        img{src=>"$image"},
    end_html();
    
-- 
Clay Irving
clay@panix.com


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

Date: Tue, 29 Dec 1998 14:13:47 GMT
From: daniel.mendyke@digital.com (Daniel)
Subject: Install fails under RH5.2
Message-Id: <76ao9v$97r$1@nntpd.lkg.dec.com>


I'm puzzled at not being able to install
Perl 5.005.02 under Linux x86 RH5.2 

The Configure reports errors setting up
the dependencies and make fails with
an error 4

I'm using all defaults and working
off of a clean copy of stable.tar.gz.

Any one else experice this sort
of problem?

-Daniel



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

Date: Tue, 29 Dec 1998 10:29:59 GMT
From: dave@mag-sol.com
Subject: Re: Listing files
Message-Id: <76aav5$ahc$1@nnrp1.dejanews.com>

In article <368822B7.7AF26A73@dmi.net>,
  Remi Olsen <remio@dmi.net> wrote:
> Does anybody know how to list files in WinNT with Perl5? (like the dir
> command in DOS or ls in UNIX) I need to put each filename into an array,
> for further processing of the files. Any help would be greatly
> appreciated!

perldoc -f opendir
perldoc -f readdir


hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 05:51:10 +0000
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: Listing files
Message-Id: <36886DCE.E3C5D67D@patriot.net>



> Does anybody know how to list files in WinNT with Perl5? (like the dir
> command in DOS or ls in UNIX) I need to put each filename into an array,
> for further processing of the files. Any help would be greatly
> appreciated!
>

Here's how I did it using AS Perl build 507 on NT...

open(TEST,"test.txt") || die "Could not open test file: $!\n";

while (<TEST>) {
  chomp ($file = $_);
  if (-e $file) {
    print "$file exists.\n";
  }
  else {
    print "$file does not exist.\n";
  }

  if (-d $file) {
    print "$file is a directory.\n";
    traverse($file);
  }

}

close TEST;

sub traverse {

  my $dir = $_;
  chomp $dir;
  print "Traversing directory $dir...\n";
  @files = <$dir\\*>;
  foreach $file (@files) {
    print "$file \n";
  }
}




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

Date: Tue, 29 Dec 1998 11:00:18 +0000
From: Stuart Hughes <sehughes@mistral.co.uk>
Subject: Re: mkdir and -p
Message-Id: <3688B642.252B2CA0@mistral.co.uk>

webmaster@skatesearch.com wrote:
> 
> I'd like to invoke mkdir -p  from perl.  I know I can shell it out to do this,
> but is there a way to do this from the built in version fo mkdir in perl?
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

If you don't want to shell out you could use:


   $dir =~ m-^/-              or return("invalid relative base
directory");
   my $path = "";
   foreach ( $dir =~ m-(/[^/]+)-g ) {  # iterate over all path
components
      $path .= $_;
      next if -d $path;
      mkdir($path, 0777)        or warn("mkdir $path $!\n");
   }


-- 

Regards, Stuart Hughes

Visit http://www.zentropix.com/ for Real Time Linux Tools


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

Date: Tue, 29 Dec 1998 12:32:52 +0100
From: Damoi <damoi985@hotmail.com>
Subject: net::time   question
Message-Id: <3688BDE4.1CB674E7@hotmail.com>

I do not get it.
What is a simple way to get the time of a host (win32)
I am using this code without success:

#############################
##### GET TIME OF VOTE  #####
#############################

USE NET::TIME qw(inet_time);
use strict;
my $host = shift || 'localhost';
my $host_time = inet_time();

print "content-type:text/html", "\n\n";
  print "<HTML><BODY><CENTER>\n";
print "time is $host_time\n";
print "</BODY></HTML>";
exit();


Thanks!!!







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

Date: 29 Dec 1998 08:10:41 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: net::time question
Message-Id: <76akch$1i3@panix.com>

In <3688BDE4.1CB674E7@hotmail.com> Damoi <damoi985@hotmail.com> writes:

>I do not get it.
>What is a simple way to get the time of a host (win32)
>I am using this code without success:

>#############################
>##### GET TIME OF VOTE  #####
>#############################

>USE NET::TIME qw(inet_time);
>use strict;
>my $host = shift || 'localhost';
>my $host_time = inet_time();

>print "content-type:text/html", "\n\n";
>  print "<HTML><BODY><CENTER>\n";
>print "time is $host_time\n";
>print "</BODY></HTML>";
>exit();

This way seems inordinately complex (and content-type:text/html won't
work) -- Why not just:

    #!/usr/local/bin/perl -w
    
    use CGI qw(:standard);
    
    $time = localtime;
    
    print header,
        start_html(-title=>'Time Page', -author=>'clay@panix.com'),
        "time is $time",
    end_html();

On my Windows 95 machine, the program prints:

    Content-type: text/html
    
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <HTML><HEAD><TITLE>Time Page</TITLE>
    <LINK REV=MADE HREF="mailto:clay@panix.com">
    </HEAD><BODY>time is Tue Dec 29 05:06:14 1998</BODY></HTML>
    
>Thanks!!!

Your welcome.

-- 
Clay Irving
clay@panix.com


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

Date: Tue, 29 Dec 1998 13:49:53 GMT
From: dave@mag-sol.com
Subject: Re: net::time question
Message-Id: <76amm0$jae$1@nnrp1.dejanews.com>

In article <3688BDE4.1CB674E7@hotmail.com>,
  Damoi <damoi985@hotmail.com> wrote:
> I do not get it.
> What is a simple way to get the time of a host (win32)
> I am using this code without success:
>
> #############################
> ##### GET TIME OF VOTE  #####
> #############################
>
> USE NET::TIME qw(inet_time);
> use strict;
> my $host = shift || 'localhost';
> my $host_time = inet_time();
>
> print "content-type:text/html", "\n\n";
>   print "<HTML><BODY><CENTER>\n";
> print "time is $host_time\n";
> print "</BODY></HTML>";
> exit();

It's much easier to offer assistance if you tell us what you mean by 'without
success'. What error messages are you seeing? What isn't happening that you
expect to happen (or vice versa)?

I'm guessing that USE NET::TIME might work a bit better as

use Net::Time

or something similar. Remember that Perl is case sensitive.

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 15:15:02 +0100
From: Damoi <damoi985@hotmail.com>
To: dave@mag-sol.com
Subject: Re: net::time question
Message-Id: <3688E3E6.D346643F@hotmail.com>

I am getting nothing at all xcept
<HTML><BODY><CENTER>
in my html

> It's much easier to offer assistance if you tell us what you mean by 'without
> success'. What error messages are you seeing? What isn't happening that you
> expect to happen (or vice versa)?





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

Date: Tue, 29 Dec 1998 12:27:54 GMT
From: dturley@pobox.com
Subject: Re: Newest precompiled version of Perl?
Message-Id: <76ahsa$fn2$1@nnrp1.dejanews.com>

In article <bEQh2.295$Ou1.678@news.get2net.dk>,
  "Thomas Turn Jensen" <Mukke@get2net.dk> wrote:
> Hi there
>
> I am currently running perl 5.004_02 (not the activestate thing - the other
> one :) but everybody keeps talking about 5.005, so I was wondering if I'm
> missing something important with my current version. Problem is I haven't
> been able to found a never version anywhere, as I have no c-compiler - nor
> do I have any interest in doing my own compilation as I want to have a
> version as compatible as posible to what is used at the various
> webservers...

Since you mention ActiveState, can I assume you are using Windoze? What did
you find when you checked out the ActiveState web site?

http://www.activestate.com
> Thank you in advance
>
> ***
> Thomas Turn Jensen
> Icq uin => 8128636
> IRC, Undernet => Mukke
> ***
> So long, and thanks for all the fish
> ***
>
>


--
____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 13:44:33 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Newest precompiled version of Perl?
Message-Id: <76amc1$cq$1@gellyfish.btinternet.com>

On Mon, 28 Dec 1998 22:47:25 -0600 Michael D. Schleif <mds-resource@mediaone.net> wrote:
> Ronald J Kimball wrote:
>> 
>> A quick trip to www.perl.com to download the latest version of Perl for
>> Win32 systems led me to the following page:
>> 
>> http://www.ActiveState.com/ActivePerl/
>> 
>> ActivePerl is the "'merge' of the two popular Perl ports, and has the
>> absolute best of both plus more! And, ActivePerl is FREE!"
>> 
>> Build 508 is based on the latest stable Perl release, 5.005_02.
> 
> From this remark, shall we infer that ActivePerl is the *only* Perl
> recommended for win32?  

There is no reason that people shouldnt continue to use the 5.004.02
port except that 5.005.02 is the one that most people will be using
on any platforms - so for instance people here will give examples and
cite documentation based on the current stable release - eventually the
Modules that are available for Win32 may only be available for ActivePerl
(or rather those for other distributions may no longer be maintained ).

>                                     Is this a question legitimate to ask?

Of course it is a legitimate question, however it does seem to be
motivated by something that you are not making apparent - why wouldnt
one want to have a Perl based on the lastest stable source code ?

There seems to be an element of FUD around this but I cant determine by
what it is motivated.

> 
> Of course, this also begs the question, recommended by whom ? }:-^
> 

ActivePerl is based on the same code as the standard source code
distribution indeed their extensions have been applied to that source
code - if you are in a position to compile your own Perl with a Borland or
Microsoft compiler then you would end up with largely the same executable.

Until the release of ActivePerl I had used the 5.00402 release on Win32
machines and was happy with it.  I have no axe to grind here in either
direction - I would (and I guess so would most other people) just rather
have the most most up to date Perl available for my platform.

The developer of the previous *standard* 5.00402 port, Gurasamy Sarathy,
now works for ActiveState so that kind of obviates any more debate on
the matter.

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 29 Dec 1998 08:25:57 -0600
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: Perl Scripts in MS-DOS
Message-Id: <76aopl$3le$1@Starbase.NeoSoft.COM>

In article <36888E06.B2B4BF0D@itpro-ag.ch>,
Thomas Mundschin  <thomas.mundschin@itpro-ag.ch> wrote:
>we are trying to improve our unattendet NT installation. Our question
>is, is there a possibility to work with Perl when you boot with a disket
>only in DOS from where we want to start a script who ask use for a few
>parameters about the installation (like networkcard, vgacart, name of
>the computer...). Is this possible or is there another script lnaguage
>other then CMD.
>Thnaks Thomas
>

Yes.  Older and somewhat less feature-full versions of Perl are
available for quite plain DOS machines (is that your question?).
<URL:http://www.cpan.org/ports/index.html#msdos> is a good
starting point.

Yes, there are also several other scripting languages available
for DOS other than CMD.EXE.

I think you're wise to look to automate your chores as you ap-
pear to be doing.  Perhaps we can give more precise advice with
better understanding of your requirements.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 281 996 8546 FAX


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

Date: 29 Dec 1998 14:27:18 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Perl Scripts in MS-DOS
Message-Id: <19981229092718.15293.00003106@ng137.aol.com>

Hi Thomas:

I haven't tried running from a floppy  - but the MS-DOS ports on
CPAN should allow you to do what you want. You may have to
delete the functions/modules your script does not use to save space.
As I recall, the Perl4 MS-DOS ports had smaller footprints.

>is, is there a possibility to work with Perl when you boot with a disket
>only in DOS from where we want to start a script who ask use for a few
>parameters about the installation (like networkcard, vgacart, name of
>the computer...). Is this possible or is there another script lnaguage
>other then CMD.

BTW: It used to be quite common for Un*x install programs to
include a "mininal perl" (now THERE'S an oxymoron ;-) to handle
setup chores similar to those you need.

-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)


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

Date: 29 Dec 1998 13:17:19 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Protecting my script from form data
Message-Id: <76akov$b3$1@gellyfish.btinternet.com>

On 29 Dec 1998 03:50:48 GMT Groovy94 <groovy94@aol.com> wrote:
>>it is far better to simply
>>prevent the user input from getting anywhere it might do harm
> 
> 
> How wouldI do that? I am not a perl guru and read in my perl book that adding
> something like I posted was a good way of stopping malicious attacks using the
> program. 
> 

Ronald has posted a reply that would suggest that your regex is really the
wrong way round - you should be checking for the characters that *you want*
rather than ones you thingk might be harmful.

User input cannot possibly be harmful unless you allow it to be used
in some way that is potentially harmful.  system() with one argument,
exec(), the backticks, eval() and in some circumstances open() are the
only places where this can be the case (oh open2 and open3 as well ).
Simply manipulating or printing data is not harmfull - of course it might
not be valid for your application but that is not a security issue rather
one of application design.

>> if
>>you are going to use system()
> 
> 
> Did I say or hint at using system()? I am not even sure what system() is. 

I'm getting nervous.  The characters that you were filtering where the shell
meta-characters - those that could potentially cause some external shell
to do more than you actually bargained for. Except in the circumstances
outlined above they cannot be harmful.

Lets look at a little thought experiment:

# $recipient is user input intended to hold an E-Mail address


open(MAIL," | /usr/bin/mail $recipient" ) || die "Cant opent mail - $!\n";

# Now this is running on a unix system , lets imagine what would happen if
# the user had input 'blah@blah.com ; rm -rf *'

Hmm you could well have just lost a large number of files ...

>                                                                           I
> know that it is best to avoid using the shell, but I wasn't aware that I
> actually was...
> 

Read the perlsec manpage.

Check that external commands are only getting the type of input that is
required i.e. you might consider that an E-Mail address might match :

/[-\w@.]+/ # That might not be exhaustive

You cant do any harm simply manipulating data.

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 29 Dec 1998 08:16:58 -0600
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: Protecting my script from form data
Message-Id: <76ao8q$2vv$1@Starbase.NeoSoft.COM>

In article <19981228225048.00797.00003190@ng-fv1.aol.com>,
Groovy94 <groovy94@aol.com> wrote:
>>it is far better to simply
>>prevent the user input from getting anywhere it might do harm
>
>
>How wouldI do that? I am not a perl guru and read in my perl book that adding
>something like I posted was a good way of stopping malicious attacks using the
>program. 
>
>> if
>>you are going to use system()
>
>
>Did I say or hint at using system()? I am not even sure what system() is. I
>know that it is best to avoid using the shell, but I wasn't aware that I
>actually was...
			.
			.
			.
Let's start over.  You "read in [your] perl book that
adding something like I posted was a good way of stopping
malicious attacks ...", and you are doing your best to
act on that information.  I understand.

I consider the advice you've quoted unfortunate.  The
reason follow-ups have mentioned system() to you is that
"something like I posted" only contributes to security in
a situation involving system().

The greatest security risks of beginners' scripts are what
the beginners do to themselves.  I mean no disrespect or
hostility by that; I'm saying it as a positive.  I specu-
late that you're at a level where, once your script works
to your satisfaction, you need have no worries about out-
siders perverting it to cause you harm.  It's unlikely
that your script presents the particular vulnerabilities
your substitution was designed to protect.

Security is a large subject.  The book you have sounds as
though it's giving unbalanced and inappropriate advice.
My recommendation is that you keep working to make your
script do what you want, and find a local colleague who
can advise you on security, and things you want to avoid.
You are vulnerable in much more immediate ways than
through the script on which you're working.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 281 996 8546 FAX


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

Date: Tue, 29 Dec 1998 11:44:57 GMT
From: mingtian@hanmail.net (Gilly)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <368ac0ad.1337787@usenet.kornet21.net>

:++ :<!-- So, what - - > about this then? -->
:++ 
:++ if both '- - >' and '-->' are valid then which is the closing tag?
:
:
:Neither.

then it's not a coment :)

@}`,--- ">#F([%Tg%e)`  #me  %M%o(`
ICQ: 15668514


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

Date: Tue, 29 Dec 1998 11:43:30 GMT
From: mingtian@hanmail.net (Gilly)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <3688c036.1219019@usenet.kornet21.net>

:<!-- So, what <!-- --> about this then? -->

why do you put -- before --> ? :)

@}`,--- ">#F([%Tg%e)`  #me  %M%o(`
ICQ: 15668514


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

Date: Tue, 29 Dec 1998 11:43:46 GMT
From: mingtian@hanmail.net (Gilly)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <3689c06a.1270467@usenet.kornet21.net>

:> s/<!\s*--.*?--\s*>//gs;
:      ^^^
:
:According to the excerpt you just posted from the HTML spec, whitespace
:is not allowed between the "<!" and the initial "--".  :-)

aha :)

@}`,--- ">#F([%Tg%e)`  #me  %M%o(`
ICQ: 15668514


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

Date: Tue, 29 Dec 1998 10:19:49 GMT
From: dave@mag-sol.com
Subject: Re: Removal of NULL's
Message-Id: <76aac4$a32$1@nnrp1.dejanews.com>

In article <3687DDC5.4563B4DC@santoroj.demon.co.uk>,
  Joe Santoro <joe@santoroj.demon.co.uk> wrote:
> This is a multi-part message in MIME format.

Please don't do that. Usenet is a *text* medium.

> Hi,
>
> I have a number of files which have NULL's in them
>
> i.e.
>
> 1234.ABCD.NULLNULLNULL  NULL.5678
>
> How do I remove just the NULL's from the files ?

Why don't you post what you have so far and point out where it's not doing
what you think it should do?

Some hints...

perldoc perlop (look for the input operators and the substitution operator).

hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 30 Dec 1998 00:12:40 +1100
From: "Cool" <dusty@hofffmain.com>
Subject: Re: Thank You everyone :)...
Message-Id: <76a8b7$76j$1@reader1.reader.news.ozemail.net>

Thanks for all your help everyone.

:)  (gives the crowd two thumbs up.)


Cool wrote in message <767f6q$s3l$1@reader1.reader.news.ozemail.net>...
>I have text sitting in file.
>
>What I need to do is delete everything before a certain word. i.e
>





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

Date: Tue, 29 Dec 1998 10:14:54 GMT
From: dave@mag-sol.com
Subject: Re: When hashing won't work...
Message-Id: <76aa2t$9vh$1@nnrp1.dejanews.com>

In article <3687c3b8.3167392@nntp2.ba.best.com>,
  rick@marinweb.com wrote:
> I'm relatively new to Perl and there's a problem that's been bothering
> me for a while.  I wondered if there is a solution that I'm just not
> aware of...
>
> Being a good, perlish programmer, I use hashes for all kinds of cool
> things, like to keep track of items which I've seen, to see if a
> specific item is in a list, and so forth.
>
> Sometimes, though, when I want to do something like that, I can't
> because hash keys can only consist of certain characters.  For
> instance, I can't use a hash to do the above mentioned sorts of things
> with a list of email addresses... foo@bar.com will not work as a hash
> key.
>
> Is there a way around this kind of situation?
>
> Or do I have to skip the shortcut and just write the code?

You need to escape @ characters in strings or Perl will assume they denote an
array which it will attempt to interpolate.

Something like this will work...

$seen_email{'foo\@bar.com'} = 1;


hth,

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 09:10:38 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: When hashing won't work...
Message-Id: <x73e5zghsx.fsf@home.sysarch.com>

>>>>> "dhoward johnson's " == dave  <dave@mag-sol.com> writes:

  dhoward johnson's > You need to escape @ characters in strings or Perl
  dhoward johnson's > will assume they denote an array which it will
  dhoward johnson's > attempt to interpolate.

  dhoward johnson's > Something like this will work...

  dhoward johnson's > $seen_email{'foo\@bar.com'} = 1;

sure it will work, but it is redundant. either single quotes OR a \ will
suffice to quote the @.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Tue, 29 Dec 1998 12:37:03 GMT
From: dturley@pobox.com
Subject: Re: where to download the perl 5.0052.zip for win32 ??
Message-Id: <76aidg$g4d$1@nnrp1.dejanews.com>

In article <769o2j$s7o$1@nnrp1.dejanews.com>,
  targetmailinfo@yahoo.com wrote:
>
> If you do have any hints please let me know.

Well, you could go to www.perl.com and look at the windows section, and then
go to the reccomended link at www.activestate.com.

Or you could search DejaNews and find that the ActiveState URL is posted many
times a week.

Not sure why you instist on a .zip file. I find the self-installing .exe from
AS works just fine.

cheers,

david
> > The URL for the .zip file is:
> >
> > http://www.perl.com/CPAN/src/stable.zip
> >
> >
> > > Please tell me where can I download the perl 5.0052.zip file for NT4?? I
> have
> > > been perl.com many times but I cannot found the location.... I just found
> > > the x86perl50052.tar.gz which is seems not win32 file extension.
> > >
> > > I need the original perl not the activestate since I will use it with the
> > > mod_perl apache.
> >
>
> > Enjoy!
> >
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own
>


--
____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 14:16:11 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: where to download the perl 5.0052.zip for win32 ??
Message-Id: <76ao7b$d5$1@gellyfish.btinternet.com>

On Tue, 29 Dec 1998 05:07:35 GMT targetmailinfo@yahoo.com wrote:
> Dear Ronald,
> 
> The location you gave me is not the right one for NT4 since I have donwloaded
> it and run the configuate.exe and it reply me "the memory size is too large
> for NT" at my NT CMD :( .
> 

I dont know what you are running there - I dont think there are any *.exe
files in the source kit :)

> I have read the newsgroups most of them said we have to recompiling by our
> self ... :( why they cannot create a compilied verion like 5.004 :(
> 
> 

There is a compiled version of 5.00502 and it is available from ActiveState,
however from what you said in your previous post you seem to have ruled this
out.  I have no experience of using Apache/mod_perl on Win32 however I
would thought that you would have to compile your own Perl ( I know that
the Win32 Apache comes as a binary).  

I would check out ActivePerl anyway if you are not in a position to compile:

<URL:http://www.activestate.com/ActivePerl/>


It appears that some of your problem appears to be with the mod_perl bit -
you might be better advised to ask about what Perl you need in
comp.infosystems.www.servers.ms-windows

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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