[19054] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1249 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 5 09:05:50 2001

Date: Thu, 5 Jul 2001 06:05:11 -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: <994338311-v10-i1249@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 5 Jul 2001     Volume: 10 Number: 1249

Today's topics:
        Access Access <trevor.r.ward@blueyonder.co.uk>
    Re: calling a PERL script from Matlab (Peter J. Acklam)
    Re: can't build perl 5.6.1 under Win98 <randy@theory.uwinnipeg.ca>
    Re: clean up an array of references from references whi (Alexvalara)
    Re: clean up an array of references from references whi (Alexvalara)
    Re: clean up array from "holes"... (Alexvalara)
        Counting occurances on a line (Blstone77)
    Re: Counting occurances on a line <tom.melly@ccl.com>
    Re: cpan shell: remove or uninstall command <R.Zimmermann@uke.uni-hamburg.de>
    Re: Date Subtraction Routine <sb@mcasia.imperia.net>
    Re: FAQ 9.4:   How do I extract URLs? (BUCK NAKED1)
        Global variables (^CooL^)
        Help: Carriage Returns in strings <u9jdf@csc.liv.ac.uk>
    Re: Help: Carriage Returns in strings <peb@bms.umist.ac.uk>
    Re: Help: Carriage Returns in strings <u9jdf@csc.liv.ac.uk>
    Re: How to encrypt password for .htpasswd???? <gnarinn@hotmail.com>
    Re: How to encrypt password for .htpasswd???? <joachim.rose@psi.ch>
        I want to use Perl, not php. <cjr@tuks.co.za>
    Re: I want to use Perl, not php. <gnarinn@hotmail.com>
    Re: Keen, experienced, or improving Perl author require (Steve)
    Re: map/hash question, functional style <horst.fickenscher@sealsystems.de>
    Re: Net::Telnet logging on problem..... <yasser@x-unity-x.demon.co.uk>
    Re: Newbie question: What's the opposite of chop? <gnarinn@hotmail.com>
    Re: Perl 5.00503 vs. 5.00554 - what's the difference? <nospam-abuse@ilyaz.org>
        Re Counting occurances on a line <trevor.r.ward@blueyonder.co.uk>
    Re: Script permissions problem. <peb@bms.umist.ac.uk>
    Re: Sendmail <gnarinn@hotmail.com>
    Re: Text based menuing system in Perl with submenus??? (Rob Seegel)
    Re: two changes (Anno Siegel)
    Re: Vapo-Rub <whitetip@iprimus.com.au>
        XML handling on AIX <nomail@hursley.ibm.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 5 Jul 2001 13:16:03 +0100
From: "Trevor Ward" <trevor.r.ward@blueyonder.co.uk>
Subject: Access Access
Message-Id: <9i1lq5$nup14@eccws12.dearborn.ford.com>

Hi all

Well here is a question.

I have just been given an access mdb file.

Can I use perl to get at the data.

If so which module do I need to install (guess its dbi)
and how do I connect ?.

hope you can help.

cause I currently use either oracle or mysql without any problems.

thanks





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

Date: 05 Jul 2001 12:28:35 +0200
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: calling a PERL script from Matlab
Message-Id: <wk8zi3n091.fsf@math.uio.no>

steveaux@my-deja.com (Steve Miller) wrote:

> Background: I need to get Windows (NT and 98) to split a file
> for further processing by Matlab. On Unix, I just shell out and
> call split.

split exists for Windows too.  Get the Cygwin utilities from
http://sources.redhat.com/cygwin/.  Coming from a UNIX
environment, being used to powerful tools, I would be helplessly
lost on a PC without them.

> I have a perl script that emulates the Unix command of the same
> name. I'd like to shell out from Matlab (in Windows) and split
> the file, but I don't know the first thing about PERL.

The first thing about Perl is that it is spelt that way --
"Perl".  ;-)

> The first part of the script follows my signature. (I can send
> the whole thing if reequested.) What happens is:
> 
> » !perl split.pl -4800000 hnk.bin hnk 
> Can't locate strict.pm in @INC at split.pl line 12. 
> BEGIN failed--compilation aborted at split.pl line 12.
> 
> AFAIK, I have only the PERL that is included with Matlab on my
> machine.

