Re: Piping commands into cli perl

2010-07-10 Thread Damon Allen Davison
re text after the '.pm'), so was no input for your one-liner to process. >  | egrep "^lib/ISP/User.pm$" \ This was fixed in your later posts. -d. -- Damon Allen Davison http://allolex.net http://musicindustryrules.com http://thegannet.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: parsing csv

2010-07-02 Thread Damon Allen Davison
On Fri, Jul 2, 2010 at 11:43 AM, Sharan Basappa wrote: > Hi Alan, > > I am not resisting installing but I am having trouble installing > Text::CSV module. > > I would be glad if someone helps with these errors ... Hi Sharan, You might find it a lot easier to install things if you use standard to

Re: parsing csv

2010-07-02 Thread Damon Allen Davison
On 2 Jul 2010, at 09:40, Sharan Basappa wrote: > I have to parse a csv file and convert it into some other format. > Can someone tell me what support perl has for csv parsing. > My requirements are very modest, so somethng simple would be preferable. There is a module on CPAN for this. Using it

Re: Subroutines With Multiple Parameters

2010-03-25 Thread Damon Allen Davison
On Thu, Mar 25, 2010 at 1:54 PM, Pry, Jeffrey wrote: > sub displayPage($) { > >my($server) = shift; >print $server; > } > Hi, I'd repeat the advice about staying away from prototypes, i.e. the '($)' business after your subroutine name. Perl is very good at figuring out wh

Re: OT: VIM perl indentaton

2004-08-27 Thread Damon Allen Davison
t, Damon -- Damon Allen DAVISON http://www.allolex.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regular Expressions - multiplelines

2004-07-26 Thread Damon Allen Davison
. ;) I would also suggest you 'use warnings' when writing code. It'll catch a lot of errors for you, such as a 'Use of uninitialized value in concatenation (.) or string' in your code. You can get a (partial) explanation by adding a 'use diagnostics' line to th

Re: Isolating a word with a certain pattern

2004-07-21 Thread Damon Allen Davison
ut: I am trying to write a script to identify all words having a certain pattern in a text file. Is there in Perl a direct way of isolating a word with a certain pattern? Or has one to check all characters, bearing in mind that a word is a string delimited by two spaces? Best, Damon -- Damon Allen

Re: installed modules

2004-07-05 Thread Damon Allen Davison
Sergei Yatsenko wrote: > How do I know what Perl modules installed on the webserver from Perl script? You might want to have a look at the CPAN FAQ. It lists several ways to do this: http://www.cpan.org/misc/cpan-faq.html#How_installed_modules Best, Damon -- Damon Allen DAVISON h

Re: OT - Perl editing with colors

2004-07-01 Thread Damon Allen Davison
Try % perltidy -html perlfile.pl It works very well for prettyprinting with colors. Best, Damon Ohad Ohad wrote: Say I edit perl script with nedit or gvim and color highlight the syntax. Is there anyway I can print the file WITH the colors? -- Damon Allen DAVISON http://www.allolex.net -- To

Re: A possibly stupid 'Perl' question?

2004-06-26 Thread Damon Allen Davison
have Perl on their systems. Best, Damon Ron Smith wrote: Is it possible to use 'Perl' without having to install it on a particular machine? -- Damon Allen DAVISON http://www.allolex.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <htt

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Damon Allen Davison
Sorry, I was a little too glib. It was Wiggins' suggestion of Email::Valid I should have referred to. Regexp::Common does almost everything else. Damon Damon Allen Davison wrote: Have a look at Abigail's Regexp::Common on CPAN. That wheel has been invented. ;) -- To unsubscri

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Damon Allen Davison
Hi, Have a look at Abigail's Regexp::Common on CPAN. That wheel has been invented. ;) Best, Damon LRMK wrote: I am using following code to validate e-mail addresses if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ valid }else{ invalid } -- Damon Allen Davison

Re: CPAN pod2html: what does CPAN use for itself?

2004-05-01 Thread Damon Allen Davison
plugged by its author. Here's the link: http://www.perlmonks.org/index.pl?node_id=346174 You can read the POD for the module here: http://search.cpan.org/~gmpassos/Pod-HtmlEasy-0.04/lib/Pod/HtmlEasy.pm Best, Damon -- Damon Allen DAVISON http://www.allolex.net -- To unsubscribe, e

Re: Substitution/Regex problem

2004-04-29 Thread Damon Allen Davison
'=' or spaces: s/\@([^=+\s]+?\[[^=+\s]+?\])/\$$1/g; Best regards, Damon -- Damon Allen DAVISON Romanisches Seminar Universität zu Köln -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Help ME! --> Alas - Backreferences are Lexically scoped

2004-04-29 Thread Damon Allen Davison
can read up on this in perldoc perlre. Warm regards, Damon Sumanth Sharma wrote: > Hi Damon, >That's great. It works. I did not know that look ahead could be that > helpful. >> m/((?:ab){5,14})/g -- Damon Allen DAVISON http://www.allolex.net -- To unsubscribe, e-mai

Re: Help ME! --> Alas - Backreferences are Lexically scoped

2004-04-28 Thread Damon Allen Davison
y sure this will behave as you expect. Best regards, Damon -- Damon Allen DAVISON http://www.allolex.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: s/// Vs tr///

2004-04-27 Thread Damon Allen Davison
perator, tr/// has the advantage of (often[*]) being slightly faster. You can use the Benchmark module to compare them. You can read all about it in perldoc perlop. Best regards, Damon [*] Academic caution ;) - -- Damon Allen DAVISON http://www.allolex.net -BEGIN PGP SIGNATUR

Re: untaint filename by replacing with underscores?

2004-04-22 Thread Damon Allen Davison
l that should clear up a lot of the confusion about regexen. Good Luck, Damon -- Damon Allen DAVISON Romanisches Seminar Universität zu Köln -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Fuzzy string matching

2004-03-24 Thread Damon Allen DAVISON
ically, what is comes down to are these modules: String::Approx Text::Levenshtein Algorithm::Diff My favorite is the Levenshtein distance module. Good luck, Damon -- Damon Allen Davison http://allolex.freeshell.org/ Perl and Linguistics <http://world.std.com/~swmcd/steven/perl/linguis

Re: Pattern Matching

2003-11-19 Thread Damon Allen DAVISON
ing to explicitly mention the list/array. Cheers, Damon -- Damon Allen Davison http://allolex.freeshell.org/ A language is therefore a horizon, and style a vertical dimension, which together map out for the writer a Nature, since he does not choose either. T