[12388] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5987 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 14 12:07:35 1999

Date: Mon, 14 Jun 99 09:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 14 Jun 1999     Volume: 8 Number: 5987

Today's topics:
    Re: a simple search and replace <swiftkid@bigfoot.com>
        a thread on threads <gbartels@xli.com>
    Re: can i variably name an array? <swiftkid@bigfoot.com>
    Re: Dynamic Regular Expression <tchrist@mox.perl.com>
    Re: Emailing Binary Files <swiftkid@bigfoot.com>
    Re: expat XML parser pschon2@my-deja.com
    Re: Extract file name from path <swiftkid@bigfoot.com>
        FancyIndex on old apache 1.2.6 (David Efflandt)
    Re: FancyIndex on old apache 1.2.6 (Malcolm Ray)
    Re: FancyIndex on old apache 1.2.6 <gellyfish@gellyfish.com>
    Re: Form Redirection <davidf@gaylordusa.com>
    Re: Form Redirection <gellyfish@gellyfish.com>
    Re: How to query a table on Win32 <swiftkid@bigfoot.com>
    Re: macperl - directory names with embedded spaces (J. Moreno)
    Re: Match pattern - urgent <gellyfish@gellyfish.com>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Opening list of files in active perl <paul.bunkham@synetica.com>
    Re: Parellel operation <gellyfish@gellyfish.com>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl "constructors" <jdporter@min.net>
    Re: perl cgi and apache <swiftkid@bigfoot.com>
        pipe question <swiftkid@bigfoot.com>
    Re: run .bat using WIN 32 perl <swiftkid@bigfoot.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 8 Jun 1999 19:40:14 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: a simple search and replace
Message-Id: <7jkd99$2qe4@proxy.cyber.net.pk>

try

open FILE , "bond.html";
    $content = join '' , <FILE>;
close FILE;

$content =~ s/<p><strong>/<p>/gi;

open FILE , ">bond.html";
    print FILE $content;
close FILE;

milan andric <m-andric@students.uiuc.edu> wrote in message
news:Pine.SOL.3.96.990608092846.18412B-100000@ux11.cso.uiuc.edu...
>
>i'm having problems with a simple regular expression to globally
>substitute a string in a file.
>
>i'm trying:
>
>      open (INDEXIN, ">>bond.html") || die "Can't open file: $!\n";
>             while ($line=<INDEXIN>) {
>                        $line=~ s/<p><strong>/<p>/g;
>                   }
>
>        close (INDEXIN);
>
>this should simply do a global replace of all the instances of <p><strong>
>with <p>.  but it doesn't seem to do anything.  if i change the
>>>(append) to a > (write over) i end up with an empty file.
>
>i don't get it
>
>-milan
><m-andric@uiuc.edu>
>




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

Date: Mon, 14 Jun 1999 10:44:19 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: a thread on threads
Message-Id: <37651543.2299184D@xli.com>

Can anyone give me the lowdown on threading in perl?
last perl installation I did prompted me as to
whether I wanted to use threads or not, and that
threading was still experimental/not stable.
this was about a month or so ago.

is there an URL I could go read up on the 
current status of threads? who's working on
it? how portable will it be? what will
threads allow me to do exactly? etc?

I'm working on a problem that seems might
be well easily solved by threads, if I 
understand what threads will be able to do.

Greg


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

Date: Tue, 8 Jun 1999 19:25:35 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: can i variably name an array?
Message-Id: <7jkcdp$2qe3@proxy.cyber.net.pk>

$array = "cool scalar";

@array = qw/my hot array/;

print $array;
print "\n";
print $array[0];


(In short, you can use same named scalar and array)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877
<mikecard@my-deja.com> wrote in message news:7jj4r4$kbs$1@nnrp1.deja.com...
>hello
>
>is it possible to give an array an interpolated name?
>
>suppose i have
>
> $array_name = "mikes_array";
>
>now i want to use the scalar $array_name to create an array
>@mikes_array.
>
>i have looked in the books and in this ng and tried many different
>things one of them being @$array_name (which i knew wouldnt work because
>it was just too ugly).
>
>is this possible or am i just dreaming.
>
>mike cardeiro
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.




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