That's the problem.  MATLAB is shipped with an incomplete version
of Perl.  What is shipped is just enough to be able to run the few
Perl scripts that are included in the MATLAB distribution.

> Am I calling this correctly?

You need to specify the full path to the Perl binary file of a
complete Perl installation, i.e., something like

   » !c:\perl\bin\perl.exe ...

This has to do with the fact that when you shell out in MATLAB for
Windows, MATLAB prepends its binary directory ("c:\matlabr12\bin"
or whatever) to the path, so just using

  » !perl

won't do you any good because MATLAB will still use its own
crippled version of Perl even when you actually do have a complete
Perl installation on your system.

> Are there other things I need to download?

Yes.  You need to get a complete version of Perl.  Get it at

   http://www.ActiveState.com/

Peter

-- 
~/.signature: No such file or directory


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

Date: Wed, 4 Jul 2001 22:11:46 -0500
From: "Randy Kobes" <randy@theory.uwinnipeg.ca>
Subject: Re: can't build perl 5.6.1 under Win98
Message-Id: <9i0mdp$lca$1@canopus.cc.umanitoba.ca>

"Andrew E. Schulman" <andrex@zzapp.org> wrote in message
    news:3B432F36.D50F43FB@zzapp.org...
> I've downloaded the perl 5.6.1 source and am trying to compile it under
> Win98, using MSVC 5.3 SP3 with either bash or command.com as my command
> interpreter.  I am blocked at every turn.
>
> First I tried using nmake.  I read README.win32 and checked and adjusted
my
> win32/Makefile.  Despite much effort, it seems that nmake fails because
the
> Makefile includes && and || commands such as
>        cd .. && miniperl configpm
> and
> $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
>     || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
> which command.com is far too stupid to comprehend.  Unfortunately with
> nmake, I can't tell it to call bash as the shell; I'm stuck with
> command.com.  So nmake fails.
[ ... ]
> Has anyone else successfully built perl 5.6.1 under Win98?  Which version
> of make did you use, and how much did you have to hack the makefiles to
get
> it to work?
>
> I'm frustrated to be told "just build it from source, it's already ported
> to win32" and then have the build process so persistently fail.  Any help
> would be much appreciated.

I've built 5.6.1 from the sources on Win98, using VC++ 6. It didn't
pass all the tests, as might be expected, but I haven't noticed
anything glaringly broken ... A couple of changes I made were
in ExtUtils\MM_*.pm - remove all occurrences of the redirection
'2 >&1', and also, in xs_c and xs_o in MM_Unix.pm, change
    some_command > some_file && some_other_command
to
    some_command > some_file
    some_other_command
Apart from these, I didn't have to change anything else
apart from the needed editing of the makefile.

Although they're not free, you may want to take a look at
http://www.jpsoft.com/ for an alternative command line;
I've used their NT tools on WIn98 without problem.

best regards,
randy kobes


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

Date: 05 Jul 2001 09:34:19 GMT
From: alexvalara@aol.com (Alexvalara)
Subject: Re: clean up an array of references from references which are pointing into empty arrays
Message-Id: <20010705053419.04044.00002605@ng-mc1.aol.com>

Yeap i tried the grep function with some criterion but it didn't work. The
problem is that i have to deal with a reference of an array in the criterion
block. I tried several times but nothing...i think that is better to sleep and
to try with fresh mind tommorow.

Thank you man for the suggestions!
i really appreciate it.

Cheers
Alexandros


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

Date: 05 Jul 2001 09:57:05 GMT
From: alexvalara@aol.com (Alexvalara)
Subject: Re: clean up an array of references from references which are pointing into empty arrays
Message-Id: <20010705055705.04044.00002607@ng-mc1.aol.com>

>forst, do you mean emtpy arrays, or ones that actually have only "" as
>the first element?
>

yeap that is the case...

I have already got enough material....from you.
I will work on them...

Thank you man.

Cheers
Alexandros


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

Date: 05 Jul 2001 09:47:42 GMT
From: alexvalara@aol.com (Alexvalara)
Subject: Re: clean up array from "holes"...
Message-Id: <20010705054742.04044.00002606@ng-mc1.aol.com>

