[17321] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4743 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 27 14:05:42 2000

Date: Fri, 27 Oct 2000 11:05:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972669916-v9-i4743@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 27 Oct 2000     Volume: 9 Number: 4743

Today's topics:
    Re: 5.6 make test fails on solaris 8 <elaine@chaos.wustl.edu>
        A large multi-module? <lmoran@wtsg.com>
    Re: A large multi-module? nobull@mail.com
    Re: A large multi-module? (Peter Scott)
    Re: A large multi-module? <lmoran@wtsg.com>
    Re: A large multi-module? <lmoran@wtsg.com>
    Re: BerkeleyDB install problem <dwilgaREMOVE@mtholyoke.edu>
    Re: Bitreverse an integer (Anno Siegel)
        Can this be done ine Perl? <don@lclcan.com>
    Re: Can this be done ine Perl? nobull@mail.com
    Re: complex (for me anyway) rexexp <ren.maddox@tivoli.com>
    Re: complex (for me anyway) rexexp <ren.maddox@tivoli.com>
    Re: complex (for me anyway) rexexp <brondsem@my-deja.com>
        Detecting socket closure <fulko@wecan.com>
    Re: does the CPAN shell work in win32? pintihar@my-deja.com
    Re: First steps (Tad McClellan)
    Re: First steps (Tad McClellan)
    Re: First steps <xerxes_2k@my-deja.com>
        Function File::Recurse <clas.hortien@sap.com>
    Re: Function File::Recurse nobull@mail.com
    Re: Hilfe zu Penguin <Buntaro@gmx.de>
    Re: How can i find my ip? <tony_curtis32@yahoo.com>
    Re: How can i find my ip? </michael>
        How could post a HTML with images to newsgroup? <lukus@hongkong.com>
    Re: How could post a HTML with images to newsgroup? <dwilgaREMOVE@mtholyoke.edu>
    Re: How could post a HTML with images to newsgroup? <xzrgpnys@yvtugubhfrovm.pbz>
        how to print to a certian charcter number frank74@my-deja.com
    Re: how to print to a certian charcter number (Tad McClellan)
    Re: how to print to a certian charcter number nobull@mail.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 27 Oct 2000 17:46:37 GMT
From: "Elaine Ashton" <elaine@chaos.wustl.edu>
Subject: Re: 5.6 make test fails on solaris 8
Message-Id: <1cjK5.12803$AM5.241156@news1.nokia.com>

"Michael Galloway" <mgx@ornl.gov> wrote in message
news:39F88A69.E0508222@ornl.gov...
> i'm trying to build perl 5.6 on a solaris ultrasparc box using gcc. i
> configured perl with: sh Configure -Dcc='gcc -B/usr/ccs/bin/'

Try 'sh Configure -Dcc='gcc' -des' and see if you get the same results. I
haven't used the ccs/bin ld or as in quite some time since the gnu
equivalents work just fine.

> perl fails three tests:

It fails them because normally configure would skip these tests on Solaris
since itdoesn't come with the needed library [ http://www.sleepycat.org ]
so in the configuration you must have told it otherwise.

e.




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

Date: Fri, 27 Oct 2000 09:20:03 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: A large multi-module?
Message-Id: <930jvsgkmf6rkn3vqoi4jl4galf22hsal0@4ax.com>

--Is there a large module full of modules?

--sort of like the SUMO package for Xemacs, just puts everything
you're likely to need assuming you're not entirely certain what you
need?

--for instance I want LWP:Simple, and every blessed thing it need to
work.

--Just wondering.




"...mmmmm, pointy..." 
lmoran@wtsg.com


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

Date: 27 Oct 2000 17:45:28 +0100
From: nobull@mail.com
Subject: Re: A large multi-module?
Message-Id: <u966me5j2v.fsf@wcl-l.bham.ac.uk>

Lou Moran <lmoran@wtsg.com> writes:

> --Is there a large module full of modules?

Yep they are called "Bundles".

> --sort of like the SUMO package for Xemacs, just puts everything
> you're likely to need assuming you're not entirely certain what you
> need?
> 
> --for instance I want LWP:Simple, and every blessed thing it need to
> work.

Bundle::LWP