Date: 14 Jun 1999 09:01:46 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Dynamic Regular Expression
Message-Id: <3765195a@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    Christoph Schmitz <cschmitz@stud.informatik.uni-trier.de> writes:
:	$subtext = 'sub { $_ = shift; return (/a/ && /b/); }'
:                                             ^^^ insert your stuff here
:	$coderef = eval $subtext;
:	while (<>) {
:		print if $coderef->($_);
:	}
:

Per usual, I see no reason for an eval().

--tom
-- 
    "What is the sound of Perl?  Is it not the sound of a wall that
     people have stopped banging their heads against?"
		--Larry Wall in <1992Aug26.184221.29627@netlabs.com>


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

Date: Thu, 10 Jun 1999 13:36:20 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Emailing Binary Files
Message-Id: <7jp0n2$8p61@proxy.cyber.net.pk>

Try Mime::Entity

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877
<rad91@my-deja.com> wrote in message news:7jn227$3mf$1@nnrp1.deja.com...
>I'm interested in a module/technique I can use to email binary files.
>I assume that I would first have to encode the file to base64.  Is that
>correct?  How would I do that?  Your help would really be appreciated.
>
>Email:  radiaz@us.oracle.com
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.




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

Date: Mon, 14 Jun 1999 14:52:00 GMT
From: pschon2@my-deja.com
Subject: Re: expat XML parser
Message-Id: <7k34ua$qjs$1@nnrp1.deja.com>

In article <375ff259.0@nnrp1.news.uk.psi.net>,
  "Simon Kerr" <skerr@ryder.co.uk> wrote:
> Hi there, I'm trying to find a way to read the characters between the
start
> and end tags of an element.
>
> I'm using Perl to do this.  I think I may have to use
> XML_SetCharacterDataHandler.
>
> Can anyone help?

Hey, I am looking for help as well.  Here is what I have done to do what
I think you are asking:

(mind you this is very rough code)

use XML::Parser;
use Data::Dumper;
open(W,">del.txt");
open(W2,">del2.txt");


$p1 = new XML::Parser(Handlers => {Start => \&handle_start,Char  =>
\&handle_char});
$p1->parsefile('t.xml');
print W Dumper($p1);


sub handle_start {
	my($one,$two) = @_;
	print "$two\n" if $two eq "store";
	print W Dumper(@_);
	#print "@{@_[0]->{Context}}\n";
	#@{$one->{Context}}
}

sub handle_char {
	print "@_[1]\n";
	print W2 "\t@_[1]\n" if @_[0] eq "city";
}

exit;


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 8 Jun 1999 19:57:32 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Extract file name from path
Message-Id: <7jke9p$2qe5@proxy.cyber.net.pk>

$path = 'C:\dir1\dir2\dir3\file1.html';
$path =~ ?(.*)[\\/](.*)?;
$file = $2;

should work.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877
Piyush Jain <pjain@usol.com> wrote in message
news:375D5601.67D5F8AF@usol.com...
>Hello everyone,
>
>I have a situation where the path could either be from the UNIX or
>Windows machine of the form C:\dir1\dir2\dir3\file1.html
>
>I need to be able to read the file name file1.html into a variable. I am
>new to perl so any help or suggestions would be appreciated.
>
>Thanks,
>
>piyush




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

Date: 14 Jun 1999 13:20:45 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: FancyIndex on old apache 1.2.6
Message-Id: <slrn7ma02m.42i.efflandt@efflandt.xnet.com>

Apache doesn't have the docs up anymore for 1.2 versions (I know it is
old, but it is a free host).  What directive do I use in .htaccess for
that apache version to get an ftp like default listing of files if there
is no default index?