Thank you all for your suggestions...

That's kind of communication really helps you becoming a member of the perl's
community.

The following message is for "Godzilla"...:
I am happy because  i gave you the opportunity
to prove that you are alive out there, programming...living...thinking...
Do not take it personally!

Cheers man.


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

Date: 05 Jul 2001 12:13:48 GMT
From: blstone77@aol.com (Blstone77)
Subject: Counting occurances on a line
Message-Id: <20010705081348.16088.00002757@ng-xc1.aol.com>

Example
trouble:walk:taken:moose:sandlot:time

Hiow would I go about counting the number of times the : character occurs on a
line? I looked in the manual, but maybe I am phrasing the question wrong. Can
anyone help?



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

Date: Thu, 5 Jul 2001 13:34:28 +0100
From: "Tom Melly" <tom.melly@ccl.com>
Subject: Re: Counting occurances on a line
Message-Id: <3b445ed4$0$3762$ed9e5944@reading.news.pipex.net>

"Blstone77" <blstone77@aol.com> wrote in message
news:20010705081348.16088.00002757@ng-xc1.aol.com...
> Example
> trouble:walk:taken:moose:sandlot:time
>
> Hiow would I go about counting the number of times the : character occurs on a
> line? I looked in the manual, but maybe I am phrasing the question wrong. Can
> anyone help?

$string = "hello:world:goodbye:world";
$count = -1 + split /\:/, $string;
print "$count\n";




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

Date: Thu, 05 Jul 2001 11:37:50 +0200
From: "Dr. Zimmermann" <R.Zimmermann@uke.uni-hamburg.de>
Subject: Re: cpan shell: remove or uninstall command
Message-Id: <3B44356D.FAD354A4@uke.uni-hamburg.de>


--------------36FCD57BF6A4324EF3F5CB8C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Dr. Zimmermann" wrote:

> Hi,
>
> is there a remove or uninstall command in the cpan shell ?
> OR how can I remove unwanted software from my perl installation
>
> Roger

No answer yet. This can mean two things:

    1) The question is too stupid and was asked many times before
    2) The answer is 'no' or 'unknown'

Can someone please confirm one of both possibilities.

Roger

--
Dr. Roger Zimmermann *** Institute of Physiology, Hamburg
Martinistra/3e 52 D-20246 Hamburg Tel.: /40 42803 5351
--------------------------------  Fax.: /40 42803 4920
R.Zimmermann=at=Uke.Uni-Hamburg.de // roz=at=snafu.de
PGP-ID:  Roger Zimmermann
KeyPrint=83 16 D1 82 06 71 16 60  6F 61 95 65 BB CA 02 E0



--------------36FCD57BF6A4324EF3F5CB8C
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
"Dr. Zimmermann" wrote:
<blockquote TYPE=CITE>Hi,
<p>is there a remove or uninstall command in the cpan shell ?
<br>OR how can I remove unwanted software from my perl installation
<p>Roger</blockquote>
No answer yet. This can mean two things:
<p>&nbsp;&nbsp;&nbsp; 1) The question is too stupid and was asked many
times before
<br>&nbsp;&nbsp;&nbsp; 2) The answer is 'no' or 'unknown'
<p>Can someone please confirm one of both possibilities.
<p>Roger
<pre>--&nbsp;
Dr. Roger Zimmermann *** Institute of Physiology, Hamburg
Martinistra/3e 52 D-20246 Hamburg Tel.:&nbsp;<D>/40 42803 5351
--------------------------------&nbsp; Fax.:&nbsp;<D>/40 42803 4920
R.Zimmermann=at=Uke.Uni-Hamburg.de // roz=at=snafu.de
PGP-ID:&nbsp; Roger Zimmermann&nbsp;<zimmermann=at=fvk-berlin.de>
KeyPrint=83 16 D1 82 06 71 16 60&nbsp; 6F 61 95 65 BB CA 02 E0</pre>
&nbsp;</html>

--------------36FCD57BF6A4324EF3F5CB8C--



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

Date: Thu, 5 Jul 2001 12:31:18 +0200
From: Steffen Beyer <sb@mcasia.imperia.net>
Subject: Re: Date Subtraction Routine
Message-Id: <mlf1i9.o9g.ln@imperia.net>

