[21785] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3989 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 17 14:06:39 2002

Date: Thu, 17 Oct 2002 11:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 17 Oct 2002     Volume: 10 Number: 3989

Today's topics:
    Re: Array from String (Helgi Briem)
    Re: Array from String <spam@stinks.com>
    Re: Array from String <spam@stinks.com>
    Re: Array from String <jason@baugher.pike.il.us>
    Re: Array from String news@roaima.freeserve.co.uk
    Re: Array from String <flavell@mail.cern.ch>
    Re: Array from String (Helgi Briem)
    Re: Array from String <nobull@mail.com>
    Re: Array from String (Tad McClellan)
    Re: Array from String <spam@stinks.com>
    Re: Convert Perl script to C program (and Why was this  (Jilla Villa)
        DBD::mysql - $dbh->do() failed <du_bing@hotmail.com>
    Re: DBD::mysql - $dbh->do() failed <du_bing@hotmail.com>
    Re: defining subroutines on the fly in a module <nobull@mail.com>
    Re: format and write to a browser news@roaima.freeserve.co.uk
    Re: idea to build an online game (kit)
    Re: idea to build an online game <jason@baugher.pike.il.us>
    Re: idea to build an online game <nospam1002@joesbox.cjb.net>
        Installing LWP module on 5.6.1 <nomail@hursley.ibm.com>
    Re: Installing LWP module on 5.6.1 <mike_constant@yahoo.com>
    Re: Is perlmonks.com down today? Or is just me. <bart.lateur@pandora.be>
    Re: Newbie help extracting strings <dover@nortelnetworks.com>
    Re: Newbie help extracting strings (Tad McClellan)
    Re: Newbie help extracting strings <nobull@mail.com>
    Re: Problems with perl.org/perlmongers.org websites and <Tassilo.Parseval@post.rwth-aachen.de>
        RegExp with a variable <spam@stinks.com>
    Re: RegExp with a variable (Tad McClellan)
    Re: RegExp with a variable <nobull@mail.com>
    Re: RegExp with a variable <spam@stinks.com>
    Re: RegExp with a variable <bart.lateur@pandora.be>
    Re: Where can I learn about Perl & ActiveX and OLE <Graham.T.Wood@oracle.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 17 Oct 2002 15:15:49 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Array from String
Message-Id: <3daed1ad.129173221@news.cis.dfn.de>

On Thu, 17 Oct 2002 14:54:32 GMT, "PinkPuppy"
<spam@stinks.com> wrote:

>That's perfect!  Only one question.  If I want all of the members 
>of all the groups that mach to be in one array doesn't the 
>statement my @members = split /\s+/, $1; overwrite the
>existing values in that array?

No, initialising the @members array with 'my' will lead
the perl compiler to warn you that:

"my" variable @members masks earlier declaration in same 
scope at line XX in ......

It goes without saying that you are enabling warnings.
You are aren't you?  And strictures of course?  You start
every program with the obligatory:

use warnings;
use strict;

I hope, because you'll have little chance of receiving
human help if you ignore the machine help readily 
available to you.

>Also, once I have the @members fully populated, is there a PERL 
>mechanism for removing duplicate values?

It's Perl for the language or perl for the compiler, never 
PERL.  Please.  It makes my skin crawl and clearly labels 
you as an outsider.

This would be a good time to get acquanted with perldoc
that most wondrous of all Perl programming tools.

perldoc -q difference

will tell you all about PERL, Perl and perl.

and 

perldoc -q duplicates

will tell you how to remove duplicate values.

Also read perldoc perl, perldoc perldoc, perldoc

-- 
Regards, Helgi Briem
helgi AT decode DOT is

                           A: Top posting
                           Q: What is the most irritating thing on Usenet?
                                           - "Gordon" on apihna


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

Date: Thu, 17 Oct 2002 15:21:32 GMT
From: "PinkPuppy" <spam@stinks.com>
Subject: Re: Array from String
Message-Id: <%zAr9.844$XsJ4.50856073@news2.randori.com>

By the way, thanks for the help.  I'm in Fort Worth too.  PERL is different
from any other language I know and it is kicking my butt.

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnaqtho7.2em.tadmc@magna.augustmail.com...
> PinkPuppy <spam@stinks.com> wrote:
> >> > Can someone show me an easy way to do this?
> >>
> >> Read lines from the file,
>
>
>    @ARGV = 'some.file';
>    while ( <> ) {
>
>
> >> comparing them with a regex against your desired
> >> group name, and when you find the right line,
>
>
>       if ( /^group: (.*)/ ) {
>
> >> take the remainder of the
> >> line, split it out into a list of members,
>
>          my @members = split /\s+/, $1;
>
>
> >> and cycle through that list,
> >> doing with them whatever you want to do.
>
>          foreach ( @members ) {
>
>             # process $_ here
>
>          }
>      }
>    }
>
>
> > I was hoping that someone could supply some code.
>
>
> See above.
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas
>




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

Date: Thu, 17 Oct 2002 15:25:27 GMT
From: "PinkPuppy" <spam@stinks.com>
Subject: Re: Array from String
Message-Id: <GDAr9.845$XsJ4.45154337@news2.randori.com>

"Helgi Briem" <helgi@decode.is> wrote in message
news:3daed1ad.129173221@news.cis.dfn.de...
> On Thu, 17 Oct 2002 14:54:32 GMT, "PinkPuppy"
> <spam@stinks.com> wrote:
>
> >That's perfect!  Only one question.  If I want all of the members
> >of all the groups that mach to be in one array doesn't the
> >statement my @members = split /\s+/, $1; overwrite the
> >existing values in that array?
>
> No, initialising the @members array with 'my' will lead
> the perl compiler to warn you that:
>
> "my" variable @members masks earlier declaration in same
> scope at line XX in ......
>
> It goes without saying that you are enabling warnings.
> You are aren't you?  And strictures of course?  You start
> every program with the obligatory:
>
> use warnings;
> use strict;
>
> I hope, because you'll have little chance of receiving
> human help if you ignore the machine help readily
> available to you.

Uh oh.  I only write scripts that run on a web server.  I don't have any way
to run them in a console or command line.  I'm afraid I'm stuck there.

>
> >Also, once I have the @members fully populated, is there a PERL
> >mechanism for removing duplicate values?
>
> It's Perl for the language or perl for the compiler, never
> PERL.  Please.  It makes my skin crawl and clearly labels
> you as an outsider.

Thanks.  I am an outsider.  No argument there, but I'm trying.

>
> This would be a good time to get acquanted with perldoc
> that most wondrous of all Perl programming tools.
>
> perldoc -q difference
>
> will tell you all about PERL, Perl and perl.
>
> and
>
> perldoc -q duplicates
>
> will tell you how to remove duplicate values.
>
Thanks, but I'm not sure where to get them.  I have Two Perl books and one
Regular Expression book that I'm perusing, but I don't have access to the
server.  I can only copy my Perl scripts to the server.  I have no read
capabilities.





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

Date: Thu, 17 Oct 2002 15:47:35 GMT
From: Jason Baugher <jason@baugher.pike.il.us>
Subject: Re: Array from String
Message-Id: <Xns92AA6DC6651BDjasonbaugherpikeilus@209.242.76.10>

"PinkPuppy" <spam@stinks.com> wrote in comp.lang.perl.misc:

> By the way, thanks for the help.  I'm in Fort Worth too.  PERL is
> different from any other language I know and it is kicking my butt.
> 
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnaqtho7.2em.tadmc@magna.augustmail.com...
>> PinkPuppy <spam@stinks.com> wrote:
>> >> > Can someone show me an easy way to do this?
>> >>
>> >> Read lines from the file,
>>
> 

<snip>

Ack!  Don't top-post, and it's not PERL!  The language is Perl, the 
interpreter is perl.  See the posts by Helgi Briem elsewhere in this thread 
regarding PERL, Perl and perl.

As for Perl kicking your butt - it may seem rough at first until you get 
into the "Perl" way of doing things.  

-- 
Jason Baugher 
Virtual Adept Professional Consulting Services
1406 Adams Street, Quincy, IL 62301 - (217) 221-5406
jason@baugher.pike.il.us - http://baugher.pike.il.us/virtualadept


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

Date: Thu, 17 Oct 2002 17:07:16 +0100
From: news@roaima.freeserve.co.uk
Subject: Re: Array from String
Message-Id: <k7nmoa.dto.ln@moldev.cmagroup.co.uk>

PinkPuppy <spam@stinks.com> wrote:
> Okay, if I have the following data inside a text file (it's a group file to
> be used with an .htaccess file):
> admin: bob jan don peggy
> developers: steve amber
> users: kim whitney jo tena shari

> Now, what I want to do is find a particular group(s) and cycle through all
> their members.

If you're thinking in terms of being able to scan these, modify them,
etc., then http://stein.cshl.org/~lstein/user_manage/ may help.

Chris
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


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

Date: Thu, 17 Oct 2002 17:54:32 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Array from String
Message-Id: <Pine.LNX.4.40.0210171751530.11027-100000@lxplus071.cern.ch>

On Oct 17, PinkPuppy inscribed on the eternal scroll:

>  PERL is different
> from any other language I know

It's different from any language _we_ know, too:

  perldoc -q difference

> and it is kicking my butt.

"I couldn't possibly comment".


[fullquotectomy performed]



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

Date: Thu, 17 Oct 2002 16:13:17 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Array from String
Message-Id: <3daedf33.132635970@news.cis.dfn.de>

On Thu, 17 Oct 2002 15:25:27 GMT, "PinkPuppy"
<spam@stinks.com> wrote:

>Uh oh.  I only write scripts that run on a web server.  I don't have 
>any way to run them in a console or command line. 

Of course you have.  And it is an  absolutely vital part of 
the process and will speed up your  learning enormously.  

Writing and debugging a programon a remote server is like 
driving a car by  telegram.

Learn Perl first, then the added complexity of the CGI
environment and web server configuration.

> I'm afraid I'm stuck there.

Perl is free and you can downloadit in many places.  
What is the best depends on your OS and setup.

In my opinion, the best all-in-one distribution for
the newcomer is Activeperl, available from 
[long URL may be wrapped]

http://activestate.com/Products/Download/Download.plex?id=ActivePerl

available for Linux, Windows and Solaris.

Another good one is Indigoperl, available from
http://www.indigostar.com/indigoperl.htm

This one comes bundled with an Apache web server
for local testing of CGI programs.

Another good place to know about is CPAN,
the Comprehensive Perl Archive Network, at

http://search.cpan.org/

-- 
Regards, Helgi Briem
helgi AT decode DOT is

                           A: Top posting
                           Q: What is the most irritating thing on Usenet?
                                           - "Gordon" on apihna


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

Date: 17 Oct 2002 17:28:27 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Array from String
Message-Id: <u9smz5m3mc.fsf@wcl-l.bham.ac.uk>

"PinkPuppy" <spam@stinks.com> writes:

> "Helgi Briem" <helgi@decode.is> wrote in message
> news:3daed1ad.129173221@news.cis.dfn.de...

> > It goes without saying that you are enabling warnings.
> > You are aren't you?  And strictures of course?  You start
> > every program with the obligatory:
> >
> > use warnings;
> > use strict;
> >
> > I hope, because you'll have little chance of receiving
> > human help if you ignore the machine help readily
> > available to you.
> 
> Uh oh.  I only write scripts that run on a web server.  I don't have any way
> to run them in a console or command line.  I'm afraid I'm stuck there.

Are you seriously telling us you don't have a computer on which you
could install Perl and a webserver?  Are you sitting in an Internet
Cafe or something?

Or are you claiming you not afford to buy the software?  If you can't
afford to buy the software I'll happly give you the cost of Perl
($0.00) and the cost of a good Webserver (e.g. Apache (also $0.00)).

Or are you saying the time it would take you to install the software
is worth more than the (considerably larger) ammount of time you waste
by not having it installed?

> > This would be a good time to get acquanted with perldoc
> > that most wondrous of all Perl programming tools.
> >
> > perldoc -q difference
> >
> > will tell you all about PERL, Perl and perl.
> >
> > and
> >
> > perldoc -q duplicates
> >
> > will tell you how to remove duplicate values.
> >
> Thanks, but I'm not sure where to get them. 

They will be on your computer once you install Perl.

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


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

Date: Thu, 17 Oct 2002 11:27:30 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Array from String
Message-Id: <slrnaqtp7i.308.tadmc@magna.augustmail.com>

PinkPuppy <spam@stinks.com> wrote:
> "Helgi Briem" <helgi@decode.is> wrote in message
> news:3daed1ad.129173221@news.cis.dfn.de...
>> On Thu, 17 Oct 2002 14:54:32 GMT, "PinkPuppy"


>> It goes without saying that you are enabling warnings.
>> You are aren't you?  And strictures of course?  You start
>> every program with the obligatory:
>>
>> use warnings;
>> use strict;
>>
>> I hope, because you'll have little chance of receiving
>> human help if you ignore the machine help readily
>> available to you.
> 
> Uh oh.  I only write scripts that run on a web server.  


That does not matter. warnings and strictures should work there too.

Try it.


Developing CGI programs by uploading after every little change
is a really inefficient way of developing them.

Get them working from a local command line first, _then_ move
them to the server.


> I don't have any way
> to run them in a console or command line.  I'm afraid I'm stuck there.


No you're not.

Perl is free. Just go get it and install in on whatever computer
you do have access to.


> Thanks, but I'm not sure where to get them. 


They come with the perl interpreter. If you have perl, you already
have the docs. Get and install perl!

Have you seen the Posting Guidelines that are posted here weekly?


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


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

Date: Thu, 17 Oct 2002 16:59:21 GMT
From: "PinkPuppy" <spam@stinks.com>
Subject: Re: Array from String
Message-Id: <I%Br9.854$XsJ4.48955532@news2.randori.com>

"Brian McCauley" <nobull@mail.com> wrote in message
news:u9smz5m3mc.fsf@wcl-l.bham.ac.uk...
> "PinkPuppy" <spam@stinks.com> writes:
>
> > "Helgi Briem" <helgi@decode.is> wrote in message
> > news:3daed1ad.129173221@news.cis.dfn.de...
>
> > > It goes without saying that you are enabling warnings.
> > > You are aren't you?  And strictures of course?  You start
> > > every program with the obligatory:
> > >
> > > use warnings;
> > > use strict;
> > >
> > > I hope, because you'll have little chance of receiving
> > > human help if you ignore the machine help readily
> > > available to you.
> >
> > Uh oh.  I only write scripts that run on a web server.  I don't have any
way
> > to run them in a console or command line.  I'm afraid I'm stuck there.
>
> Are you seriously telling us you don't have a computer on which you
> could install Perl and a webserver?  Are you sitting in an Internet
> Cafe or something?
>
> Or are you claiming you not afford to buy the software?  If you can't
> afford to buy the software I'll happly give you the cost of Perl
> ($0.00) and the cost of a good Webserver (e.g. Apache (also $0.00)).
>
> Or are you saying the time it would take you to install the software
> is worth more than the (considerably larger) ammount of time you waste
> by not having it installed?

I'm saying that I don't own a computer.  I can only program on my work
machine which does not allow me to install software and doesn't have Perl.
I have only the lowly ability to write Perl in Notepad and request that the
admin place it on the server for me where I get to painfully start over with
that process if I have so much as a typo.  I have spent my own money to buy
a few books and am trying with all sincerity to no ask every question that I
have.  The boss has said... make this happen and make it happen soon.  With
the economy as crappy as it is, I'm frantically just trying to produce so
I'm not busy looking for another job.  I'm not trying to waste anyone's
time, just trying to keep my job.

>
> > > This would be a good time to get acquanted with perldoc
> > > that most wondrous of all Perl programming tools.
> > >
> > > perldoc -q difference
> > >
> > > will tell you all about PERL, Perl and perl.
> > >
> > > and
> > >
> > > perldoc -q duplicates
> > >
> > > will tell you how to remove duplicate values.
> > >
> > Thanks, but I'm not sure where to get them.
>
> They will be on your computer once you install Perl.




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

Date: 17 Oct 2002 10:22:59 -0700
From: jillavilla@otakumail.com (Jilla Villa)
Subject: Re: Convert Perl script to C program (and Why was this group's name changed?)
Message-Id: <ecaa825c.0210170922.48030523@posting.google.com>

"J rgen Exner" <jurgenex@hotmail.com> wrote in message news:<3dab0e5e$1@news.microsoft.com>...
> Fredo wrote:
> > Stop denying
> > the *fact* that there is a problem. Only then will this group be free
> > of the hate and torment that has beheld it the last serveral years.
> 
> Quite right, there is a serious problem here: people are not educated by
> their ISPs how to behave in Usenet, 

With all due respect, it's not the ISP's job. ISP only provides you
with a connection, and mail/news servers. They have tech support yes,
but I have yet to see any sort of rerquirement on an ISP's part to
educate a user.

> ignoring FAQs, ignoring Nettiquette, 

The new comers have never been the only ones to ignore Nettiquette,
but with FAQ's, it's an issue in almost every group (or anything)
where new comers are common.

> not
> reading for 2 weeks before actively participating, posting off topic, .....

Such a requirement has always been quite questionable, as one could
read through 2 weeks or more posts via groups.google.com.

> It's like someone coming into an opera hall and first thing those 'newbies'
> do is bumping up their boom boxes. 

But the problem is also that the regular visitors of the opera are
also yelling back at the new comers, causing just as much noise.

> No idea why, maybe because they were used
> to do so at their family picnic. But do you really expect people to go easy
> on those idiots which ignore the basic rules of social behaviour?

Point taken, but this definately goes both ways. I sincerly hope you
don't think people like Tom Christianson, Tad, et al, have been good
rolemodels of this preaching? A great example of socially unexceptable
behavoir is the thread titled "HARASSMENT -- Monthly Autoemail".

Tell me, why is it that any new comer may be scorned for ill behavoir,
but those who have been here longer and are better known are have
complete freedom and impunity to exercise what ever ill behavoir they
like (behavoirs that would have everyone jumping on a new comer if
they had done it).

I think this sort of hypocracy is part of the problem as well as those
with non-FAQ-reading-new-comers.
 
> Oh, btw, does any of this have anything to do with Perl?

This group is mentioned in nearly all Perl related books, and this
topic has to do with this group. A discussion of the group should be
On Topic, shouldn't it?


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

Date: Thu, 17 Oct 2002 11:40:09 -0500
From: user <du_bing@hotmail.com>
Subject: DBD::mysql - $dbh->do() failed
Message-Id: <3DAEE7E9.A66E815B@hotmail.com>

Greetings,

SunOS 5.8.
Perl 5.6.1

This is the script that gives the error:  DBD::mysql::db do failed: You
have an error in your SQL syntax near ')' at line 1 at ./z.pl line 12.
What in the world is wrong with the $dbh-do()?

=============
#!/usr/local/bin/perl

use lib '/data/neo-acct-admin/scripts';
require 'lastseens.config';

$ssn = '101010102';
$sid = '101010102';
$simsenroll = '20021017111200';

&mysql_connect;

$dbh->do("INSERT INTO lastseen VALUES (?,?,?)",
"$ssn","$sid","$simsenroll");

&mysql_disconnect;

##############
sub mysql_connect {

$dsn = "DBI:$driver:database=$database;host=$server";
$dbh = DBI->connect($dsn, $user, $password);

}

sub mysql_disconnect {

$dbh->disconnect;

}
==========================

Thanks in advance for any help,

Bing



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

Date: Thu, 17 Oct 2002 11:57:21 -0500
From: user <du_bing@hotmail.com>
Subject: Re: DBD::mysql - $dbh->do() failed
Message-Id: <3DAEEBF1.3569033@hotmail.com>

Never mind.  I fixed it.

Bing

user wrote:

> Greetings,
>
> SunOS 5.8.
> Perl 5.6.1
>
> This is the script that gives the error:  DBD::mysql::db do failed: You
> have an error in your SQL syntax near ')' at line 1 at ./z.pl line 12.
> What in the world is wrong with the $dbh-do()?
>
> =============
> #!/usr/local/bin/perl
>
> use lib '/data/neo-acct-admin/scripts';
> require 'lastseens.config';
>
> $ssn = '101010102';
> $sid = '101010102';
> $simsenroll = '20021017111200';
>
> &mysql_connect;
>
> $dbh->do("INSERT INTO lastseen VALUES (?,?,?)",
> "$ssn","$sid","$simsenroll");
>
> &mysql_disconnect;
>
> ##############
> sub mysql_connect {
>
> $dsn = "DBI:$driver:database=$database;host=$server";
> $dbh = DBI->connect($dsn, $user, $password);
>
> }
>
> sub mysql_disconnect {
>
> $dbh->disconnect;
>
> }
> ==========================
>
> Thanks in advance for any help,
>
> Bing



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

Date: 17 Oct 2002 17:47:00 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: defining subroutines on the fly in a module
Message-Id: <u9k7khm2rf.fsf@wcl-l.bham.ac.uk>

"Keith A. Clay" <novalid@email.oops> writes:

> Ben Kennedy wrote:
> > "Keith A. Clay" <novalid@email.oops> wrote in message
> > news:3dad7ec5$1_4@news.teranews.com...
> > 
> > See "perldoc -f eval".  Basically you generate the code that contains the
> > subroutine, eg $var = "sub your_sub { bleh }".  Then just "eval $var" - but
> > be sure to check $@ afterwards to diagnose any bugs in your dynamically
> > generated code.

The eval STRING mechanism should be a last resort.  In this case you
can get by using GLOBs and symrefs (which are the second-to-last
resort!). [ See other branch of this thread ].

I still think the original problem (the X in this XY) is better
addressed using an AUTOLOAD sub.

>          my $gname="get_" . $name;
>          $tvar="sub $gname { my 
> (\$self,\@arr)=\@_;\$self->query_user_var(\@arr) }";
>          eval $tvar;

Err?  This means that all methods of the form get_XXXX actually get
the same thing since $name is not used in the subroutine.

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


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

Date: Thu, 17 Oct 2002 17:19:50 +0100
From: news@roaima.freeserve.co.uk
Subject: Re: format and write to a browser
Message-Id: <6vnmoa.dto.ln@moldev.cmagroup.co.uk>

Christian Caron <nospam@nospam.org> wrote:
> #################
> #!/usr/local/bin/perl
> print "Content-type: text/html\n\n";

> and try to run that from a browser, it tells me the document contains no
> data (empty). But from the command line, no problem.

Actually yes, there is a problem. Your content-type line is wrong (and
it's not just the example providing text/plain output whereas you've
stated text/html). It will work on some operating systems (and their
servers) and with some browsers but not with others.

Repeat after me, use CGI:

    #!/usr/local/bin/perl
    use CGI qw/:standard/;
    use strict;

    print header;

    format STDOUT =
    |==================|
    | @<<<<<<<<<<<           |
    $name
    .

    $name = "myname";
    write;

Chris
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


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

Date: 17 Oct 2002 09:36:12 -0700
From: manutd_kit@yahoo.com (kit)
Subject: Re: idea to build an online game
Message-Id: <1751b2b5.0210170836.1f5e8a2f@posting.google.com>

sorry about any inconvenience, if I want to know how to do this stuffs
with perl, where should I go then? Should I go to other perl news
group in google? Coz I just want to have a general idea of how to do
this from some the experts, I don't mean to give a hard time to the
news group, could you mind tell me how should for this, or direct me
to another news group if you can?

Thanks for your help,
Kit

Bernard El-Hagin <bernard.el-hagin@DODGE_THISlido-tech.net> wrote in message news:<slrnaqsnas.12b.bernard.el-hagin@gdndev25.lido-tech>...
> In article <1751b2b5.0210162246.742f5fc7@posting.google.com>, kit wrote:
> > Could any of you please show me how to run a game on one computer and
> > then it should to connect to another game player's machine?
> 
> 
> Why, why, why do they keep coming to clpm? What is it about clpm that
> attracts them so much?
> 
> 
> Cheers,
> Bernard


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

Date: Thu, 17 Oct 2002 17:07:55 GMT
From: Jason Baugher <jason@baugher.pike.il.us>
Subject: Re: idea to build an online game
Message-Id: <Xns92AA7B6582AB0jasonbaugherpikeilus@209.242.76.10>

manutd_kit@yahoo.com (kit) wrote in comp.lang.perl.misc:

> sorry about any inconvenience, if I want to know how to do this stuffs
> with perl, where should I go then? Should I go to other perl news
> group in google? Coz I just want to have a general idea of how to do
> this from some the experts, I don't mean to give a hard time to the
> news group, could you mind tell me how should for this, or direct me
> to another news group if you can?
> 

Go to amazon.com and buy the O'Reilly book "Learning Perl".  That will get 
you started.  Once you know Perl, you'll need to do some design work to 
determine what exactly you want to accomplish.  Once you have the design 
work completed, use your new Perl knowledge to write the code.

This may seem like a very general answer, but that's because you are asking 
a very general question.  To me it's equivalent to asking, "How do I build 
a house?".  What kind of house?  Where?  How many levels?  How many rooms?  
etc....

Now, once you get your design going and you start coding, if you run into 
specific trouble, post the problem and the troublesome code, and someone 
would probably be more than happy to help you out.

-- 
Jason Baugher 
Virtual Adept Professional Consulting Services
1406 Adams Street, Quincy, IL 62301 - (217) 221-5406
jason@baugher.pike.il.us - http://baugher.pike.il.us/virtualadept


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

Date: 17 Oct 2002 17:40:47 GMT
From: Josef Drexler <nospam1002@joesbox.cjb.net>
Subject: Re: idea to build an online game
Message-Id: <aomsmv$n4n$1@panther.uwo.ca>

kit wrote:
> sorry about any inconvenience, if I want to know how to do this stuffs
> with perl, where should I go then?

Your question is like going into a steel factory and asking them how to
build a car.  They can help you getting the steel into the right shape, but
you have to know how what you need to make a car first.

Same with your question.  Figure out how to make such a game in any
language first.  Figure out the networking details (protocols to use, etc.)
Then, if you have problems with particular details of the implementation in
Perl, come here and ask specific questions about your problems.

But before you do that, learn how to quote properly:
http://mail.augustmail.com/~tadmc/clpmisc.shtml

-- 
   Josef Drexler                 |    http://publish.uwo.ca/~jdrexler/
---------------------------------+----------------------------------------
 Please Conserve Gravity: Don't  |  Email address is *valid*.
 hang your clothes - pile them up|  Don't remove the "nospam" part.


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

Date: Thu, 17 Oct 2002 16:45:05 +0100
From: Anne Shankland <nomail@hursley.ibm.com>
Subject: Installing LWP module on 5.6.1
Message-Id: <3DAEDB01.4BB79A7@hursley.ibm.com>

I'm trying to install version 5.65 of the LWP module in my perl 5.6.1
libraries.  The Makefile.PL tells me I need Digest::MD5 which I've tried
to find at CPAN.  The only module of that name I can find is part of
perl 5.8.  Can I pick up the Digest::MD5 module in a format I can drop
into 5.6.1?


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

Date: Thu, 17 Oct 2002 10:46:32 -0700
From: "Newbie" <mike_constant@yahoo.com>
Subject: Re: Installing LWP module on 5.6.1
Message-Id: <aomt1l$na2pg$1@ID-161864.news.dfncis.de>


"Anne Shankland" <nomail@hursley.ibm.com> wrote in message
news:3DAEDB01.4BB79A7@hursley.ibm.com...
> I'm trying to install version 5.65 of the LWP module in my perl 5.6.1
> libraries.  The Makefile.PL tells me I need Digest::MD5 which I've tried
> to find at CPAN.  The only module of that name I can find is part of
> perl 5.8.  Can I pick up the Digest::MD5 module in a format I can drop
> into 5.6.1?

http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.20.tar.gz

However, you might want to run ppm on windows, and perl -MCPAN -e
'install("LWP")' on *nixes.  These utilities will automatically download and
install prerequisite modules.




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

Date: Thu, 17 Oct 2002 17:52:21 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Is perlmonks.com down today? Or is just me.
Message-Id: <b9ttqu84jlpn1tl31io7aofojj87261l36@4ax.com>

zentara wrote:

>On 16 Oct 2002 14:22:44 -0700, russellcecala@netscape.net (Russell
>Cecala) wrote:
>
>>Anyone know what's up with perlmonks.com?
>
>Isn't it perlmonks.org?

Both.

-- 
	Bart.


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

Date: Thu, 17 Oct 2002 10:09:28 -0500
From: "Bob Dover" <dover@nortelnetworks.com>
Subject: Re: Newbie help extracting strings
Message-Id: <aomjp1$b9$1@bcarh8ab.ca.nortel.com>

"LeshPhilling" wrote...
>
> It seems like it should be simple to strip out everything but the
> actual URL.  I know that the LWP module would make things much easier,
> but I wanted to do this as pattern matching exercise.  Is what I'm
> trying to do that hard, or am I just a thickie?

Its not hard.  Try perldoc perlre.




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

Date: Thu, 17 Oct 2002 11:30:08 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Newbie help extracting strings
Message-Id: <slrnaqtpcg.308.tadmc@magna.augustmail.com>

Bob Dover <dover@nortelnetworks.com> wrote:
> "LeshPhilling" wrote...
>>
>> It seems like it should be simple to strip out everything but the
>> actual URL.  I know that the LWP module would make things much easier,
>> but I wanted to do this as pattern matching exercise.  Is what I'm
>> trying to do that hard, or am I just a thickie?
> 
> Its not hard.  


Processing arbitrary HTML _is_ hard.



> Try perldoc perlre.


Doing it with pattern matching is more like "impossible" than "hard".

See:

   perldoc -q HTML

      "How do I remove HTML from a string?"

for some "hard" examples.


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


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

Date: 17 Oct 2002 17:40:54 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Newbie help extracting strings
Message-Id: <u9n0pdm31l.fsf@wcl-l.bham.ac.uk>

"Bill Smith" <wksmith@optonline.net> writes:

> ... the code after my signature.

You should probably avoid using the favorite catch-phrases of people who
have made themselves deeply unpopular least you pick up some of their
unpopularity by association. 

BTW: By convention a signature in a text/plain internet message starts
at "\n-- \n" and ends at EOF.  There was, in the conventional sense,
no signature in your message, and if there had been there could have
been nothing after it.

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


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

Date: 17 Oct 2002 17:38:02 GMT
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Problems with perl.org/perlmongers.org websites and email addresses
Message-Id: <aomshq$j3d$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Bart Lateur:

> The website <http://lists.perl.org> is offline, gining me a 500 "could
> not connect to server" error. I tried to warn the webmaster via
><lists@perlmongers.org> but my SMTP server refuses to send mail to that
> address:

So eventually here's Elaine's response to my mailed question regarding
the downtime of lists.perl.org:

    The box it lives on is having some trouble and I'm in the middle of
    getting my house ready to sell so it hasn't been a good week.
    However, if you try lists.cpan.org you should find what you are
    looking for :) If I don't get the box back in shape by friday I'll
    get the guy who does the perl.org dns to point it at the box it runs
    on now.

    e.