It will display HEADER.html, but with or without that file, the rest of
the page is just a broken image with expected column titles, but no files
are listed.  Permissions for files in the directory are 644(txt) or 755
(cgi) and if I put an index.html there, links to the files from there do
work.

I tried:
IndexOptions FancyIndexing  (no difference)

IndexOptions FancyIndexing on  (server error)

FancyIndexing on  (server error - this is just for latest 1.3,x)

Note: This is virtualave.net which has a banner wrapper, so I do not know
if that is blocking something. 

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: 14 Jun 1999 15:28:28 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: FancyIndex on old apache 1.2.6
Message-Id: <slrn7ma7ss.rv5.M.Ray@carlova.ulcc.ac.uk>

On 14 Jun 1999 13:20:45 GMT, David Efflandt <efflandt@xnet.com> wrote:
>Apache doesn't have the docs up anymore for 1.2 versions (I know it is
>old, but it is a free host).  What directive do I use in .htaccess for
>that apache version to get an ftp like default listing of files if there
>is no default index?
>
>It will display HEADER.html, but with or without that file, the rest of
>the page is just a broken image with expected column titles, but no files
>are listed.  Permissions for files in the directory are 644(txt) or 755
>(cgi) and if I put an index.html there, links to the files from there do
>work.
>
>I tried:
>IndexOptions FancyIndexing  (no difference)
>
>IndexOptions FancyIndexing on  (server error)
>
>FancyIndexing on  (server error - this is just for latest 1.3,x)
>
>Note: This is virtualave.net which has a banner wrapper, so I do not know
>if that is blocking something. 

I can't imagine what you thought this question had to do with perl.
Try comp.infosystems.www.servers.unix.
-- 
Malcolm Ray                           University of London Computer Centre


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

Date: 14 Jun 1999 16:21:42 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: FancyIndex on old apache 1.2.6
Message-Id: <37651e06@newsread3.dircon.co.uk>

David Efflandt <efflandt@xnet.com> wrote:
> Apache doesn't have the docs up anymore for 1.2 versions (I know it is
> old, but it is a free host).  What directive do I use in .htaccess for
> that apache version to get an ftp like default listing of files if there
> is no default index?
> 
> 

I think you must have made a typo for comp.infosystems.www.servers.unix
when you entered the group.

/J\
-- 
"The most frightening thing on television since Anthea Turner revealed
she had a sister" - Suggs


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

Date: Mon, 14 Jun 1999 08:05:00 -0700
From: David <davidf@gaylordusa.com>
Subject: Re: Form Redirection
Message-Id: <37651A1C.B7701D62@gaylordusa.com>

Thanks, I like that javascript better than the form and it works with
both browsers.  I added a </FORM> (whoops) but that didn't make a
difference with IE.  It still didn't work.  Javascript works though and
it's a little smoother.  Thanks for help.

Marcel Grunauer wrote:
> 
> On Fri, 11 Jun 1999 11:46:05 -0700, David <davidf@gaylordusa.com>
> wrote:
> 
> >
> >    @pairs = split(/&/, $ENV{'QUERY_STRING'} ); # GET Method
> >
> >    foreach $pair (@pairs) {
> >        ($name, $value) = split(/=/, $pair);
> >
> >        $value =~ tr/+/ /;
> >        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> >        $name =~ tr/+/ /;
> >        $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> >
> >        $FORM{$name} = $value;
> >    }
> >
> >
> >    $location = $FORM{'URL'};       # Use the field named "URL".
> >    print "Location: $location\n\n";    # Voila!
> >
> 
> Wow, you're thorough in your crossposting.
> 
> There's no </FORM> tag on your page.
> 
> Also, you could write the above as:
> 
> use CGI qw(:standard);
> print redirect(param('URL'));
> 
> Although it does mean pulling in a large module.
> 
> Or (sorry for posting this in a Perl group), you could dispense with
> the script altogether and use JavaScript:
> 
> <SELECT onchange="if (this.selectedIndex > 0) {
> window.location.href=this.options[this.selectedIndex].value; }">
> 
> HTH
> 
> Marcel


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