David Mohorn <david.mohorn@home.com> wrote:

> I need a way to calculate a previous date from a start date.  For example,
> if I want to get the date 7 days for today, I need something like "Today -
> 7" and it will give me the date a week ago.  Of course, I need the date in
> MM/DD/YYYY format.
> 
> Anyone know an efficient way of doing this?  Do I need a perl module or is
> there an easy way to do this...??
> 
> Thanks!

See Date::Calc, Date::Pcalc or Date::Manip on CPAN.

Quick hacks like the one showed here in this thread tend to let you
down in the middle of mission critical tasks...

Yours,
-- 
    Steffen Beyer <sb@engelschall.com>
    (This message may not be replyable. Use address on line above instead!)
    http://www.engelschall.com/u/sb/whoami/ (Who am I)
    http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
    http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)


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

Date: Thu, 5 Jul 2001 01:40:04 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: FAQ 9.4:   How do I extract URLs?
Message-Id: <4303-3B440BC4-471@storefull-245.iap.bryant.webtv.net>

I understand now. Thanks for explaining it to me.
--Dennis



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

Date: 5 Jul 2001 04:16:45 -0700
From: cool133@hotmail.com (^CooL^)
Subject: Global variables
Message-Id: <211c8e3f.0107050316.654ade3a@posting.google.com>

Hi.

Please consider the following code snippet in mod_perl:

In start.pl
===========

use strict;
use CGI qw(:standard);
use lib qw(..);
use common::conf qw(%config);
use vars qw(%config);

# Enable service
common::conf::readFromDB();
$config{SERVICE_STATUS} = "Enabled";
common::conf::writeToDB();


In conf.pm:
===========

package common::conf;
use strict;
use DBI;

# Export Global Variables
BEGIN {
  use Exporter ();
  @conf::ISA            = qw(Exporter);
  @conf::EXPORT         = qw();
  @conf::EXPORT_OK      = qw(%config);
}

use vars qw(%config);

sub readFromDB {
  ...
}

sub writeToDB {
  ...
}

readFromDB() is a function that reads a set of configuration values
from a database and stores them in a hash called %config, while
writeToDB() updates the database with the values in the %config hash.

For some reason, $config{SERVICE_STATUS} does not get updated in
common::conf package when I change its value in start.pl, so when I
call writeToDB() it re-writes the old value as it was read from
readFromDB()!

On the other hand, it seems to work fine if I replace:
  $config{SERVICE_STATUS} = "Enabled";
with
  $common::conf::config{SERVICE_STATUS} = "Enabled";

Isn't it supposed to work without the fully qualified name? Isn't that
what Export.pm is supposed to be for?

Regards,
Clyde.


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

Date: Thu, 5 Jul 2001 11:44:32 GMT
From: "J.D. Fieldsend" <u9jdf@csc.liv.ac.uk>
Subject: Help: Carriage Returns in strings
Message-Id: <3B445320.F2A65199@csc.liv.ac.uk>

I have some string and they contain carriage returns in them. I would
like to remove them. I have tried using

$string =~ s/\r//g; # to remove \r from the string

But this doesn't work.

I have tried 
$string =~ s/r//g; 

as a test and it removed all the occurances of r as expected.

Could anyone please help

Thanks

John


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

Date: Thu, 05 Jul 2001 13:19:36 +0100
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Help: Carriage Returns in strings
Message-Id: <3B445B58.8F7E2A95@bms.umist.ac.uk>

"J.D. Fieldsend" wrote:
> 
> I have some string and they contain carriage returns in them. I would
> like to remove them. I have tried using
> 
> $string =~ s/\r//g; # to remove \r from the string
> 
> But this doesn't work.
> 
> I have tried
> $string =~ s/r//g;
> 
> as a test and it removed all the occurances of r as expected.
> 
> Could anyone please help

do you want to remove the newlines as well?  On a Windoze machine each
linebreak is actually a carriage return followed by a line feed.

$string =~ s/[\r\n]//g;

That should work fine.

But if you are only removing the carriage return (converting from DOS to
*nix?) then s/\r//g should work fine.

