Re: splitting and replacing characters

2009-11-09 Thread tom smith
On Mon, Nov 9, 2009 at 8:30 PM, tom smith wrote: > > On Mon, Nov 9, 2009 at 10:56 AM, Jim Gibson wrote: > >> However, here is a shortened form using regular expression: >> >> my @output = $line =~ m{ \G (..) .. }gx; >> >> Verify how either of these wor

Re: splitting and replacing characters

2009-11-09 Thread tom smith
On Mon, Nov 9, 2009 at 10:56 AM, Jim Gibson wrote: > However, here is a shortened form using regular expression: > > my @output = $line =~ m{ \G (..) .. }gx; > > Verify how either of these works when you do not have a multiple of 2 > characters in your input. > > It has other problems too: use

Re: can I wipe cpan off my computer?

2009-11-08 Thread tom smith
On Sun, Nov 8, 2009 at 12:39 AM, tom smith wrote: > > On Sat, Nov 7, 2009 at 7:57 AM, Shawn H Corey wrote: > >> tom smith wrote: >> > I actually read something that said not to install Bundle::CPAN. Then >> > sometime later I tried to install my first modu

Re: can I wipe cpan off my computer?

2009-11-07 Thread tom smith
On Sat, Nov 7, 2009 at 7:57 AM, Shawn H Corey wrote: > tom smith wrote: > > I actually read something that said not to install Bundle::CPAN. Then > > sometime later I tried to install my first module, and in the fog of > > trying everything possible to get cpan to insta

Re: can I wipe cpan off my computer?

2009-11-07 Thread tom smith
On Sat, Nov 7, 2009 at 6:27 AM, Shawn H Corey wrote: > tom smith wrote: > > On Fri, Nov 6, 2009 at 9:34 AM, Shawn H Corey > <mailto:shawnhco...@gmail.com>> wrote: > > I think the OP is talking about the new modules that don't always > play > >

Re: Change tag case

2009-11-07 Thread tom smith
On Sat, Nov 7, 2009 at 2:45 AM, Ramesh, Marimuthu wrote: > > > Hi, > > > > I have some 3000 sgml files, where I need to change the tag case from > upper case to lower case. > > > > Example: Change This is an image to id="IMG1">This is an image. > > > > Note that the tag name and the attribute nam

Re: foreach loop