Date: 14 Jun 1999 16:10:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Form Redirection
Message-Id: <37651b4c@newsread3.dircon.co.uk>

David <davidf@gaylordusa.com> wrote:
> Thanks, I like that javascript better than the form and it works with
> both browsers.  

That sounds like "We play all kinds of music Country *and* Western".

/J\
-- 
"The teenage masturbators of today are the television executives of
tomorrow" - Melissa Cabriolet, Drop the Dead Donkey


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

Date: Wed, 9 Jun 1999 10:16:22 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: How to query a table on Win32
Message-Id: <7jm0js$2qe8@proxy.cyber.net.pk>

DBI is also available for Windows!

use PPM.

>PPM
>install DBI
>install DBD

etc.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877

<jbell1999@my-deja.com> wrote in message news:7jkigt$6mt$1@nnrp1.deja.com...
>Hi, all,
>
>Are there any existing modules that I can use
>as an interface to do some SQL on a table in .dbf
>format(dbaseIII), which do the similar job like
>DBI does on unix?  I'm using ActivePerl for WindowsNT.
>
>Many thanks.
>
>---
>Regards,
>Jim
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.




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

Date: Mon, 14 Jun 1999 11:16:32 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: macperl - directory names with embedded spaces
Message-Id: <1dtdz7t.ix0vs110o02ibN@roxboro0-0056.dyn.interpath.net>

Chris Nandor <pudge@pobox.com> wrote:

> bart.lateur@skynet.be (Bart Lateur) wrote:
> 
> # Tom Phoenix wrote:
> # 
> # >> How do I specify the path to a file where the some of the folder
> # >> (directory) names have embedded spaces?
> # >
> # >The same way as with any other file name. :-) 
> # >
> # >    my $file_name = "I've got spaces";
> # >    open FILE, $file_name
> # >       or die "Can't open '$file_name': $!";
> # >
> # >Well, I know that was the file name which had spaces in it, but it's the
> # >same principle. Have fun with Perl!
> # 
> # Problems will occur if your filename begin or end with spaces. That IS
> # legal on a Mac, and open() will strip them. Blimey. You then need to use
> # the more complex 3-parameter sysopen().
> 
> Same thing with Unix, and all other platforms that allow a filename to
> begin or end with spaces.
> 
> # But, actually, I don't think it's the spaces causing you trouble. I've
> # noticed that open() will NOT WORK if the filename or the folder path
> # contains a null byte. That too IS LEGAL on a Mac.
> 
> It is?  Hrm.  I thought nulls in filenames were illegal.  Do you have any
> docs on this?

Get TP 4.5 and run this program:

PROGRAM testnull;
   VAR
      s: str255;
      iErr, fRefNum: integer;
      count: longint;
BEGIN
   s := 'helllo';
   s[4] := char(0);
   count := 3;
   IF create(s, -1, 'MOJO', 'TEXT') = noerr THEN
      IF FSOpen(s, -1, fRefNum) = noerr THEN
         IF FSWrite(fRefNum, count, @s[1]) = noerr THEN
            iErr := FSClose(fRefNum);
END.

-- 
John Moreno


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

Date: 14 Jun 1999 16:03:25 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Match pattern - urgent
Message-Id: <376519bd@newsread3.dircon.co.uk>

Anzej Becan <anzej@skavt.net> wrote:
> 
>> > I tried with split, but I don't find the right match pattern:
>> i would use substr().
> Thanks, I tried with substr() and results are exactly the same as I want.
> 
> Now I have another question :-)
> Can I include in my script external file somewhere from web. I tried with:
> $ext_file="http://www.somewhere.com/doc/file.dat";

You will probably want to use the LWP::Simple module available from CPAN:

use LWP::Simple

$ext_file=get('http://www.somewhere.com/doc.file.dat');


/J\
-- 
"It's easier for a man to enter a camel is he stands on a box" -
Jonathan Creek


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