Tassilo
-- 
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;


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

Date: Thu, 17 Oct 2002 16:02:51 GMT
From: "PinkPuppy" <spam@stinks.com>
Subject: RegExp with a variable
Message-Id: <LaBr9.849$XsJ4.27590842@news2.randori.com>

I'm pretty well-versed in RegEx's but not with Perl.

If I have...
if ( $mystring =~ /abc/ ) {

how can I write this expression with abc in a variable?
That is...
(pseduocode)
$test = "abc";
if ($mystring =~ /$test/ ) {





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

Date: Thu, 17 Oct 2002 11:28:16 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: RegExp with a variable
Message-Id: <slrnaqtp90.308.tadmc@magna.augustmail.com>

PinkPuppy <spam@stinks.com> wrote:

> how can I write this expression with abc in a variable?


> $test = "abc";
> if ($mystring =~ /$test/ ) {


What happened when you tried it?


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


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

Date: 17 Oct 2002 17:33:26 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: RegExp with a variable
Message-Id: <u9ptu9m3e1.fsf@wcl-l.bham.ac.uk>

"PinkPuppy" <spam@stinks.com> writes:

> (pseduocode)
> $test = "abc";
> if ($mystring =~ /$test/ ) {

That is not pseudocode - it is perfectly good Perl.

Note the // arround $test _can_ be ommited by IMNSHO they should not
be.

Quick - get a computer with Perl on it and stop burning up all the
goodwill this newsgroup will extend you on trivial questions before
you get to something that you _really_ need help with.

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


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

Date: Thu, 17 Oct 2002 17:03:22 GMT
From: "PinkPuppy" <spam@stinks.com>
Subject: Re: RegExp with a variable
Message-Id: <u3Cr9.855$XsJ4.51052579@news2.randori.com>

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnaqtp90.308.tadmc@magna.augustmail.com...
> PinkPuppy <spam@stinks.com> wrote:
>
> > how can I write this expression with abc in a variable?
>
>
> > $test = "abc";
> > if ($mystring =~ /$test/ ) {
>
>
> What happened when you tried it?
>

Oh good grief... I didn't of course.  I assumed that it wouldn't work cuz it
won't work in JavaScript like that.

My bad, I'll try it now.  I suppose if I actually wanted to look for the
string literal $test, I'd have to escape the $?




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

Date: Thu, 17 Oct 2002 17:55:39 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: RegExp with a variable
Message-Id: <ccutqukkoasrpf635ba79r5b1pfa5a4c2s@4ax.com>

PinkPuppy wrote:

>My bad, I'll try it now.  I suppose if I actually wanted to look for the
>string literal $test, I'd have to escape the $?

It looks to me like you've got it nailed.

-- 
	Bart.


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

Date: Thu, 17 Oct 2002 16:48:37 +0100
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: Where can I learn about Perl & ActiveX and OLE
Message-Id: <3DAEDBD5.F11ADCD7@oracle.com>

Christian Kappler wrote:

> Hello,
>
> I would like to learn some basics about ActiveX and OLE and I would like to
> learn how I can use ActiveX and OLE with Perl.
>
> Where can I find tutorials for this (Best on beginners level)?
>
> Thanks!
>
> Regards,
>
>   Christian

There's a Win32::OLE module included with ActiveState Perl (or available from
CPAN) and a section on OLE in this FAQ which is quite useful.

http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/faq/Windows/ActivePerl-Winfaq12.html

Graham Wood



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

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


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