2009-11-06 Thread tom smith
On Fri, Nov 6, 2009 at 6:48 PM, John W. Krahn wrote: > tom smith wrote: > >> On Mon, Nov 2, 2009 at 5:10 AM, John W. Krahn wrote: >> >> Philip Potter wrote: >>> >>> 2009/11/2 Thomas Bätzler : >>>> >>>> while( my $line = <

can I wipe cpan off my computer?

2009-11-06 Thread tom smith
Hi, Is there an easy way to wipe cpan off my computer? I would like to try a fresh install to see if that cures all the problems I've had with cpan. So far I can't install any modules with cpan. The latest errors are: $ sudo perl -MCPAN -e shell Password: cpan shell -- CPAN

Re: must satisfy _unknown_ number of regexp patterns

2009-11-06 Thread tom smith
On Fri, Nov 6, 2009 at 2:04 AM, tom smith wrote: > > > On Fri, Nov 6, 2009 at 12:15 AM, John W. Krahn wrote: > >> Michael Alipio wrote: >> >>> Hi, >>> >> >> Hello, >> >> >> if I have a script that accepts any combination

Re: must satisfy _unknown_ number of regexp patterns

2009-11-06 Thread tom smith
On Fri, Nov 6, 2009 at 12:15 AM, John W. Krahn wrote: > Michael Alipio wrote: > >> Hi, >> > > Hello, > > > if I have a script that accepts any combination of the 5 or maybe even >> more options, say, option1, option2, option3... >> >> >> Now, after collecting the options, for each option, there

Re: can't post to perl.beginners

2009-11-03 Thread tom smith
On Tue, Nov 3, 2009 at 12:51 PM, Bob goolsby wrote: > Um -- this one got through. What kind of error message did you > receive from one of the posts that didn't go through? > > > B > > On Mon, Nov 2, 2009 at 9:40 PM, Charles DeRykus wrote: > > Hello, > > > > I subscribed to perl.beginners via G

Re: Problem about substitution..

2009-11-03 Thread tom smith
On Tue, Nov 3, 2009 at 4:33 PM, tom smith wrote: > Thanks for the tips! More comments below. > I saw it written the other way somewhere, and I thought it looked cleaner. > I'll do it your way from now on. > > >> >> if ($line =~ /\((.*?)\)/) { &g

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-03 Thread tom smith
On Mon, Nov 2, 2009 at 3:47 PM, Jeremiah Foster wrote: > > On Nov 2, 2009, at 20:38, tom smith wrote: > > On Mon, Nov 2, 2009 at 8:02 AM, Peter Scott wrote: >> >> On Mon, 02 Nov 2009 04:25:18 -0700, Tom Smith wrote: >>> >>> I believe that your HTML::P

Re: Problem about substitution..

2009-11-03 Thread tom smith
Thanks for the tips! More comments below. On Tue, Nov 3, 2009 at 4:10 AM, John W. Krahn wrote: > tom smith wrote: > >> On Mon, Nov 2, 2009 at 7:41 PM, Remy Guo wrote: >> >> i've got problem when trying to perform a substitution. >>> >>&g

Re: How do I pick one random element from an array?

2009-11-03 Thread tom smith
On Tue, Nov 3, 2009 at 12:11 AM, Majian wrote: > Hi ,all : > > I want to know if there is a way in which I can randomnize(?) the content > in > an array. > > In this example : > > my @array = ('uriel', 'daniel', 'joel', 'samuel'); > > Now what I want is create a process so every time I print the

Re: Problem about substitution..

2009-11-03 Thread tom smith
On Mon, Nov 2, 2009 at 7:41 PM, Remy Guo wrote: > hi folks, > i've got problem when trying to perform a substitution. > > the text file i want to process is like this: > ... > XX { > ABDADADGA > afj*DHFHH > } (a123) > XXDFAAF { > af2hwefh > fauufui > } (b332) > ... > > i want to match the

Re: Learning Perl Student Workbook

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 10:36 AM, Telemachus wrote: > On Mon Nov 02 2009 @ 9:33, Parag Kalra wrote: > > Hey Folks, > > > > This thread was about book - 'Learning Perl Student Workbook' and not the > > book - 'Learning Perl' > > > > So is there a way we can buy genuine/official/legal ebook version

Re: suggestion for FAQ

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 12:35 PM, Paul Johnson wrote: > On Mon, Nov 02, 2009 at 10:59:09AM -0500, Uri Guttman wrote: > > >>>>> "ts" == tom smith writes: > > > > ts> Hi, > > ts> Nowhere in the FAQ does it list the address to which you

Re: Regex to array woes

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 7:54 AM, Brent Clark wrote: > Hiya > > I was hoping that someone would be kind to help me. > > I have a string like so : > > Haresources : 10.203.4.5, Interfaces : 10.203.4.5 10.203.4.7 > > Im trying to get the ip's after Interfaces into an array, but for the likes > of me,

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 8:02 AM, Peter Scott wrote: > On Mon, 02 Nov 2009 04:25:18 -0700, Tom Smith wrote: > > base/message-charset.t 1/21 Can't locate > > auto/HTML/Parser/utf8_mode.alin @INC (@INC contains: ../blib/lib > > ../blib/arch ../. > > /System/

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 5:36 AM, Shameem Ahamed wrote: > > I think, it is installed successfully. > > Please run the below script to make sure that it is installed. > > use LWP::Simple; > > print "LWP/Simple.pm is installed in   $INC{'LWP/Simple.pm'} \n"; > $ perl --version This is perl, v5.8.6 bu

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 3:45 AM, Shameem Ahamed wrote: > Tom, > > The make test it self returned error. > > So the problem is not with the cpan. Please check you have all the > dependencies met. You can paste the make test results here. It will show the > exact dependency errors. > > or else, get t

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-02 Thread tom smith
On Mon, Nov 2, 2009 at 3:45 AM, Shameem Ahamed wrote: > Tom, > > The make test it self returned error. > > So the problem is not with the cpan. Please check you have all the > dependencies met. You can paste the make test results here. It will show the > exact dependency errors. > > or else, get t

tried to install my first module (Mac OSX 10.4.11)

2009-11-02 Thread tom smith
1) I did: $ sudo cpan which asked me a lot of questions. I accepted the defaults. 2) Then as described here: http://sial.org/howto/perl/life-with-cpan/macosx/ I did: cpan> o conf makepl_arg "INSTALLBIN=/usr/local/bin INSTALLSCRIPT=/usr/local/bin" cpan> o conf commit 3) Then I did: cpan>