Date: 14 Jun 1999 15:48:53 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <7k3895$f1r$2@info2.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 07 Jun 1999 15:06:39 GMT and ending at
14 Jun 1999 19:45:18 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  304 (55.2% of all posters)
Articles: 460 (26.2% of all articles)
Volume generated: 784.1 kb (24.3% of total volume)
    - headers:    336.2 kb (6,800 lines)
    - bodies:     439.3 kb (14,774 lines)
    - original:   341.2 kb (11,975 lines)
    - signatures: 8.1 kb (198 lines)

Original Content Rating: 0.777

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 225 posters
    s:      1.3 posts
Message size: 1745.4 bytes
    - header:     748.5 bytes (14.8 lines)
    - body:       977.9 bytes (32.1 lines)
    - original:   759.4 bytes (26.0 lines)
    - signature:  18.0 bytes (0.4 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

    9    15.2 (  8.0/  7.2/  4.1)  "AEF" <aef@pangea.ca>
    8    12.7 (  7.0/  5.7/  2.9)  "kayec" <delete.the.nospam.kayec@gov.ns.ca>
    7     6.3 (  4.9/  1.4/  1.4)  "Lim Chong Sun" <chongsun@krdl.org.sg>
    7     8.1 (  4.8/  2.9/  1.4)  Ondrej Palkovsky <xpalo03@vse.cz>
    6    14.5 (  4.6/  9.9/  5.3)  "Ryan" <dfs@thegrid.net>
    6     6.7 (  3.3/  3.5/  2.1)  u970130@studbo.hit.no (Thomas Weholt)
    6    13.8 (  4.5/  9.0/  6.1)  deanh@nwnet.net
    5     7.2 (  4.2/  3.0/  2.5)  Brad Clawsie <bradclawsie@my-deja.com>
    5     6.7 (  3.7/  2.1/  1.3)  Raj Dutt <raj.dutt@voxel.net>
    5     5.7 (  3.7/  2.0/  2.0)  R . Joseph <streaking_pyro@my-deja.com>

These posters accounted for 3.6% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  36.5 (  1.5/ 34.9/ 33.1)      2  elklabone@my-deja.com
  19.8 (  1.8/ 18.0/ 16.5)      2  Antonio Gulli <gulli@ideare.com>
  17.0 (  0.7/ 16.3/  8.5)      1  "Markus" <hoefinger@iphos.com>
  15.2 (  8.0/  7.2/  4.1)      9  "AEF" <aef@pangea.ca>
  14.5 (  4.6/  9.9/  5.3)      6  "Ryan" <dfs@thegrid.net>
  13.8 (  4.5/  9.0/  6.1)      6  deanh@nwnet.net
  13.6 (  2.5/ 11.1/  6.8)      3  birgitt@my-deja.com
  12.7 (  7.0/  5.7/  2.9)      8  "kayec" <delete.the.nospam.kayec@gov.ns.ca>
  11.5 (  2.1/  9.4/  8.8)      3  Jessica Hwang <jhwang2@nortelnetworks.com>
   8.4 (  2.6/  5.9/  5.8)      3  "Ben Mullen" <brutal@greenbaynet.com>

These posters accounted for 5.1% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  2.5 /  2.5)      4  jrknoll <jknoll@ipt-inc.com>
1.000  (  3.0 /  3.0)      4  regurg <anonymous@web.remarq.com>
1.000  (  1.4 /  1.4)      7  "Lim Chong Sun" <chongsun@krdl.org.sg>
1.000  (  2.0 /  2.0)      5  R . Joseph <streaking_pyro@my-deja.com>
1.000  (  5.5 /  5.5)      3  "Lee Pasquali" <pasquali@uthscsa.edu>
1.000  (  0.6 /  0.6)      3  "Leonid Goltser" <leonid76@erols.com>
1.000  (  1.4 /  1.4)      3  "Bob Perini" <perini@buffalo.edu>
0.987  (  5.8 /  5.9)      3  "Ben Mullen" <brutal@greenbaynet.com>
0.945  (  3.6 /  3.8)      3  @cisco.com
0.943  (  8.8 /  9.4)      3  Jessica Hwang <jhwang2@nortelnetworks.com>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.532  (  0.9 /  1.7)      3  gerg@shell.ncal.verio.com (Greg Andrews)
0.514  (  2.9 /  5.7)      8  "kayec" <delete.the.nospam.kayec@gov.ns.ca>
0.486  (  1.4 /  2.9)      7  Ondrej Palkovsky <xpalo03@vse.cz>
0.446  (  1.4 /  3.0)      4  Tim <bie@connect.ab.ca>
0.443  (  1.0 /  2.2)      3  Janning Vygen <janning@vygen.de>
0.378  (  1.8 /  4.9)      4  "Ken Snyder" <ksnyde@msn.com>
0.350  (  1.5 /  4.4)      3  Nicholas Marchalleck <marchall@tampabay.rr.com>
0.291  (  0.4 /  1.5)      3  Clayton L . Scott <tex@engsoc.carleton.ca>
0.235  (  0.7 /  3.1)      3  thomas.distler@icn.siemens.de
0.216  (  1.2 /  5.4)      4  tapplega-just

