[28215] in Perl-Users-Digest
Perl-Users Digest, Issue: 9579 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 9 03:05:42 2006
Date: Wed, 9 Aug 2006 00:05:07 -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 Wed, 9 Aug 2006 Volume: 10 Number: 9579
Today's topics:
Re: A possable bug in the "warnings" pragma. <wiles@IgnoreMeModarnis.Com>
Cannot authenticate to NNTP server with Net::NNTP authi usenet@DavidFilmer.com
Re: Cannot authenticate to NNTP server with Net::NNTP a <rvtol+news@isolution.nl>
Re: Cannot authenticate to NNTP server with Net::NNTP a <rvtol+news@isolution.nl>
convert structured strings to possibly deep hash of has <seven.reeds@gmail.com>
Re: How to "convert" a string into a variable name? <nospam@somewhere.com>
mailto tag in html generated with perl kevin12345@cableone.net
Re: mailto tag in html generated with perl <glex_no-spam@qwest-spam-no.invalid>
new CPAN modules on Wed Aug 9 2006 (Randal Schwartz)
Re: perl editor <sir-e@tlen.pl>
Re: perl editor <cmic@caramail.com>
Question about Arrays <guenther.sohler@wipro.com>
Re: Simple file list in directory to array <tadmc@augustmail.com>
Re: Simple file list in directory to array usenet@DavidFilmer.com
string conversion tdelov@gmail.com
Re: string conversion <xicheng@gmail.com>
Re: string conversion <glex_no-spam@qwest-spam-no.invalid>
Re: string conversion tdelov@gmail.com
Taking snapshot of a webpage sujay.tukai@gmail.com
Re: which file, regestry, environment variables do perl <sisyphus1@nomail.afraid.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 08 Aug 2006 21:36:56 -0400
From: Dale Wiles <wiles@IgnoreMeModarnis.Com>
Subject: Re: A possable bug in the "warnings" pragma.
Message-Id: <87psfazo3r.fsf@IgnoreMe.IgnoreMemodarnis.com>
I've gotten a lot of commentary about this post, (most about my rotten
news poster, I'm trying a new one.)
I've also got confirmation that the bug exists (either in my code or the
compiler) on other systems so it isn't a screw up on my install.
What I didn't get was which versions of Perl showed the weird behavior.
I assume that "A. Sinan Unur" is on a Windows box, but which version of
Perl are you running? Has anyone run it on a recent version of Perl
and not got the weirdness? Has anyone run it on v5.8.8?
--
Dale Wiles
Remove IgnoreMe from my address to email.
-----------------
www.Newsgroup-Binaries.com - *Completion*Retention*Speed*
Access your favorite newsgroups from home or on the road
-----------------
------------------------------
Date: 8 Aug 2006 17:11:36 -0700
From: usenet@DavidFilmer.com
Subject: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <1155082296.203967.290390@75g2000cwc.googlegroups.com>
Greetings. Kindly consider the following code which illustrates my
question regarding authentication on an NNTP server via the authinfo
method of Net::NNTP:
http://search.cpan.org/~gbarr/libnet-1.19/Net/NNTP.pm
For the purpose of this posting, I have opened a throwaway free (but
authenticating) news account which I will close shortly (to avoid
abuse). The logon/account info in this script IS VALID, and I have
verified that the account works fine in my slrn news client. You have
my permission to use this account (while it exists, if you wish) for
your own testing and debugging purposes regarding this post.
#!/usr/bin/perl
use strict; use warnings;
use Net::NNTP;
my $server = 'news6.open-news-network.org'; #auth required
#my $server = 'allnews.readfreenews.net'; #no authentication
my $nntp = new Net::NNTP($server) or die $!;
print "Date: " . $nntp -> date() ."\n"; #verify server connection
if ($server =~/news\d.open-news-network.org/) {
print "Authenticating to $server\n";
$nntp->authinfo('nopam@davidfilmer.net', '6boc&8qfGO');
}
$nntp -> group('comp.lang.perl.misc');
print map "$_\n", @{$nntp->newnews ( $nntp -> date() - 7200 )};
__END__
(the userid shown is NOT a typo - it really is 'nopam', not 'nospam')
The program should print the msgid's for the past couple hours'
activity in this newsgroup.
Please note that the $server variable may be declared using a different
server (allnews.readfreenews.net). This is a free newsserver which
does not require authentication. If you switch which $server is
commented-out, you will observe that the script works as expected using
the non-authenticating server.
With either server, the validity of the nntp object is established by
querying the server for it's datestamp (which does not require
authentication). So I know I'm talking to both servers, but I'm unable
to pull data from the one which requires authentication. My problem
seems realted to the authinfo method, but I cannot see what I've done
wrong.
I observed this problem on my "real" newsserver (giganews). I opened
the throwaway account mentioned here for additional testing and for
posting here.
Any assistance is greatly appreciated.
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Wed, 9 Aug 2006 03:37:11 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <ebbl9s.1d8.1@news.isolution.nl>
usenet@DavidFilmer.com schreef:
> Greetings. Kindly consider the following code which illustrates my
> question regarding authentication on an NNTP server via the authinfo
> method of Net::NNTP:
> http://search.cpan.org/~gbarr/libnet-1.19/Net/NNTP.pm
>
> For the purpose of this posting, I have opened a throwaway free (but
> authenticating) news account which I will close shortly (to avoid
> abuse). The logon/account info in this script IS VALID, and I have
> verified that the account works fine in my slrn news client. You have
> my permission to use this account (while it exists, if you wish) for
> your own testing and debugging purposes regarding this post.
>
> #!/usr/bin/perl
> use strict; use warnings;
> use Net::NNTP;
> my $server = 'news6.open-news-network.org'; #auth required
> #my $server = 'allnews.readfreenews.net'; #no authentication
>
> my $nntp = new Net::NNTP($server) or die $!;
my $nntp = new Net::NNTP($server, Debug => 1) or die $! ;
> print "Date: " . $nntp -> date() ."\n"; #verify server connection
>
> if ($server =~/news\d.open-news-network.org/) {
if ($server =~/^news\d+\.open-news-network\.org/$) {
> print "Authenticating to $server\n";
> $nntp->authinfo('nopam@davidfilmer.net', '6boc&8qfGO');
> }
> $nntp -> group('comp.lang.perl.misc');
> print map "$_\n", @{$nntp->newnews ( $nntp -> date() - 7200 )};
>
> __END__
>
> (the userid shown is NOT a typo - it really is 'nopam', not 'nospam')
>
> The program should print the msgid's for the past couple hours'
> activity in this newsgroup.
[...]
Net::NNTP=GLOB(0x81f3b50)>>> NEWNEWS comp.lang.perl.misc 060808 232753
GMT
Net::NNTP=GLOB(0x81f3b50)<<< 502 NEWNEWS command disabled by
administrator
Can't use an undefined value as an ARRAY reference at ./Net_NNTP.pl line
19.
[...]
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Wed, 9 Aug 2006 04:46:45 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <ebbphe.r0.1@news.isolution.nl>
usenet@DavidFilmer.com schreef:
> $nntp -> group('comp.lang.perl.misc');
#!/usr/bin/perl
use strict ;
use warnings ;
use Net::NNTP ;
use Data::Dumper ;
sub max { $_[0] > $_[1] ? $_[0] : $_[1] } ;
my $server = 1 # authentication required
? 'news6.open-news-network.org'
: 'allnews.readfreenews.net' ;
my $nntp = new Net::NNTP $server, Debug => 1
or die $! ;
# verify server connection
print "=> Date: ". $nntp->date() ."\n" ;
if ($server =~ /^news\d+\.open-news-network\.org$/)
{
print "=> Authenticating to $server\n";
$nntp->authinfo('nopam@davidfilmer.net', '6boc&8qfGO')
or die $! ;
}
my ($articles, $first, $last) =
$nntp->group('comp.lang.perl.misc')
or die $! ;
print "=> Articles: $first-$last\n" ;
my $xover = $nntp->xover(max($last-2, $first), $last)
or die $! ;
print "=> ", Data::Dumper->Dump([$xover], [qw(*xover)]) ;
my $newnews = $nntp->newnews($nntp->date() - 7200)
or die $! ;
print map "=> $_\n", @$newnews ;
__END__
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: 8 Aug 2006 22:52:15 -0700
From: "seven.reeds" <seven.reeds@gmail.com>
Subject: convert structured strings to possibly deep hash of hashes
Message-Id: <1155102735.358626.78050@i3g2000cwc.googlegroups.com>
Hi,
I have a list of well structured strings, actually they are file paths.
This just measn there are strings of '/' seperated sub-strings. I can
easily split these into an array. My question is really one of
building a HoH based on all of the string records. My goal is to take
strings like:
/file.txt
/a/file.txt
/a/b/c
/a/b/c/file.txt
/z/m/w/file.txt
and produce something like:
%dir_hash(
'file.txt' => '',
'a' => {
'file.txt' => '',
'b' => {
'c' => {
'file.txt'
}
}
},
'z' => {
'm' => {
'w' => {
'file.txt' => ''
}
}
}
)
My current feeble attempt was the following. I am getting lost in the
"\%"s and the "%{}"s. To pre-answer some obvious suggestions: yes, I
have read perlref and perlreftut and my perl book(s) but I am not
seeing how to recursibely build/populate a HOH in this situation. I
have looked through CPAN and did find the IO::Dir module which might
help if the data was not static and i was pulling it from the
originating directory instead of a flat file.
suggestions?
#!/usr/local/bin/perl -w
use strict;
select(STDOUT);
$|++;
use Data::Dumper;
my @path = ();
my %path_hash = ();
@path = split('/', "/a/b/c/d/e/f/g.ics");
shift(@path) if ($path[0] eq "");
&make_path_hash(\%path_hash, @path);
print STDOUT Dumper(%path_hash);
sub make_path_hash
{
my ($path_hash, $this, @list) = @_;
return if (! defined($this));
$this =~ s/^\s+//s;
$this =~ s/\s+$//s;
return if ($this eq "");
$path_hash->{$this} = 1 if (! defined($path_hash->{$this}));
&make_path_hash(\%{ $path_hash->{$this} }, @list);
}
------------------------------
Date: Wed, 9 Aug 2006 00:31:24 -0400
From: "Anonymous" <nospam@somewhere.com>
Subject: Re: How to "convert" a string into a variable name?
Message-Id: <w7idneaJp-Nz-UTZnZ2dnUVZ_umdnZ2d@comcast.com>
Yes, I have read the posting guidelines and I'm top posting anyway, so
there!
There is nothing wrong with showing a school kid how to use and load a
machine gun, just as there is nothing wrong with telling a newbie how to use
symbolic references. On the other hand, giving a school kid a loaded
machine gun would be very irresponsible, but what is the worst thing a
person could do with symrefs? Oh my god, they could crash their
program!!!!!! And where was it established that the question was posted by
a newbie and why should I care? I didn't know that certain information was
only to be disclosed to other members of the elite and I don't remember
signing a non-disclosure. What a minute, does that mean I haven't been
inducted to the elite and I'm not suppose to have that information either?
Is that why you were so incensed that I posted without my e-mail address so
the thought police, aka clpm cops, can track me down and throw me into the
gulag? The best way to learn is to try something new and see what happens,
this is the way newbies turn into experts.
I have been reading and posting to this newsgroup for many years. The main
reason I read the newsgroup is to learn more about Perl, and reading
questions and answers in the newsgroup furthers that. I don't post often
because:
a) I have a real job and a life and I only peruse the newsgroups every few
days, and sometimes not for weeks.
b) If I don't have anything CONSTRUCTIVE to add, I don't post.
Berating and bulling posters discourages others from posting questions.
Stupidity is in the eye of the beholder, but then again I'm sure people go
out of their way to post stupid questions so they can be belittled by the
likes of you an Sinan.
I have never posted a question here, and probably never will. I know how to
read the FAQs, and know how to read a book, and just about everything you
need to know about Perl is published somewhere. The questions I would ask,
I would be told to read the FAQ anyway, so what's the point? Yeah, the
amount of time it would take to answer the question would the same or less
than telling me to read the FAQ, but I would be told that anyway. I would
LIKE to be able to post simple questions because someone here could probably
answer it in 2 minutes or less, while it might take me much longer than that
to track down the correct documentation to read. It would be a tragedy to
post an answer to a question that someone could read in the documentation.
The posting guidelines are just that GUIDELINES. There are no rules here.
If you want rules and want them followed, go troll comp.lang.perl.moderated.
I don't currently work as a professional programmer and don't have any plans
to do so, but it still hurts that you wouldn't recommend me. I'm so hurt
I'm seriously considering rewriting my current Perl project to use symrefs
and killing my program. You have also put me in my place and proven to me I
don't rule here because I called this a "forum and newsgroup" instead of "a
usenet or netnews". You really do RULE here big comp.lang.perl.misc cop
dude!!!!!
Making you sound stupid sure is a lot of fun, maybe there is something to
being a Usenet bully. It's not very constructive, or nice and I once read
"it's nice to be important, but it's more important to be nice." I wonder
where I could have read that....
Scott
Ooopps, I mean "anonymous"
"Uri Guttman" <uri@stemsystems.com> wrote in message
news:x7mzajrg1c.fsf@mail.sysarch.com...
>>>>>> "A" == Anonymous <nospam@somewhere.com> writes:
>
> A> This message group is NOT a programming class, it is a forum where
> A> people can ask questions about Perl and others can HELP them. Just
> A> because YOU don't think it is good programming practice is no
> A> reason not to answer the OP's question. Your idea of help is to
> A> berate and bully posters, lecture on what you think is good
> A> practice, what you think is not good practice, how to post, read
> A> the FAQ, read the docs, etc., etc. This is the most arrogant
> A> newsgroup on the 'net, and your presence here is the number one
> A> contributor to that attitude. Quite frankly this newsgroup would
> A> be a much better and NICER place without you.
>
> when you start answering all those FAQ's yourself and consistantly do it
> in your nicest way, then we will stop doing the job in our way. as for
> the actual request to use symrefs, if you actually think telling a
> newbie how to do such an evil thing is a good idea, then you must also
> like showing schoolkids how to load and use machine guns. they are about
> the same level of nastiness.
>
> maybe you don't realize that symrefs are JUST USING THE SYMBOL TABLE AS
> A DATA STRUCTURE. can you see that using a hash for that would be
> faster, safer, cleaner, better in all possible ways? if not, you should
> not be flaming anyone here but i think you know that, don't you? now if
> you go away then this group will become much nicer. in fact much nicer
> than if sinan went away.
>
> and to top it off, you top posted which is against this groups
> guidelines. you have read those haven't you? they advocate looking for
> answers in the faq.
>
> and as for what this group is, you have no foundation to say anything
> about that until you have been answering questions on a long term basis
> and others grant you the respect based on your skills. note that trolls
> like robic and moronzilla don't qualify but at least they sometimes
> discuss perl itself unlike your silly useless rant.
>
> and it is not a forum or a message group. it is a usenet or netnews
> group. but of course you know that since you rule here.
>
> have a nice coding experience without help from me or most of the
> regulars here. i will make sure to not hire you too.
>
> yours sincerely,
>
> a much bigger clpm cop than you will ever be,
>
> uri
>
> --
> Uri Guttman ------ uri@stemsystems.com --------
> http://www.stemsystems.com
> --Perl Consulting, Stem Development, Systems Architecture, Design and
> Coding-
> Search or Offer Perl Jobs ----------------------------
> http://jobs.perl.org
------------------------------
Date: 8 Aug 2006 15:37:08 -0700
From: kevin12345@cableone.net
Subject: mailto tag in html generated with perl
Message-Id: <1155076628.333785.62810@i42g2000cwa.googlegroups.com>
Hi,
I have a few perl scripts that are generating html files. At the bottom
of the page I have links to contact the webmaster, however, when the
links are generated, they do not show the entire link.
Here is an example:
<a href="mailto:person@place.time.com">Contact Webmaster</a>
When I open the html file, the link only wants to go to
"mailto:person.time.com" with no "@place"
Can anybody help?
Thanks,
Kevin
------------------------------
Date: Tue, 08 Aug 2006 18:10:04 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: mailto tag in html generated with perl
Message-Id: <44d919e4$0$10298$815e3792@news.qwest.net>
kevin12345@cableone.net wrote:
> Hi,
> I have a few perl scripts that are generating html files. At the bottom
> of the page I have links to contact the webmaster, however, when the
> links are generated, they do not show the entire link.
>
> Here is an example:
>
> <a href="mailto:person@place.time.com">Contact Webmaster</a>
>
> When I open the html file, the link only wants to go to
> "mailto:person.time.com" with no "@place"
>
> Can anybody help?
Look at the HTML that's actually generated, since you neglected to show
any perl code, I will only assume that you need to escape the @ when
calling print.
If you add:
use strict;
to your code, it may show you the error of your ways.
------------------------------
Date: Wed, 9 Aug 2006 04:42:07 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Aug 9 2006
Message-Id: <J3prq7.19pL@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
AI-NeuralNet-Kohonen-0.142
http://search.cpan.org/~lgoddard/AI-NeuralNet-Kohonen-0.142/
Kohonen's Self-organising Maps
----
AI-Pathfinding-AStar-0.07
http://search.cpan.org/~acdalton/AI-Pathfinding-AStar-0.07/
Perl implementation of the A* pathfinding algorithm
----
Algorithm-C3-0.03
http://search.cpan.org/~blblack/Algorithm-C3-0.03/
A module for merging hierarchies using the C3 algorithm
----
Authen-PluggableCaptcha-0.02
http://search.cpan.org/~jvanasco/Authen-PluggableCaptcha-0.02/
A pluggable Captcha system for Perl
----
BSD-Jail-Object-0.02
http://search.cpan.org/~mahlon/BSD-Jail-Object-0.02/
----
CGI-Application-Plugin-PageBuilder-0.92
http://search.cpan.org/~cmoore/CGI-Application-Plugin-PageBuilder-0.92/
Simplifies building pages with multiple templates.
----
CPAN-Mini-0.550
http://search.cpan.org/~rjbs/CPAN-Mini-0.550/
create a minimal mirror of CPAN
----
Catalyst-Model-DBIC-Schema-0.18
http://search.cpan.org/~blblack/Catalyst-Model-DBIC-Schema-0.18/
DBIx::Class::Schema Model Class
----
Catalyst-Plugin-Breadcrumbs-1
http://search.cpan.org/~tigris/Catalyst-Plugin-Breadcrumbs-1/
Breadcrumb information for your templates.
----
Catalyst-Plugin-Breadcrumbs-2
http://search.cpan.org/~tigris/Catalyst-Plugin-Breadcrumbs-2/
Breadcrumb information for your templates.
----
Catalyst-Plugin-Breadcrumbs-3
http://search.cpan.org/~tigris/Catalyst-Plugin-Breadcrumbs-3/
Breadcrumb information for your templates.
----
Catalyst-Plugin-Breadcrumbs-4
http://search.cpan.org/~tigris/Catalyst-Plugin-Breadcrumbs-4/
Breadcrumb information for your templates.
----
DBI-1.52
http://search.cpan.org/~timb/DBI-1.52/
Database independent interface for Perl
----
Data-Float-0.003
http://search.cpan.org/~zefram/Data-Float-0.003/
details of the floating point data type
----
Exception-Class-TCF-0.02
http://search.cpan.org/~rvosa/Exception-Class-TCF-0.02/
Java/C++ style exception handling
----
HTML-Form-ForceValue-0.001
http://search.cpan.org/~rjbs/HTML-Form-ForceValue-0.001/
who cares what values are legal, anyway?
----
InSilicoSpectro-Databanks-0.0.4
http://search.cpan.org/~alexmass/InSilicoSpectro-Databanks-0.0.4/
parsing protein/nucleotides sequence databanks (fasta, uniprot...)
----
InSilicoSpectro-Databanks-0.0.5
http://search.cpan.org/~alexmass/InSilicoSpectro-Databanks-0.0.5/
parsing protein/nucleotides sequence databanks (fasta, uniprot...)
----
Lucene-0.01
http://search.cpan.org/~tbusch/Lucene-0.01/
API to the C++ port of the Lucene search engine
----
MediaWiki-1.00
http://search.cpan.org/~spectrum/MediaWiki-1.00/
OOP MediaWiki engine client
----
Net-Radius-1.48
http://search.cpan.org/~luismunoz/Net-Radius-1.48/
----
Net-UKDomain-Nominet-Automaton-1.03
http://search.cpan.org/~cliffordj/Net-UKDomain-Nominet-Automaton-1.03/
Module to handle the Nominet Automaton for domain registration and modification.
----
Net-Z3950-SimpleServer-1.03
http://search.cpan.org/~mirk/Net-Z3950-SimpleServer-1.03/
Simple Perl API for building Z39.50 servers.
----
Object-InsideOut-1.49
http://search.cpan.org/~jdhedden/Object-InsideOut-1.49/
Comprehensive inside-out object support module
----
POE-Component-DirWatch-Object-0.01
http://search.cpan.org/~groditi/POE-Component-DirWatch-Object-0.01/
POE directory watcher object
----
POE-Component-Player-Musicus-1.32
http://search.cpan.org/~mrperson/POE-Component-Player-Musicus-1.32/
a POE wrapper for the musicus audio player
----
ParaDNS-1.0
http://search.cpan.org/~msergeant/ParaDNS-1.0/
a DNS lookup class for the Danga::Socket framework
----
Params-Util-0.17
http://search.cpan.org/~adamk/Params-Util-0.17/
Simple, compact and correct param-checking functions
----
PerlCryptLib-1.03
http://search.cpan.org/~alvarol/PerlCryptLib-1.03/
Perl interface to Peter Guttman's cryptlib API
----
Pugs-Compiler-Rule-0.13
http://search.cpan.org/~fglock/Pugs-Compiler-Rule-0.13/
Compiler for Perl 6 Rules
----
RT-Client-REST-0.24
http://search.cpan.org/~dmitri/RT-Client-REST-0.24/
talk to RT installation using REST protocol.
----
RTx-Timeline-0.03
http://search.cpan.org/~htchapman/RTx-Timeline-0.03/
----
Script-Resume-1.0
http://search.cpan.org/~batman/Script-Resume-1.0/
State keeper for scripts that might abort in the middle of execution but need to pick up where they left off in later invocations.
----
WAP-wmls-1.03
http://search.cpan.org/~perrad/WAP-wmls-1.03/
----
WWW-Mechanize-1.19_02
http://search.cpan.org/~petdance/WWW-Mechanize-1.19_02/
Handy web browsing in a Perl object
----
WWW-Myspace-0.52
http://search.cpan.org/~grantg/WWW-Myspace-0.52/
Access MySpace.com profile information from Perl
----
WWW-TV-0.02
http://search.cpan.org/~tigris/WWW-TV-0.02/
Parse TV.com for information about TV shows.
----
Win32-API-Interface-0.03
http://search.cpan.org/~esskar/Win32-API-Interface-0.03/
Object oriented interface generation
----
XML-DOM-XPath-0.11
http://search.cpan.org/~mirod/XML-DOM-XPath-0.11/
Perl extension to add XPath support to XML::DOM, using XML::XPath engine
----
XML-Feed-0.11
http://search.cpan.org/~btrott/XML-Feed-0.11/
Syndication feed parser and auto-discovery
----
v6-alpha-0.012
http://search.cpan.org/~fglock/v6-alpha-0.012/
----
version-0.67
http://search.cpan.org/~jpeacock/version-0.67/
Perl extension for Version Objects
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Wed, 09 Aug 2006 01:24:41 +0200
From: sir-e <sir-e@tlen.pl>
Subject: Re: perl editor
Message-Id: <s87id25hqs46rele7bubt972as7h0ucigp@4ax.com>
On Mon, 31 Jul 2006 14:48:14 GMT, "syracuse" <syr@bigpond.net.au>
wrote:
>thanks, just trying to learn, I'm comfortable with vi, but thought a nicely
>coloured editor could help with the syntax ...
>Syr.
>
>"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
>news:n22sc2hp2mmsc2vn5tjc1uq8tfo08e9j4f@4ax.com...
>> On Mon, 31 Jul 2006 13:15:08 GMT, "syracuse" <syr@bigpond.net.au>
>> wrote:
>>
>>>anyone knows what is a good free editor to use for perl ?
>>
>> You're not twistedsomenumberwhichidontremember in disguise, are you?
>> ;-)
>>
>> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=editors
>>
>>
>> Michele
>> --
>> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
>> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
>> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
>> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
>
Look at this: http://www.scintilla.org/SciTE.html
Enjoy ;-)
------------------------------
Date: 8 Aug 2006 22:59:42 -0700
From: "cmic" <cmic@caramail.com>
Subject: Re: perl editor
Message-Id: <1155103182.119039.151750@75g2000cwc.googlegroups.com>
Hi
vfoley@gmail.com a =E9crit :
> syracuse wrote:
> > Hi
> > anyone knows what is a good free editor to use for perl ?
> > Thanks
> > Syracuse
>
> Emacs with cperl-mode work very well here.
I do agree. I use Emacs with Linux || Solaris (vtxxx console w/o syntax
coloring) and Emacs under Windows XP too, this one with syntax
"verification" and coloring. Emacs and CVS do fit well. My opinion
though.
--
cmic SysAdmin
------------------------------
Date: Wed, 09 Aug 2006 08:59:43 +0200
From: Guenther Sohler <guenther.sohler@wipro.com>
Subject: Question about Arrays
Message-Id: <pan.2006.08.09.06.59.43.675799@wipro.com>
I'd like to code a little bit more complicated construct, but I dont get
it done
Suppose i have following
my %database;
$database{"fruits"}=("Apple","Pear");
add_fruits(\$database);
sub add_fruits(my $databaseptr)
{
push databaseptr .. fruits "Banana";
}
I dont get the proper characters. Perl always complains.
Can anybody point me out ?
rds
------------------------------
Date: Tue, 8 Aug 2006 22:17:13 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Simple file list in directory to array
Message-Id: <slrnediktp.hes.tadmc@magna.augustmail.com>
darkmoo <nospam@nospam.net> wrote:
> I've completely forgetten how to grab a list of all
> files in a directory and load it up into an array.
my @files = grep -f, glob '* .*';
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 8 Aug 2006 22:15:38 -0700
From: usenet@DavidFilmer.com
Subject: Re: Simple file list in directory to array
Message-Id: <1155100538.123213.265000@p79g2000cwp.googlegroups.com>
A. Sinan Unur wrote:
> That is one reason why I still stick with File::Find.
I believe you will find that File::Find and IO::All behave the same way
when you do the same sorts of things. That's because IO::All is mearly
a proxy for File::Find (and several other modules). IO::All does
almost nothing itself except provide a consistent OO front-end to a
bunch of builtins and modules.
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: 8 Aug 2006 15:13:46 -0700
From: tdelov@gmail.com
Subject: string conversion
Message-Id: <1155075226.340511.287260@m73g2000cwd.googlegroups.com>
Hi.
I was wondering if anyone could offer any helps in a string conversion.
given the following line (this is not a real lp command)
$line = "lp -x -olandscape -ol99 -olm -x";
I'm wondering how would I change "-ol99" to "-ol=99" but not change
-olm
If I do something like this:
$line =~ s/-ol/-ol=/; # this will change -olm
How could I check the if there is a number after the "ol" characters
and only apply the change to that part of the string?
I considered using split along spaces, but prefer an actual string
substitution that works with the whole line rather than processing each
"word" in the line and then joining it again. I have to process many
files and there could be other complications if I start splitting up
each line on spaces.
Thanks.
------------------------------
Date: 8 Aug 2006 15:27:44 -0700
From: "Xicheng Jia" <xicheng@gmail.com>
Subject: Re: string conversion
Message-Id: <1155076064.415642.28630@h48g2000cwc.googlegroups.com>
tdelov@gmail.com wrote:
> Hi.
> I was wondering if anyone could offer any helps in a string conversion.
>
> given the following line (this is not a real lp command)
> $line = "lp -x -olandscape -ol99 -olm -x";
> I'm wondering how would I change "-ol99" to "-ol=99" but not change
> -olm
>
> If I do something like this:
> $line =~ s/-ol/-ol=/; # this will change -olm
> How could I check the if there is a number after the "ol" characters
> and only apply the change to that part of the string?
>
Add a lookahead construct (?=\d):
$line =~ s/-ol(?=\d)/-ol=/g;
Xicheng
------------------------------
Date: Tue, 08 Aug 2006 17:30:02 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: string conversion
Message-Id: <44d91082$0$34079$815e3792@news.qwest.net>
tdelov@gmail.com wrote:
> Hi.
> I was wondering if anyone could offer any helps in a string conversion.
>
> given the following line (this is not a real lp command)
> $line = "lp -x -olandscape -ol99 -olm -x";
> I'm wondering how would I change "-ol99" to "-ol=99" but not change
> -olm
>
> If I do something like this:
> $line =~ s/-ol/-ol=/; # this will change -olm
> How could I check the if there is a number after the "ol" characters
> and only apply the change to that part of the string?
$line =~ s/-ol(\d+)/-ol=$1/;
Read about the many adventures of Regular Expressions at any time:
perldoc perlretut
------------------------------
Date: 8 Aug 2006 15:36:29 -0700
From: tdelov@gmail.com
Subject: Re: string conversion
Message-Id: <1155076588.963069.76200@h48g2000cwc.googlegroups.com>
> Add a lookahead construct (?=\d):
>
> $line =~ s/-ol(?=\d)/-ol=/g;
Thanks. I was sure there was a simple way to do it.
>
> Xicheng
------------------------------
Date: 8 Aug 2006 22:23:57 -0700
From: sujay.tukai@gmail.com
Subject: Taking snapshot of a webpage
Message-Id: <1155101037.188149.243670@b28g2000cwb.googlegroups.com>
Can anyone help me how to take a snapshot of a webpage
------------------------------
Date: Wed, 9 Aug 2006 09:30:07 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: which file, regestry, environment variables do perl install
Message-Id: <44d91f6d$0$22362$afc38c87@news.optusnet.com.au>
"Ben Morrow" <benmorrow@tiscali.co.uk> wrote in message
.
.
>
> Since you mention 'registry' I assume you're on Win32. If you're using
> ActivePerl, the the installer creates the following:
>
> 1. The entire directory tree you installed it into, usually C:/Perl.
> 2. An association for .pl in the registry.
> 3. An entry 'C:\Perl\bin' in %PATH%.
>
With ActiveState perl if, instead of installing the '.msi' package, you
download the '.zip' and install by running 'install.bat' (which is included
in the '.zip') you can install perl to the location of your choice without
doing *anything* to the registry or the path. (You'll be prompted regarding
both those aspects, iirc. Just select the option that best suits your
needs.)
I don't think the '.zip' package has an 'uninstall' capability - not really
a problem.
Cheers,
Rob
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 9579
***************************************