perl -e '$a = "hello\ryellow\n"; print $a; $a =~ s/\r//g; print $a'

prints

yellow
helloyellow

Perhaps you should show us some of your code & the incorrect output so
that we can try and identify the source of the problem?

Cheers

Paul


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

Date: Thu, 5 Jul 2001 12:54:03 GMT
From: "J.D. Fieldsend" <u9jdf@csc.liv.ac.uk>
Subject: Re: Help: Carriage Returns in strings
Message-Id: <3B44636B.7FF56EA2@csc.liv.ac.uk>

Paul Boardman wrote:
> 
> "J.D. Fieldsend" wrote:
> >
> > I have some string and they contain carriage returns in them. I would
> > like to remove them. I have tried using
> >
> > $string =~ s/\r//g; # to remove \r from the string
> >
> > But this doesn't work.
> >
> > I have tried
> > $string =~ s/r//g;
> >
> > as a test and it removed all the occurances of r as expected.
> >
> > Could anyone please help
> 
> do you want to remove the newlines as well?  On a Windoze machine each
> linebreak is actually a carriage return followed by a line feed.
> 
> $string =~ s/[\r\n]//g;
> 
> That should work fine.
> 
> But if you are only removing the carriage return (converting from DOS to
> *nix?) then s/\r//g should work fine.
> 
> perl -e '$a = "hello\ryellow\n"; print $a; $a =~ s/\r//g; print $a'
> 
> prints
> 
> yellow
> helloyellow
> 
> Perhaps you should show us some of your code & the incorrect output so
> that we can try and identify the source of the problem?
> 
> Cheers
> 
> Paul

It wasn't a \r that was in the string. It was a \n. I have replaced the
\r for a \n and now it works fine.

Thankyou for your help

John


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

Date: Thu, 5 Jul 2001 09:10:39 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: How to encrypt password for .htpasswd????
Message-Id: <994324239.722657886799425.gnarinn@hotmail.com>

In article <vKK07.34271$Ob.722552@news.easynews.com>,
Fernando Gonzalez <fergonza@terra.com.pe> wrote:
>How to encrypt password for .htpasswd????
>
>I found two scripts to encrypt passwords and write the to my .htpasswd file.
>However, when I access the protected directory and fill in the username and
>password, they don't seem to work. Here are the two scripts I use:
>Script A.:
>
>    sub encrypt {
>        my($plain) = @_;
>        my(@salt);
>        @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/');
>        srand(time() ^ ($$ + ($$ << 15)) );
>        return crypt($plain, $salt[int(rand(@salt))] .
>$salt[int(rand(@salt))]  );
>    }
>
>$encpass = &encrypt($password);
>
>Script B:
>$encpass=crypt($password, substr($password, 0, 2));
>
>Could somebody explain me which is the correct method to encrypt a password
>so it can be written down on the .htpasswd and work properly.
>
>

these are not scripts.
these 2 methods seem to be the same, except the first one uses a random
salt, but the other uses a substring on password as salt.

maybe you forget to write the result to the file?

gnari




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

Date: Thu, 05 Jul 2001 12:55:39 +0200
From: Joachim Rose <joachim.rose@psi.ch>
Subject: Re: How to encrypt password for .htpasswd????
Message-Id: <3B4447AB.1033FE99@psi.ch>



Fernando Gonzalez wrote:
> 
> How to encrypt password for .htpasswd????
> 
> I found two scripts to encrypt passwords and write the to my .htpasswd file.
> However, when I access the protected directory and fill in the username and
> password, they don't seem to work. Here are the two scripts I use:
> Script A.:
> 
>     sub encrypt {
>         my($plain) = @_;
>         my(@salt);
>         @salt = ('a'..'z', 'A'..'Z', '0'..'9', '.', '/');
>         srand(time() ^ ($$ + ($$ << 15)) );
>         return crypt($plain, $salt[int(rand(@salt))] .
> $salt[int(rand(@salt))]  );
>     }
> 
> $encpass = &encrypt($password);
> 
> Script B:
> $encpass=crypt($password, substr($password, 0, 2));
> 
> Could somebody explain me which is the correct method to encrypt a password
> so it can be written down on the .htpasswd and work properly.