38 posters (12%) had at least three posts.


Top 10 Crossposters
===================

Articles  Address
--------  -------

       5  David <davidf@gaylordusa.com>
       3  NightLight@webcity.nl.NOSPAM!!!!!! (Jeroen Kustermans)
       2  Christopher Mahmood <chris@oogabooga.worldhq.org>
       2  Don Cooper <dcooper@cts.com>
       2  nlucent <nlucent@my-deja.com>
       2  nico.wieland@ubs.com
       2  ynotssor@my-deja.com
       2  raquez@my-deja.com
       2  Scott Gifford <sgifford@tir.com>
       2  jay@powerdog.com


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

Date: Mon, 14 Jun 1999 16:54:07 +0100
From: Paul Bunkham <paul.bunkham@synetica.com>
Subject: Re: Opening list of files in active perl
Message-Id: <3765259F.43E6CB96@synetica.com>

Hampton Keathley wrote:
> I often write scripts to clean up or convert massive numbers of files in
> a directory. All my scripts that process several files at once don't
> work under
> active perl.
> 
> First question is why?
> 

I think that got answered with the fact that an emulation of the Unix
wild card system is no longer in the Win32 Perl distributions.  I wonder
why though, can someone give a response on that, as I thought the idea
of porting a language is that it contains as many cross-platform
features as possible, if it worked before, why isn't is still there?

> Most important question: what do I do to the following script to fix it?
> 
> I typically use the following:
> command line: perl script.pl *.txt
> 

Well, you could use the File::Find module, it allows you to basically
grab a list of files from a directory structure, with parsing the list
for *.txt files, for instance.  It would involve changing your code a
bit I should think, by parsing the input to find out what directory, and
the files to look for.  It should be a simple regular expression type
thing.

Have fun,

Paul.
-- 
*****************************************
Paul Bunkham
Developer
Synetica Knowledge Technologies
*****************************************


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

Date: 14 Jun 1999 15:59:22 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Parellel operation
Message-Id: <376518ca@newsread3.dircon.co.uk>

sherifhanna@my-deja.com wrote:
> I'm trying to write a Perl script where I want to spawn several
> processes, and have them run in parallel.
> 
> That is, I do not want Perl to stop at the point of execution, finish
> the subroutine, then continue. I want to run the subroutine while still
> executing the calling subroutine.
> 
> So if I am in process 1, and I spawn process 2 from process 1 at x
> seconds after execution, I want process 1 and process 2 to run in
> parallel.
> 
> How can I do that in Perl?
> Perl 5 on RedHat.
> 

You will probably want to use fork()