Of course bundles are only as accurate as the person who created them.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 27 Oct 2000 17:00:51 GMT
From: peter@PSDT.com (Peter Scott)
Subject: Re: A large multi-module?
Message-Id: <7xiK5.11331$q9.333904@news1.gvcl1.bc.home.com>

In article <930jvsgkmf6rkn3vqoi4jl4galf22hsal0@4ax.com>,
 Lou Moran <lmoran@wtsg.com> writes:
>--Is there a large module full of modules?

Yes, they're called Bundles.  perldoc CPAN.

>--sort of like the SUMO package for Xemacs, just puts everything
>you're likely to need assuming you're not entirely certain what you
>need?
>
>--for instance I want LWP:Simple, and every blessed thing it need to
>work.

If you use the CPAN module for installing modules, it will resolve dependencies
for modules that declare them.  LWP is one such.  To get "everything you're
likely to need" for LWP, including LWP::Simple, do:

	perl -MCPAN -e 'install Bundle::LWP'

-- 
Peter Scott


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

Date: Fri, 27 Oct 2000 13:31:51 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: A large multi-module?
Message-Id: <mtejvsso2i3eic9704s41vhn885ku4h190@4ax.com>

On Fri, 27 Oct 2000 17:00:51 GMT, peter@PSDT.com (Peter Scott) wrote
wonderful things about sparkplugs:

--SNIP--

>  To get "everything you're
>likely to need" for LWP, including LWP::Simple, do:
>
>	perl -MCPAN -e 'install Bundle::LWP'

Excellent... Thanks much.  Now I can start writing perl code that
REALLY doesn't work and I can blame the modules... ;-|

 


"...mmmmm, pointy..." 
lmoran@wtsg.com


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

Date: Fri, 27 Oct 2000 13:44:14 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: A large multi-module?
Message-Id: <jmfjvscl16akmq1siqj5vugg6uenkjldgn@4ax.com>

On Fri, 27 Oct 2000 17:00:51 GMT, peter@PSDT.com (Peter Scott) wrote
wonderful things about sparkplugs:

>	perl -MCPAN -e 'install Bundle::LWP'

I'd also like to add Zounds! to my other post.


"...mmmmm, pointy..." 
lmoran@wtsg.com


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

Date: Fri, 27 Oct 2000 15:26:19 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: BerkeleyDB install problem
Message-Id: <dwilgaREMOVE-E04BCD.11263427102000@news.mtholyoke.edu>

In article <8t9j75$p5u$1@news.sovam.com>, "Roman Chumakov" <zfido88@zr.ru> 
wrote:

> Here is strange sting for me:
>        Note (probably harmless): No library found for -ldb
> May be this is a clue?

Yup, that's a clue allright. Try reinstalling BerkeleyDB with the 
1.x-compatibility mode turned on. That way, it will make the DB 1.x library 
that is needed by Perl and its modules.