suggestion for FAQ

2009-11-02 Thread tom smith
Hi, Nowhere in the FAQ does it list the address to which you can send your beginning programming questions. The FAQ lists the address for subscribing: beginners-subscr...@perl.org But the FAQ doesn't list the email address to which you can send your questions. For experienced list readers, it

Re: Perl-based content managers

2007-03-14 Thread Tom Smith
Igor Sutton Lopes wrote: On 2007/03/14, at 17:13, Tom Smith wrote: I've been trying to find a good Perl-based content manager. There are a myriad of PHP ones available, complete with site design templates and such (like phpWebSite and Joomla)--but Perl-based ones seem to be pretty s

Perl-based content managers

2007-03-14 Thread Tom Smith
I've been trying to find a good Perl-based content manager. There are a myriad of PHP ones available, complete with site design templates and such (like phpWebSite and Joomla)--but Perl-based ones seem to be pretty sparse. I was really hoping to go Perl-based with the CMS, but if I can't... I

Perl Frameworks?

2007-03-07 Thread Tom Smith
I'm curious... With all the buzz about MVC frameworks now, what does Perl have for this? The only two that I'm aware of are Gantry and Catalyst (Catalyst appears to be more complete)--are there others? And which one would be considered the defacto standard (most widely used or accepted)? -- T

Re: URL too long

2007-02-28 Thread Tom Smith
Tatiana Lloret Iglesias wrote: but the problem is that i cannot modify form html code because it's a public external website If the QUERY_STRING is too long for the URL, your only option is to use POST. GET will allow for "canned" queries--that is, you can create a link that will execut

Re: URL too long

2007-02-28 Thread Tom Smith
Tatiana Lloret Iglesias wrote: Yes! that's the problem, GET method doesnt allow very very long url's ... how can I use POST from Perl code? do you have any example? GET and POST are part of XHTML, not Perl. All you need to do is change your tag to include method="post" instead of method="get"

Re: Opening multiple files for parsing

2007-02-08 Thread Tom Smith
John W. Krahn wrote: Tom Smith wrote: I'm writing a Perl script to parse 31 maillog files. The files are named maillog, maillog.1, and so on up to 31. This is the default logrotate scheme for naming rotated logs. My current order for processing these files is this: 1) Open the directo

Opening multiple files for parsing

2007-02-07 Thread Tom Smith
I'm writing a Perl script to parse 31 maillog files. The files are named maillog, maillog.1, and so on up to 31. This is the default logrotate scheme for naming rotated logs. My current order for processing these files is this: 1) Open the directory. 2) List maillog* files in the directory and

Re: Any Perl graphing libraries with alpha blending?

2007-01-14 Thread Tom Smith
Dr.Ruud wrote: Daniel Kasak schreef: I'm after a Perl graphing library that includes alpha blending support. I've checked out GD::Graph, but it *doesn't* support alpha blending. Are there any options? I know of jpgraph for PHP ( which is excellent for open-source stuff, but the commercial li

Re: Displaying a user's group memberships

2006-12-21 Thread Tom Smith
Chad Perrin wrote: On Thu, Dec 21, 2006 at 08:05:05AM -0700, Tom Smith wrote: Dr.Ruud wrote: Chad Perrin schreef: Of course, if you're going to call out of the Perl script to the id utility, you may as well skip the Perl script entirely and just enter this at the

Re: Displaying a user's group memberships

2006-12-21 Thread Tom Smith
Tom Smith wrote: Dr.Ruud wrote: Chad Perrin schreef: Dr.Ruud: TIMTOWTDI. On the shell machines of my provider (FreeBSD) the "id" approach will work, and the "/etc/group" one won't. I don't think that has anything to do with it being FreeBSD.