/J\
-- 
"My codpiece layeth awkwardly across the nadgers" - Declan Donnelly


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

Date: Mon, 14 Jun 1999 14:16:29 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7k32rk$pnv$1@nnrp1.deja.com>

In article <7k2aj4$iv9$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> Can you give an example of C++ code, and then the 1/10 equivalent Perl
> code so I can better understand the difference?

To better understand the difference, try to come up with a C++
solution to the following problem.  No need to post your answer;
just doing the exercise is enough.

Problem: write a function which takes one argument, a string,
and returns a function; the function returned should take one
argument, a string, and return the result of concatenating it
to the string which was passed to the first function.
In other words,
  F1(string1) -> F2, where
  F2(string2) -> concat( string1, string2 )

A Perl solution:

sub F1 {
  my( $string1 ) = @_;
  return sub {
    my( $string2 ) = @_;
    $string1 . $string2;
  };
}

# now try it:
$F2 = F1( "foo" );
print $F2->( "bar" ); # prints "foobar"

Many more such adventures are possible, with Perl as your guide.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 14 Jun 1999 14:34:27 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7k33ti$q4i$1@nnrp1.deja.com>

In article <7k2btb$jad$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> In article <7jjp3c$t9i$1@nnrp1.deja.com>,
>   John Porter <jdporter@min.net> wrote:
>
> > > > But you're telling me that
> > > > 	Foo x;
> > > > 	int* p = (int*) &x;
> > > > 	int i = *p;
> > > > is an error.  That's news to me.
> > >
> > > That is an error, absolutely.
> >
> > As it happens, it is not an error; absolutely not.
> > If you think it is, then you misunderstand the purpose and effect
> > of typecasting.  I got the above code to compile and run without
> > so much as a warning.
>
> It is an error. You would not want to assign Foo addresses to ints.
You
> would assign them to Foo pointers. Just because you can cast something
> into compiling does not mean that you are making an error, as you have
> aptly demonstrated.

You are (intentionally, no doubt) confusing two different kinds of
errors: syntax errors, which the compiler will choke on, and errors
of design.  We were not talking about the latter previously, and
to try to shift the discussion there now is disengenuous to say the
least.  The code above is not an error of the former sort, and that
is all that matters, for the purposes of this discussion.


> > > Int pointers should not point to Foo
> > > classes or structs, and that pointer should not
> > > later be dereferenced.
> >
> > "Should not" does not an error make.
> > The compiler assumed I knew what I really wanted to do.
>
> And you were in error. So the syntax you gave was incorrect code.