Then, you have to make sure it gets into the correct path. By default, DB 
writes its libraries into an odd location (can't recall exactly where it is) 
which has little to do with the library paths of most Linux machines.

The statments above refer to DB 2.x, but are probably also true of 3.x. I have 
not installed 3.x, so I cannot say for certain.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: 27 Oct 2000 17:01:03 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Bitreverse an integer
Message-Id: <8tcccf$933$1@lublin.zrz.tu-berlin.de>

Bart Lateur  <bart.lateur@skynet.be> wrote in comp.lang.perl.misc:
>Is there a better way to bitreverse a number? For example, with a
>"register length" of 10 bits, 768 (0b1100000000, two highest bits of 10
>set) should be turned into 3 (0b0000000011, two lowest bits set), and
>vice versa. The highest bit of the source number becomes the lowest bit
>in the destination.
>
>These two methods seem to work, but they're pretty clumsy (IMO), let
>alone unmaintainable:
>
>	for (my $i=3; $i<1024; $i <<= 1) {
>	    printf "%4d\t%4d\t%4d\n", $i,  # source
>	      oct('0b' . unpack 'b10', pack 'v', $i),  # method 1
>	      unpack 'v', pack 'b10', sprintf '%010b', $i;  # method 2
>	}
>
>Isn't there a less obscure way?

Your method 2 suffers from what I think is a bug in unpack:
"unpack 'v', $str" returns an undefined value when $str is 0 or 1
bytes long, so when the number of bits to invert is < 9, it fails.

Sean McAfee has shown a crystal clear method: shift bits out
of the less significant end of the operand and shift them into the
less significant end of the result.  Hard to go wrong there.

Of course, looping over single bits doesn't seem to be particularly
fast. If we define its performance to be 1, Bart's methods perform
at 1.2 - 1.3.  (Benchmarks and code included below, if anyone is
interested.)

Using a lookup-table for byte-sized patterns speeds things up
a little. This works much like Sean's method, only you shift pre-
reversed bytes, not bits.  The unused bits on top of the highest
byte (if any) end up as the lowest bits in the reversed word.  So
the whole result must undergo a right shift by a quantity which
turns out to be 7 - (($size-1) % 8). This performs at 1.4.

Finally, we can apply the lookup-table without an explicit loop
when we let tr/// do the replacements.  This involves transferring
the bit pattern to a string (using vec()), applying tr///, reverse()-
ing the string, reading the integer result with another vec(), and
(as above) shifting the result.  Performance 1.8.

Oh, and we have lost most of the clarity on the way.  The (considerable,
see below) expense of building a table and eval-compiling the tr///
function don't seem worth the moderate gain.  I'd stick with Sean's
method.  If speed really counts, (get someone to) write an XS module.
Or, of course, don't do it in Perl.

Anno

Benchmark: timing 4096 iterations of Anno1, Anno2, Bart1, Bart2, Sean...
     Anno1:  1 wallclock secs ( 1.37 usr +  0.00 sys =  1.37 CPU) @ 2989.78/s (n=4096)
     Anno2:  1 wallclock secs ( 1.06 usr +  0.01 sys =  1.07 CPU) @ 3828.04/s (n=4096)
     Bart1:  2 wallclock secs ( 1.59 usr +  0.00 sys =  1.59 CPU) @ 2576.10/s (n=4096)
     Bart2:  2 wallclock secs ( 1.49 usr +  0.01 sys =  1.50 CPU) @ 2730.67/s (n=4096)
      Sean:  2 wallclock secs ( 1.95 usr +  0.00 sys =  1.95 CPU) @ 2100.51/s (n=4096)

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

#!/usr/bin/perl
use strict;
use warnings;

use Benchmark;

goto bench;

for ( 0 .. 2 ) {
  my $len = int rand 18;
  my $num = int rand 2 ** $len;
  my %results;
  $results{ Bart1} = reverse_bits_0( $num, $len);
  $results{ Bart2} = reverse_bits_3( $num, $len);
  $results{ Sean} =  reverse_bits_1( $num, $len);
  $results{ Anno1} =  reverse_bits_2( $num, $len);
  $results{ Anno2} =  reverse_bits_4( $num, $len);
  my @undefs = grep { not defined eval}
    qw( $results{Bart1} $results{Bart2} $results{Anno1} $results{Anno2} $results{Sean});
  print "undef: ", join( ', ', @undefs), "\n" if @undefs;
  print "len: $len\n";
  for ( sort keys %results) {
    printf "%-5s: %0${len}b -> %0${len}b\n", $_, $num, $results{ $_};
  }
  print "\n";
}
exit;

bench:
timethese( 1 << ( shift or 0), {
  Bart1 => 'my $l = int rand 32; reverse_bits_0( int rand 2**$l, $l)',
  Bart2 => 'my $l = int rand 32; reverse_bits_3( int rand 2**$l, $l)',
  Sean => 'my $l = int rand 32; reverse_bits_1( int rand 2**$l, $l)',
  Anno1 => 'my $l = int rand 32; reverse_bits_2( int rand 2**$l, $l)',
  Anno2 => 'my $l = int rand 32; reverse_bits_4( int rand 2**$l, $l)',
});


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

sub reverse_bits_0 { # From: Bart Lateur <bart.lateur@skynet.be>
  my( $num, $size) = @_;
  unpack "v", pack "b$size", sprintf "%0${size}b", $num;
}  

sub reverse_bits_3 { # From: Bart Lateur <bart.lateur@skynet.be>
  my ( $num, $len) = @_;
  oct('0b' . unpack "b$len", pack 'v', $num);
}

sub reverse_bits_1 { # From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
    my ($num, $size) = @_;
    my $result = 0;
    (($result <<= 1) |= $num & 1, $num) >>= 1 for 1 .. $size;
    $result;
}

BEGIN { my @reverse_table;
  for ( 0 .. 255 ) {
    $reverse_table[ $_] = reverse_bits_1( $_, 8);
  }
  my $byte_mask = 255;

  sub reverse_bits_2 { # Anno
    my ( $num, $size) = @_;
    my $result = 0;
    for ( 0 .. int(( $size - 1)/8 ) ) {
      $result <<= 8;
      $result |= $reverse_table[ $num & $byte_mask];
      $num >>= 8;
    }
    $result >>= ( 7 - ( ( $size - 1) % 8));
    $result;
  }

  my $reverse_str = join '', map chr $reverse_table[ $_], 0 .. 255;
  $reverse_str = quotemeta( $reverse_str);
  eval <<EOSUB;
  sub reverse_bits_4 { # Anno
    my ( \$num, \$size) = \@_;
    local \$_ = '';
    vec( \$_, 0, 32) = \$num;
    tr //$reverse_str/c;
    vec( reverse( \$_), 0, 32) >> ( 32 - \$size);
  }
EOSUB
  print "\n$@\n" if $@;
}


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

Date: Fri, 27 Oct 2000 12:43:05 -0400
From: Don <don@lclcan.com>
Subject: Can this be done ine Perl?
Message-Id: <39F9B099.AC64022B@lclcan.com>

This is a multi-part message in MIME format.
--------------74365CEB7FDA0EB3EBC9EECE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

I am wondering if the following can be done using perl:

My network consists of an internal server (data) and external server
(web site).  Users have access only to the external server as I am using
the FWTK.

My website (will) have a page that will retrieve information and present
it in a form.  When the user clicks on the "retrieve" button, I wish to
execute a Perl script on my web server which does the following,

- attempts to execute a program (non perl) on my internal server. It
will also pass a parameter to it.

- when my program on the internal server finishes, it will pass
information back to my perl script in the form ofan array or a hash.
Perl will then process the information and present it back to the user.

Thanks,
Don

--------------74365CEB7FDA0EB3EBC9EECE
Content-Type: text/x-vcard; charset=us-ascii;
 name="don.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Don
Content-Disposition: attachment;
 filename="don.vcf"

begin:vcard 
n:Proshetsky;Don
tel;pager:n/a
tel;cell:416-605-5908
tel;fax:416-733-1475
tel;home:416-733-3733
tel;work:416-665-1726
x-mozilla-html:FALSE
url:www.lclcan.com
org:LCL Navigation;Novonet Data Systems
version:2.1
email;internet:don@lclcan.com
title:Systems Administrator
adr;quoted-printable:;;4711 Yonge St., Suite 1102=0D=0A;Toronto;Ontario;M2N 6K8;Canada
fn:Don Proshetsky
end:vcard

--------------74365CEB7FDA0EB3EBC9EECE--



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

Date: 27 Oct 2000 18:27:10 +0100
From: nobull@mail.com
Subject: Re: Can this be done ine Perl?
Message-Id: <u9zojq42kx.fsf@wcl-l.bham.ac.uk>

Don <don@lclcan.com> writes:

> Subject: Re: Can this be done ine Perl?

Subject line contians no useful information.  Please think about your subject
line.

> My network consists of an internal server (data) and external server
> (web site).  Users have access only to the external server as I am using
> the FWTK.
> 
> My website (will) have a page that will retrieve information and present
> it in a form.  When the user clicks on the "retrieve" button, I wish to
> execute a Perl script on my web server which does the following,
> 
> - attempts to execute a program (non perl) on my internal server. It
> will also pass a parameter to it.
> 
> - when my program on the internal server finishes, it will pass
> information back to my perl script in the form ofan array or a hash.
> Perl will then process the information and present it back to the user.

No problem.  That's exactlu what Perl was invented for, it is a "glue"
language.

You will have, of course, to find some protocol to allow programs on
the external server to launch programs on the intenal server without
compromising security.  One possible choice would be HTTP.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 26 Oct 2000 22:06:54 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: complex (for me anyway) rexexp
Message-Id: <m366mfq8xd.fsf@dhcp11-177.support.tivoli.com>

Ian Boreham <ianb@ot.com.au> writes:

> Dave Brondsema wrote:
> 
And I, Ren Maddox, wrote this line:
> > > s/(print[^;]*;)/(my$x=$1)=~s!, ! . !g;$x/eg
> >
> >
> > doesn't look like anything happened
> 
> The embedded substitution is expecting a space after the comma. It should
> be omitted or made optional.

I thought about changing that, but decided to follow the OP's spec
more precisely.  I figured that since I wasn't going to handle the
fact that a string or other structure could contain commas or
semicolons and through this way off, I might as well stick to the
precise specification of replacing ", " with " . ".

-- 
Ren Maddox
ren@tivoli.com


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

Date: 27 Oct 2000 09:25:48 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: complex (for me anyway) rexexp
Message-Id: <m3g0litl77.fsf@dhcp11-177.support.tivoli.com>

Dave Brondsema <brondsem@my-deja.com> writes:

> In article <m3zojsqk7k.fsf@dhcp11-177.support.tivoli.com>,
>   Ren Maddox <ren.maddox@tivoli.com> wrote:
> > Dave Brondsema <brondsem@my-deja.com> writes:
> >
> > > I have a string and I want to change every ", " to " . " if
> the ", " is
> > > between "print" and ";".  I have some experience with regexps, but I
> > > haven't done anything like this before.
> >
> > Here's a quick-and-dirty solution...
> >
> > s/(print[^;]*;)/(my$x=$1)=~s!, ! . !g;$x/eg
> 
> DATA:
> 	print qq(<tr>
> 	<td><a href=\"hitcounting.pl?givenpage=),
> 		$myactivity[$i],
> 		urlformat($myactivity[$i]),
> 	qq(\">$myactivity[$i]</a></td>
> 	<td>$myactivity[$i+1]</td>
> 	<td>$myactivity[$i+2]</td>
> 	</tr>);
> OUTPUT:
> 	print qq(<tr>
> 	<td><a href=\"hitcounting.pl?givenpage=),
> 		$myactivity[$i],
> 		urlformat($myactivity[$i]),
> 	qq(\">$myactivity[$i]</a></td>
> 	<td>$myactivity[$i+1]</td>
> 	<td>$myactivity[$i+2]</td>
> 	</tr>);
> 
> 
> doesn't look like anything happened

Did you expect something to happen?  You said you wanted to change all
occurrences of ", " to " . ".  Do you see any occurrences of ", " in
that input data?  I don't.  If you don't want to require a space after
the comma, the regex will need to be adjusted to indicate that.
Normally, I might have written it that way, but you specifically asked
it to change ", " to " . ".

By the way, out of curiosity, why are you wanting to change these
commas to periods?

-- 
Ren Maddox
ren@tivoli.com


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

Date: Fri, 27 Oct 2000 17:50:52 GMT
From: Dave Brondsema <brondsem@my-deja.com>
Subject: Re: complex (for me anyway) rexexp
Message-Id: <8tcf9p$2a$1@nnrp1.deja.com>

In article <m3g0litl77.fsf@dhcp11-177.support.tivoli.com>,
  Ren Maddox <ren.maddox@tivoli.com> wrote:
> Dave Brondsema <brondsem@my-deja.com> writes:
>
> > In article <m3zojsqk7k.fsf@dhcp11-177.support.tivoli.com>,
> >   Ren Maddox <ren.maddox@tivoli.com> wrote:
> > > Dave Brondsema <brondsem@my-deja.com> writes:
> > >
> > > > I have a string and I want to change every ", " to " . " if
> > the ", " is
> > > > between "print" and ";".  I have some experience with regexps,
but I
> > > > haven't done anything like this before.
> > >
> > > Here's a quick-and-dirty solution...
> > >
> > > s/(print[^;]*;)/(my$x=$1)=~s!, ! . !g;$x/eg
> >
> > DATA:
> > 	print qq(<tr>
> > 	<td><a href=\"hitcounting.pl?givenpage=),
> > 		$myactivity[$i],
> > 		urlformat($myactivity[$i]),
> > 	qq(\">$myactivity[$i]</a></td>
> > 	<td>$myactivity[$i+1]</td>
> > 	<td>$myactivity[$i+2]</td>
> > 	</tr>);
> > OUTPUT:
> > 	print qq(<tr>
> > 	<td><a href=\"hitcounting.pl?givenpage=),
> > 		$myactivity[$i],
> > 		urlformat($myactivity[$i]),
> > 	qq(\">$myactivity[$i]</a></td>
> > 	<td>$myactivity[$i+1]</td>
> > 	<td>$myactivity[$i+2]</td>
> > 	</tr>);
> >
> >
> > doesn't look like anything happened
>
> Did you expect something to happen?  You said you wanted to change all
> occurrences of ", " to " . ".  Do you see any occurrences of ", " in
> that input data?  I don't.  If you don't want to require a space after
> the comma, the regex will need to be adjusted to indicate that.
> Normally, I might have written it that way, but you specifically asked
> it to change ", " to " . ".

Yeah, you guys are right here.  When I first posted, I didn't realize
that often list of items to print were on several lines.  But I've got
it working now.

>
> By the way, out of curiosity, why are you wanting to change these
> commas to periods?

I open a file and load a perl script into a string.  I change all
the "print " to "$htmlcontent .= ".  I change the commas to periods in
the print statements.  I eval the string.  I take $htmlcontent and make
some further modifications and then print it to the browser.

It's more complex than that, but that's the basic concept.

>
> --
> Ren Maddox
> ren@tivoli.com
>

--
Dave Brondsema


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


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

Date: Fri, 27 Oct 2000 11:17:57 -0400
From: Fulko Hew <fulko@wecan.com>
Subject: Detecting socket closure
Message-Id: <39F99CA5.167E@wecan.com>

I am fighting with a problem w.r.t. detecting when a remote end
of a socket has closed on me.

Me         Him

   <------ data
   <------ close
data ----->
      |
   <---  sorry socket was closed

I assumed that send() would return undef under this condition. It doesn't.


   unless (defined(send($socket, $string, 0))) {
        print "write returning error\n";
        return 1;
   }

I try doing a select for error conditons first. It returns no errors.

    my ($ein, $eout) = '';
    vec($ein, fileno($self->{_socket}), 1) = 1;
    select(undef, undef, $eout=$ein, 0);
    if (vec($eout, fileno($self->{_socket}), 1)) { # returns if the socket was closed
         return CLOSED;
    }
    return 0;




What to do?


-----------------------------------------------------------------------
Fulko Hew,                           Voice:  905-333-6000  x 6010
Senior Engineering Designer,         Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.        Fax:    905-333-6050
777 Walkers Line,                    Home:   fulko%fkhew@wecan.com
Burlington, Ontario, Canada, L7N 2G1 Work:   fulko@wecan.com


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

Date: Fri, 27 Oct 2000 15:30:49 GMT
From: pintihar@my-deja.com
Subject: Re: does the CPAN shell work in win32?
Message-Id: <8tc739$oeg$1@nnrp1.deja.com>

let me clarify a few things. I am starting with a fresh install of
Activestate perl 5.6. I am using Cygwin and the configuration of
"perl -MCPAN -e shell" completes without errors or warnings. When I try
to "install Bundle::CPAN" I get this error:

Subroutine new redefined at C:/Perl/site/lib/LWP\UserAgent.pm line 116,
<FIN> line 1.

Does anyone have experiance with this method of accessing CPAN using
ActiveState Perl?

thanks again.

In article <8tbohj$jjc$1@magnum.mmm.com>,
  cdemaeyer1@mmm.com (CDM) wrote:
> Maybe a good idea is to have Cygwin installed so the GNU utilities
(tar,
> gzip, make) are available...
>
> <pintihar@mail.com> wrote in message news:8t9ukt$up5
$1@nnrp1.deja.com...
> > It seems that there are many modules available in CPAN which are not
> > available through ppm. Does anyone know how to get "perl -MCPAN -e
> > shell" to work with activestate perl? (v5.6.0)
> >
> > thanks
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> Opinions expressed herein are my own and may not represent those of
my employer.
>
>


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


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

Date: Fri, 27 Oct 2000 09:18:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: First steps
Message-Id: <slrn8vj05b.jig.tadmc@magna.metronet.com>

On 27 Oct 2000 10:11:17 GMT, Bernard El-Hagin 
   <bernard.el-hagin@lido-tech.net> wrote:
>On Fri, 27 Oct 2000 09:53:37 GMT, arse <xerxes_2k@my-deja.com> wrote:
>>do you have ~!/usr/bin/perl -w
>
>That should read:
>
>#!/usr/bin/perl -w


We are talking about a forms-processing CGI program here.

So that isn't correct either. That should read:

   #!/usr/bin/perl -wT



perldoc perlrun
perldoc perlsec


You're asking for trouble if you don't use taint checking 
for forms processing...


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


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

Date: Fri, 27 Oct 2000 09:24:45 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: First steps
Message-Id: <slrn8vj0gt.jig.tadmc@magna.metronet.com>

On 27 Oct 2000 09:33:56 GMT, Bernard El-Hagin 
   <bernard.el-hagin@lido-tech.net> wrote:
>On Fri, 27 Oct 2000 10:20:10 +0100, Fraser Chalmers
><fraser.chalmers@ncl.ac.uk> wrote:

>>all the browser does is offer to download the perl script
>>mentioned in the action tag.

>>Got a feeling I'm missing something crucial but dunno

>This has nothing whatsoever to do with Perl thus is not appropriate to
>this newsgroup.


True enough. But it also helps the OP not one whit.

We should be gracious enough to point to the correct place
when someone wanders into the wrong place.



Fraser,

Your problem is related to how your web server is set up.

We talk about Perl here, not server setup.

You should ask your sysadmin/ISP/webmaster how to run CGI
programs on the setup they have implemented, or ask in a
newsgroup about servers, such as:

      comp.infosystems.www.servers.mac
      comp.infosystems.www.servers.misc
      comp.infosystems.www.servers.ms-windows
      comp.infosystems.www.servers.unix


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


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

Date: Fri, 27 Oct 2000 15:09:39 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: First steps
Message-Id: <8tc5rc$n8q$1@nnrp1.deja.com>

this is not neceesarily to do with serve setup. ive hand this problem
loads of time due to errors in my scripts.
and had scripts working at the same time on the same server

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


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


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

Date: Fri, 27 Oct 2000 17:24:24 +0200
From: "Clas Hortien" <clas.hortien@sap.com>
Subject: Function File::Recurse
Message-Id: <8tc6n6$b95$1@news1.wdf.sap-ag.de>

Hello,

i found the function File:Recurse and I want to use it. I found the
documentation but the function is not accessible.

I'm using:
perl, v5.6.0 built for MSWin32-x86-multi-thread

Documentation on:
http://www.activestate.com/Products/ActivePerl/docs/site/lib/File/Recurse.ht
ml

I want to use a small programm like this:

#-------------------------------------------------
$some_dir = "d:\\";
use File::Recurse;

$MAX_DEPTH=0;
recurse(\&process, $some_dir);

sub process
{
 print "$_ \n";
}
#-------------------------------------------------

Can anyone tell me, where I can find this function or how i scan though a
directory recursive and perform a action on the found files ?

Thx

  Clas




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

Date: 27 Oct 2000 18:28:37 +0100
From: nobull@mail.com
Subject: Re: Function File::Recurse
Message-Id: <u9y9za42ii.fsf@wcl-l.bham.ac.uk>

"Clas Hortien" <clas.hortien@sap.com> writes:

> Hello,
> 
> i found the function File:Recurse and I want to use it. I found the
> documentation but the function is not accessible.

Perhaps you should use File::Find instead since this is shipped as
standard with all versions of Perl.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 27 Oct 2000 12:50:10 -0500
From: Lie Wynn <Buntaro@gmx.de>
Subject: Re: Hilfe zu Penguin
Message-Id: <MPG.1463dd15db8d6c20989684@news1.premium-news.de>


> Penguin::Easy might be created for you :)
> 
> HTH,
> 
> Michel.
> 

Sorry for the german post and thanks for the help

by


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

Date: 27 Oct 2000 09:02:34 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: How can i find my ip?
Message-Id: <87d7gmqt51.fsf@limey.hpcc.uh.edu>

>> On Fri, 27 Oct 2000 12:08:32 +0200,
>> "Nathan Going" <nathangoing@yahoo.com> said:

> How do i discover my internet ip address?  

A simple answer is 127.0.0.1, but...

which address?  You've probably got at least 2.

Perhaps if you tell us what you really want to achieve,
it'll be clearer what the best perl solution is.

hth
t
--
Eih bennek, eih blavek.


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

Date: Fri, 27 Oct 2000 13:23:16 -0400
From: </michael>
Subject: Re: How can i find my ip?
Message-Id: <ibejvsssvo7lmu1bfn3gh3j6mdt94aiv8d@4ax.com>

Ipconfig at the dos prompt


On Fri, 27 Oct 2000 12:08:32 +0200, "Nathan Going"
<nathangoing@yahoo.com> wrote:

>How do i discover my internet ip address?
>
>
>



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

Date: Sat, 28 Oct 2000 01:09:16 +0800
From: "Lucas Gump" <lukus@hongkong.com>
Subject: How could post a HTML with images to newsgroup?
Message-Id: <8tccqd$r6g6@imsp212.netvigator.com>

I know MIME::Lite could let people send a HTML mail with images attched.
So how about posting news to newsgroup?

Thanks very much.




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

Date: Fri, 27 Oct 2000 17:29:13 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: How could post a HTML with images to newsgroup?
Message-Id: <dwilgaREMOVE-730414.13292927102000@news.mtholyoke.edu>

In article <8tccqd$r6g6@imsp212.netvigator.com>, "Lucas Gump" 
<lukus@hongkong.com> wrote:

> I know MIME::Lite could let people send a HTML mail with images attched.
> So how about posting news to newsgroup?

If you do this, you are guaranteed to get lots of flames. Posting images 
anywhere but in the alt.* newsgroups is considered by many to be bad 
netiquette. Even posting HTML (as opposed to raw text) is often considered to 
be bad form.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: 27 Oct 2000 17:55:33 GMT
From: kevin metcalf <xzrgpnys@yvtugubhfrovm.pbz>
Subject: Re: How could post a HTML with images to newsgroup?
Message-Id: <39F9C219.D3CD9F1F@yvtugubhfrovm.pbz>

Lucas Gump wrote:
> 
> I know MIME::Lite could let people send a HTML mail with images attched.
> So how about posting news to newsgroup?
> 
> Thanks very much.

I'll try not to flame you.  Newsgroups have been around a lot longer
then the web.  In those days, I always used what's called a "Dumb
Terminal."  They don't have the ability to display graphics.  When I
would use a 300 baud modem to download the text, I would get irritated
when people would include too much of the previous posts because they
REALLY slowed down the connection!!!  Anyway, if you do this here, kiss
your posting days goodbye.  Everyone will put you in a killfile and you
won't have anyone to listen to you.  However, if you wish to post
graphics into (say) and alt.binaries.* why not go ask them?

--
email: xzrgpnys@yvtugubhfrovm.pbz
Huh?  http://www.flactem.com/utils/rot13.html


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

Date: Fri, 27 Oct 2000 13:54:06 GMT
From: frank74@my-deja.com
Subject: how to print to a certian charcter number
Message-Id: <8tc1dq$j62$1@nnrp1.deja.com>

I have a file that I want to print a value to a certain character
position. Each line in my file is a new record, first I am searching
through the first five characters of each line to find a match to the
five characters entered by the user.  When a match is found the user is
directed to the correct web page.  At this time I need to print a one
character value of "Y" to the 30th character of that record(this sets
my password used flag to yes).  The current value in the 30th character
is "N", any ideas how I can specify to print the "Y" character in the
30th character position of the record, and remove the "N".  I can't use
a replace function on the "N" as there may be several "N"'s in the
record.

Any help would be greatly appreciated,
Thanks
Frank


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


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

Date: Fri, 27 Oct 2000 09:54:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how to print to a certian charcter number
Message-Id: <slrn8vj28v.jlc.tadmc@magna.metronet.com>

On Fri, 27 Oct 2000 13:54:06 GMT, frank74@my-deja.com 
   <frank74@my-deja.com> wrote:
>I have a file that I want to print a value to a certain character
>position. 


   perldoc -f substr


>Each line in my file is a new record, first I am searching
>through the first five characters of each line to find a match to the
>five characters entered by the user.  


   if ( substr( $line, 0, 5) eq $entered_by_user ) {


>The current value in the 30th character
>is "N", any ideas how I can specify to print the "Y" character in the
>30th character position of the record, and remove the "N".


   substr($line, 30, 1) = 'Y';
   print $line;


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


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

Date: 27 Oct 2000 17:47:35 +0100
From: nobull@mail.com
Subject: Re: how to print to a certian charcter number
Message-Id: <u94s1y5izc.fsf@wcl-l.bham.ac.uk>

frank74@my-deja.com writes:

> How I can specify to print the "Y" character in the
> 30th character position of the record

substr($record,29,1)='Y';

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

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


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