Why don't you use the htpasswd program directly to solve your problem ?

`htpasswd -b .htaccess username $password`

Cheers, Achim


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

Date: Thu, 5 Jul 2001 12:58:21 +0200
From: Kerneels Roos <cjr@tuks.co.za>
Subject: I want to use Perl, not php.
Message-Id: <994330457.720880@nntp.up.ac.za>


Hi Everybody.

Somewhere on the web sits an Apache server, configured with access control 
for some directories. When a browser tries to access scripts residing in 
these special access directories, the server automatically sends some HTTP 
header to the browser, causing it to open a username/password entry dialog 
box.

Now, how do I:  
1. force (from within one of those scripts) the browser to pop-up the 
dialog, and 
2.  how do I retrieve what the user entered from within the script?

The PHP for 1 is :

   Header("WWW-Authenticate: basic real=\'some restricted real\'");

and for two it is :

   $PHP_AUTH_USER    # USER NAME 
   $PHP_AUTH_PW     # PASSWORD
   
# the environment vars is automatically set

I am aware of a authorization_basic() method and function in the 
HTTP::Headers class which returns just what I'm looking for, but I have no 
clue how to construct a HTTP::Headers object (or how to actually pass it to 
the server) in such a way that, when you call authorization_basic() it will 
return the username/password.

Any help will be most welcome.

Please reply to my email


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

Date: Thu, 5 Jul 2001 11:15:43 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: I want to use Perl, not php.
Message-Id: <994331743.208393382839859.gnarinn@hotmail.com>

In article <994330457.720880@nntp.up.ac.za>,
Kerneels Roos  <cjr@tuks.co.za> wrote:
>
>Somewhere on the web sits an Apache server, configured with access control 
>for some directories. When a browser tries to access scripts residing in 
>these special access directories, the server automatically sends some HTTP 
>header to the browser, causing it to open a username/password entry dialog 
>box.
>
>Now, how do I:  
>1. force (from within one of those scripts) the browser to pop-up the 
>dialog, and 
>2.  how do I retrieve what the user entered from within the script?
>
>The PHP for 1 is :
>
>   Header("WWW-Authenticate: basic real=\'some restricted real\'");

apart from the header, which obviously is the same, you need to
return a status line of 
401 Authorization Required

>
>and for two it is :
>
>   $PHP_AUTH_USER    # USER NAME 
>   $PHP_AUTH_PW     # PASSWORD
>   

the user name is in $ENV{REMOTE_USER}
the script has no business with the password


gnari


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

Date: 5 Jul 2001 10:32:56 GMT
From: steve@zeropps.uklinux.net (Steve)
Subject: Re: Keen, experienced, or improving Perl author required
Message-Id: <slrn9k8ggd.b51.steve@zero-pps.localdomain>

On Wed, 4 Jul 2001 23:54:43 +0100, Tony wrote:
>My apologies if this is not the correct group.

Checkout perljobs.org.

>For preference you should be located in the UK or even South West Wales
>ideally. No age preferences or bias - just that I am seeking primarily an
>author with vision and a real feel for where the Internet should go.
>This venture will only be on a mutual profit sharing method where some 20%
>of the income revenue will be the reward over a 3 to 5 year period. 25% is
>being offered to partner affiliates. Therefore this is not a once off pay up
>front deal - but an experienced analysis of some of the ideas that solid
>bricks to clicks converts need.

So what you're saying is that you want someone to work for nothing for six
months on a venture that will probably fail (as most do). 

Buy some books, read the docs that come with perl and do it yourself is 
probably the best way to go. 

--
Cheers
Steve              email mailto:steve@zeropps.uklinux.net

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 11:27am  up 3 days,  9:20,  2 users,  load average: 1.00, 1.05, 1.03


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

Date: Thu, 05 Jul 2001 13:15:26 +0200
From: Horst Fickenscher <horst.fickenscher@sealsystems.de>
Subject: Re: map/hash question, functional style
Message-Id: <3B444C4E.54A518AD@sealsystems.de>

nobull@mail.com wrote:

> Slice:
>
> @hash=();