You can't say that, because you don't know what I wanted to do.
(And that's my fault, for not commenting the code.)
Casts such as this are entirely commonplace in systems programming.


> > > int *a;
> > > short b = 2;
> > > a = &b;
> >
> > I got a warning about incompatible pointer types; but no errors;
> > and the code ran fine.  This power is C's two-edged sword.
>
> You made the same mistake as another fellow, you compiled it as C
code.
> Try C++. Let me know what you find out.

C++ requires the cast to be explicit.
Fortunately, C++ doesn't stop me from doing what I want to do either.


> > Trace back through this thread and see why we were talking about
> > overloading in Perl in the first place.  It was quite incidental
> > to the argument.
>
> I only need to trace back to you saying we can't talk about things
added
> on to C++ that are not in the core language. You were cut with your
own
> "double edged sword".

Not mine; I don't use the "overload" module.
Overloading should be eschewed.
I am quite happy to talk only about things in the core of each
language, because I don't need "overload".


> > So if you're not interested in overloading in Perl, then by all
> > means, feel free not to read perldoc overload.
>
> This doesn't change the fact that you consider perl modules a part of
> Perl,

We can compare the cores of each language, or we can compare their
standard libraries.  Clearly it would be better for you to stress
the library support, since the C++ core is not good for much except
building libraries.


> ...and the Standard Template Library not a part of C++.

I fully favor the comparison of apples to apples, oranges to oranges.
Please don't impute to me any other attitude.


> I would gather there are quite a few Perl programmers not using
objects,

Not using Perl objects (perldoc -f bless), right.


> but you are very correct in pointing out that they should not fear any
> abstraction caused by the use of objects, as the Perl scalar
declaration
> itself already has them swimming in abstraction to begin with.

Quite so.  What's your point?

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 14 Jun 1999 14:47:09 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7k34la$qfp$1@nnrp1.deja.com>

In article <7k2btb$jad$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> I will be happy to repost the applicable comments "for all to see",
and
> encourage you to pay attention when you read it:
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > Variables in Perl (scalars, arrays, hashes) are, under the hood,
> > pointers to data structures; but the language "sugar-coats" the use
> > of these pointers.  So your objection here is null.  I was trying to
> > show how Perl works using C++ syntax.  I should perhaps have used
> > references, rather than pointers, to make my point, since that is
> > C++'s equivalent sugar-coating.
>
> Scalar variables in Perl (numbers, strings, references to
> (numbers,strings,hashes,arrays,objects)) are all identified the same.
>
> my $variable.
>
> This is not the same as C++ syntax. Nor is is that same as what takes
> place under the hood.
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


Here is the actual relevant extract, elided appropriately,
presented for your benefit, since I trust everyone else will
find it excruciatingly redundant:

John Porter wrote:
> > > Scalar* p = get_next();
>
> Variables in Perl (scalars, arrays, hashes) are, under the hood,
> pointers to data structures; but the
> language "sugar-coats" the use of these pointers.
> I was trying to show how Perl works using C++ syntax.

At no point did I say, state, suggest, or imply that

	my $variable;

is valid C++.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 8 Jun 1999 19:26:35 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: perl cgi and apache
Message-Id: <7jkcfl$2qc1@proxy.cyber.net.pk>

It is not

!#/usr/bin/perl

its

#!/usr/bin/perl

Make sure you have enabled CGI in:

/etc/httpd/conf/srm.conf

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877
fezzzza <fezzzza@yahoo.com> wrote in message
news:375d19a9.1968613@news.easynet.co.uk...
>
>
>Please help I cant seem to get my perl script running on apache on red
>hat 6.0 I get a server error
>
>on looking at the error logs I get a [error[ (2) no such file or
>directory :exec of /home/httpd/cgi-bin/hello.cgi failed
>
>I have set all the directorys and and to chmod 777 and inable the suid
>bit flag on perl.
>
>in the script the firslt line is !#/usr/bin/perl I have tried moving
>the perl file to the cgi-bin and chaing it to !#perl
>
>still the same error message I have swtiched on indexes and includes
>and FollowSysmlinks and ExecCGI in the access.conf and set up both
>a  AddHandler cgi-script .cgi and Addtype application/x-httpd-cgi .cgi
>
>or set them up as one or the other.
>
>I am a complete loss of what the probmlem might be
>
>Oh if I run on the command line
>
>perl /home/httpd/cgi-bin/hello.cgi it works fine
>
>As anyone got any ideas ???
>
>Thanks in advance




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

Date: Wed, 9 Jun 1999 13:10:53 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: pipe question
Message-Id: <7jmar2$2qc3@proxy.cyber.net.pk>

Is it possible that I call any application by pipe and some
text to it (via pipe) and read its output to stdout in a variable?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877




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

Date: Tue, 8 Jun 1999 19:24:14 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: run .bat using WIN 32 perl
Message-Id: <7jkcb8$2qe2@proxy.cyber.net.pk>

`c:\\autoexec.bat`;

system 'c:\autoexec.bat';

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift
ICQ: 4265451
FAX: (815) 846-2877

<nicolased@my-deja.com> wrote in message news:7jj57h$kgi$1@nnrp1.deja.com...
>I'm working with the Win 32 version of perl
>and I want tu run a .bat during my perl script
>
>I have tried the exec command
>but it works only with .exe
>
>Thanx,
>Nicolas
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.




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

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

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