Re: Displaying a user's group memberships

2006-12-21 Thread Tom Smith
Chad Perrin wrote: On Thu, Dec 21, 2006 at 01:48:38AM -0600, Mumia W. wrote: On 12/21/2006 12:42 AM, Tom Smith wrote: Mumia W. wrote: use strict; use warnings; $_ = `id $ARGV[0]`; s/.*?groups=// && print "@{[ /\((\w+)\)/g ]}\n"; I'm not trying

Re: Displaying a user's group memberships

2006-12-21 Thread Tom Smith
Dr.Ruud wrote: Chad Perrin schreef: Dr.Ruud: TIMTOWTDI. On the shell machines of my provider (FreeBSD) the "id" approach will work, and the "/etc/group" one won't. I don't think that has anything to do with it being FreeBSD. That was and is also what I don't think. I

[Fwd: Re: Displaying a user's group memberships]

2006-12-21 Thread Tom Smith
Sorry, I sent this to the poster rather than the list... My bad. Original Message Subject:Re: Displaying a user's group memberships Date: Wed, 20 Dec 2006 20:39:13 -0700 From: Tom Smith <[EMAIL PROTECTED]> To: John W. Krahn <[EMAIL PROTECTE

[Fwd: Re: Displaying a user's group memberships]

2006-12-21 Thread Tom Smith
Sorry, I sent these to the poster rather than the list--my bad. Original Message Subject:Re: Displaying a user's group memberships Date: Wed, 20 Dec 2006 20:23:53 -0700 From: Tom Smith <[EMAIL PROTECTED]> To: John W. Krahn <[EMAIL PROTECTE

Re: Displaying a user's group memberships

2006-12-21 Thread Tom Smith
Mumia W. wrote: On 12/21/2006 12:42 AM, Tom Smith wrote: Mumia W. wrote: use strict; use warnings; $_ = `id $ARGV[0]`; s/.*?groups=// && print "@{[ /\((\w+)\)/g ]}\n"; I'm not trying to be argumentative or say that this is "wrong"... But does anyone else ag

Re: Displaying a user's group memberships

2006-12-20 Thread Tom Smith
Mumia W. wrote: On 12/20/2006 04:14 PM, Tom Smith wrote: [...] So is there a better way to do this, or perhaps a cleaner way? Thanks again for your help! ~ Tom use strict; use warnings; $_ = `id $ARGV[0]`; s/.*?groups=// && print "@{[ /\((\w+)\)/g ]}\n"; I&

Re: Displaying a user's group memberships

2006-12-20 Thread Tom Smith
Chad Perrin wrote: On Mon, Dec 18, 2006 at 04:50:57PM -0700, Tom Smith wrote: I need to capture a user's group memberships for further processing in a Perl script. The user's username is passed to the script via the command line and captured with ARGV. From there, I want to det

Displaying a user's group memberships

2006-12-18 Thread Tom Smith
I need to capture a user's group memberships for further processing in a Perl script. The user's username is passed to the script via the command line and captured with ARGV. From there, I want to determine the group memberships (much like executing `groups` from the command line) and run those

Re: How to make a perl program to an exe file

2006-11-21 Thread Tom Smith
Dharshana Eswaran wrote: Hi Rajeev, I tried using Perlcc, but the following error occurs. bash$ perlcc zzz.pl Can't exec "gcc": No such file or directory at /XXX/xxx/perl/bin/perlcc line 347. bash$ What does this mean? or Where it has gone wrong? Thanks and Regards, Dharshana Make sure you

DB question

2006-11-06 Thread Tom Smith
Hi, This might be a little OT, but I thought I'd pose the question anyway... Let me know if it's OT and I'll take it elsewhere. I'm a little confused about the whole database thing. I mean, I understand them and know what they are but which one should really be used for mission critical appl

Re: line position

2006-11-03 Thread Tom Smith
Tim Wolak wrote: All, I need to parse lines from a file and at a certain position test to see if it is what a want, if so I need to grab information from other positions in the line and drop it into a file. As I have never done this before, can someone point me in the right direction as to get