What does this mean? It refers to @hash - something quite different from %hash.
Perhaps:

%hash = (); # or
undef %hash;

> @hash{@keys}=@vals;

--
Horst




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

Date: Thu, 05 Jul 2001 11:43:25 +0100
From: "Yas" <yasser@x-unity-x.demon.co.uk>
Subject: Re: Net::Telnet logging on problem.....
Message-Id: <soX07.8361$A51.1339181@monolith.news.easynet.net>

In article <maI07.12100$wr.62100@news1.frmt1.sfba.home.com>, "Rickey
Ingrassia" <r1ckey@home.com> wrote:
<snip>

> 
> It seems to me you're making this harder than it needs to be.  I use the
> Telnet module daily, and the following code works on 98.865% of the
> devices I connect to. The prompt may need to be adjusted depending on
> the device you're connecting to.
> 
> use Net::Telnet;
> my $host = new Net::Telnet( Host => <IP ADDRESS>,
>                             Errmode => "return",
>                             Prompt => '/[?>:#\]][ ]*$/' # generic prompt
>                           );
> 
> # just use input_log not dump_log or output_log # input_log is human
> readable
> $host->input_log("/tmp/input.log");
> 
> # use login not print statements
> $host->login("$username","$password");
> 
> # use cmd not print, requires accurate prompt setting my @who =
> $host->cmd("who");
> $host->cmd("exit");
> $host->close;
> 
> print @who."\n";
> 

Thns for your help.... now there is a new problem....

below is my code:

#!/usr/bin/perl -w

use Net::Telnet;

$HOST = new Net::Telnet(Port => "10001", Errmode => "return", Prompt => '/[?>:#\]][ ]*$/');
$HOST->open("MY IP");

$username="admin";
$password="<PASSWORD>";

$HOST->input_log("/tmp/input.log");

$HOST->login("$username","$password");

@test = $HOST->cmd("help");
$HOST->close;

print @test."\n";

It should print loads of help commands... but instead prints 0... ive
tried other commadns and instead prints just numbers....

thnx in advance for any help


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

Date: Thu, 5 Jul 2001 08:55:20 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Newbie question: What's the opposite of chop?
Message-Id: <994323320.303080527577549.gnarinn@hotmail.com>

In article <3B3A72F2.BFD9B4E7@cisco.com>,
Richard Wellum  <rwellum@cisco.com> wrote:
>foreach $all (@raw_data)
>    {
> chop($all);
>.......more code;
>    }
>

you can also chop the whole array outside the loop:
chop(@raw_data);

you might want to look up chomp() as an alternative to chop()

>Now I have finished my manipulation of the array, and want to write this
>array back to the file. How to I add "\n"'s back to the end of each line
>in my array?
>
> $ctr=0;
> foreach $some (@raw_data)
> {
>     @raw_data[$ctr]="$some\n";
>     $ctr++;
> }
>
foreach $some (@raw_data) {
    $some="$some\n";
}

or sometime it is convenient to do
$all=join("\n",@raw_data);


gnari


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

Date: Thu, 5 Jul 2001 09:17:10 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Perl 5.00503 vs. 5.00554 - what's the difference?
Message-Id: <9i1bam$23qe$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Paul Laub
<paul@margalo.com>], who wrote in article <13027756.0107041101.7804b09c@posting.google.com>:
> Dear all, 
> 
> I just noticed that for pretty printing data structures, 5.00554
> relies on dumpvar.pl whereas 5.00503 uses Dumpvalue.pm.

???  Perl does no "pretty printing (of) data structures".  What
exactly do you mean?

[Do you mean debugger?  I doubt it...  When I made Dumpvalue, I ran
out of steam to convert the debugger to use Dumpvalue...]

Ilya


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

Date: Thu, 5 Jul 2001 13:18:49 +0100
From: "Trevor Ward" <trevor.r.ward@blueyonder.co.uk>
Subject: Re Counting occurances on a line
Message-Id: <9i1lvb$od515@eccws12.dearborn.ford.com>

? is it me or did opening this message try to access my email addresses ????




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

Date: Thu, 05 Jul 2001 13:31:46 +0100
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Script permissions problem.
Message-Id: <3B445E32.E161713A@bms.umist.ac.uk>

Tim Hammerquist wrote:
> 
> Philip Newton <pne-news-20010705@newton.digitalspace.net> wrote:
> > [Don't followup-to comp.lang.perl; that group doesn't exist.]
> 
> Don't tell the frequenters of comp.lang.perl that!  They post quote
> frequently as if they exist.  When someone tells them they don't exist,
> they get quite indignant.
> 
> While I realize that comp.lang.perl has "officially" been replaced by
> comp.lang.perl.*, many people remain in clp and refuse to even lurk in
> clpm.
> 
> I've actually seriously wondered, is there any harm in continuing to
> answer posts in clp?

I can't see clp in the list of newsgroups from my newsgroup server & I
can't find it on groups.google.com either.  Is it an elusive & secretive
place?  Or, perhaps, does it not exist?

Paul


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

Date: Thu, 5 Jul 2001 09:00:32 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Sendmail
Message-Id: <994323632.59579513547942.gnarinn@hotmail.com>

In article <9i0ig0$1l18$3@josh.sovintel.ru>, Alex <alex82p@svs.ru> wrote:
>I have perl 5.5. Where can I find sendmail?
>
sendmail has nothing to do with perl, so what is your real question?

gnari




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

Date: 05 Jul 2001 11:56:09 GMT
From: robseegel@aol.com (Rob Seegel)
Subject: Re: Text based menuing system in Perl with submenus???
Message-Id: <20010705075609.19444.00002442@ng-ff1.aol.com>

Have you considered the Curses libraries?

Check out the Cmenu module, also look at a few of the Curses modules (Cmenu
uses Curses).

Rob


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

Date: 5 Jul 2001 07:10:28 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: two changes
Message-Id: <9i13t4$3rb$1@mamenchi.zrz.TU-Berlin.DE>

According to Philip Newton  <nospam.newton@gmx.li>:
> On 4 Jul 2001 18:18:27 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> Siegel) wrote:
> 
> > According to Philip Newton  <nospam.newton@gmx.li>:
> > > On 4 Jul 2001 15:41:54 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> > > Siegel) wrote:

[...]

[Reuben Logsdon] I default my CGI scripts to /usr/local/bin/perl.  For
[Reuben Logsdon} 20% of my customers, that path just doesn't seem to
[Reuben Logsdon] exist and they get all confused because Apache returns
[Reuben Logsdon] internal server error, etc.

> > He wants do deal with the 20% before they get confused.  "I default..."
> > is a way of saying, "My perl is located at...".
> 
> Oh, well. I understood it as "I write CGI scripts and give them to
> customers who use them on their web server. Some of those customers have

[...]

You are right.  Your reading is at least as plausible as mine.

Anno


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

Date: Thu, 5 Jul 2001 18:47:44 +1000
From: "Dallas McCarthy" <whitetip@iprimus.com.au>
Subject: Re: Vapo-Rub
Message-Id: <3b442a03$1@news.iprimus.com.au>

Hell no
"Tim Hammerquist" <tim@vegeta.ath.cx> wrote in message
news:slrn9k6vqv.1rv.tim@vegeta.ath.cx...
> Dallas McCarthy <whitetip@iprimus.com.au> wrote:
> > OK, then, RACK OFF Losers
>
> Most people would leave a thread they're not interested in.
>
> So I wonder, if we "racked off", would you be left bored?
>
> --
> -Tim Hammerquist <timmy@cpan.org>
>
> Any emotion, if it is sincere, is involuntary.
>     -- Mark Twain




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

Date: Thu, 5 Jul 2001 09:23:07 +0100
From: Derek Fountain <nomail@hursley.ibm.com>
Subject: XML handling on AIX
Message-Id: <9i185b$6kcs$1@sp15at20.hursley.ibm.com>

Is anyone doing XML work with Perl on AIX-4.3? The expat package doesn't 
compile on AIX (known bug, as yet unresolved) which has kind of stopped my 
show dead. The option is to do my job in Java, and you can imagine how I 
feel about that.

What I could really use is a precompiled package so I can just get going. 
Failing that, can anyone tell me how to make the XML packages?


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

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

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 V10 Issue 1249
***************************************


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