Re: Can I design a website using Perl

2009-12-05 Thread Erez Schatz
2009/12/6 Jeff Pang : > Parag Kalra: > >> >> So what are the main Perl modules which I need to install and any good >> tutorial link would be really appreciated. >> > > For the modules, CGI and DBI is mostly what you wanted, these two modules > are built-in ones in recent perl release. I seriously

Re: Can I design a website using Perl

2009-12-05 Thread Jeff Pang
Parag Kalra: So what are the main Perl modules which I need to install and any good tutorial link would be really appreciated. For the modules, CGI and DBI is mostly what you wanted, these two modules are built-in ones in recent perl release. For documents see "perldoc CGI" and "perldoc D

Re: Can I design a website using Perl

2009-12-05 Thread Robert Wohlfarth
On Sat, Dec 5, 2009 at 11:03 PM, Parag Kalra wrote: > I have only interacted with PHP/MySQL to design a website. > > I wanted to know if it is possible to use Perl instead of PHP (and I am > pretty sure it should be possible :) ). But my main concern is what are the > main Pros & Cons of using Pe

Re: Can I design a website using Perl

2009-12-05 Thread Erez Schatz
2009/12/6 Jigme Datse Rasku : > I believe if you want to do things "much the way PHP does," probably unless > you have a significant reason to *not* use PHP (either you see another tool > as "better" or you see PHP as lacking in some respect, I don't see a reason > not to use PHP. First, if you kn

Re: Can I design a website using Perl

2009-12-05 Thread Jigme Datse Rasku
I believe if you want to do things "much the way PHP does," probably unless you have a significant reason to *not* use PHP (either you see another tool as "better" or you see PHP as lacking in some respect, I don't see a reason not to use PHP. My understanding of writing a website in Perl is that

Can I design a website using Perl

2009-12-05 Thread Parag Kalra
Hello All, I have only interacted with PHP/MySQL to design a website. I wanted to know if it is possible to use Perl instead of PHP (and I am pretty sure it should be possible :) ). But my main concern is what are the main Pros & Cons of using Perl instead of PHP. I have very basic requirements.

Re: Help me understand

2009-12-05 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> New-style Perl objects are written in Moose don't claim moose is the only new style objects. nor are they the ultimate as they have their issues too. plain old hash objects are fine for most common classes and better in many cases too than complex thi

How to analyze a URL string?

2009-12-05 Thread Grant
I'm setting up the URL structure for my next website. I'd love to know what you guys think is the best way to analyze the URL in perl in order to generate the resultant page correctly. The URL structure only has 2 variants: /page-name.html /page-name/1/2.html "page-name" represents the name of

Re: How much time my Perl script is taking

2009-12-05 Thread John W. Krahn
Parag Kalra wrote: Hello All, Hello, I am looking for a simple way to determine the time taken by any Perl script. A simple method would be to put this line somewhere in your program: END { warn time - $^T, " seconds elapsed\n" } A specific module to determine the time of execution will

Re: I want to know the reason

2009-12-05 Thread John W. Krahn
Parag Kalra wrote: Hello All, Hello, This code is working: #!/usr/bin/perl use warnings; use strict; You should include those two pragmas to let perl help you find mistakes in your code. 2 my @column_names=(A..ZZ); Why are you creating an array with 702 entries when you are only

Re: Help me understand

2009-12-05 Thread Jenda Krynicky
From: 120 > I've looked at this: > > sub encrypt { > my $self = shift; > my $xx = $$self; > #.. cut stuff I do understand > > return $self->SUPER::encrypt(); > } > > Could someone help me with the Perl to English here? > I get that $self is shifting the arguement. $self is se

Re: newline regexes

2009-12-05 Thread Shawn H Corey
jackassplus wrote: >>> $data =~ s{ (? > I have no Idea what that is supposed to do. It removes all singly occurring newlines. This is a negative, zero-width, look-behind assertion (?http://perldoc.perl.org/perlre.html#Extended-Patterns -- Just my 0.0002 million dollars worth, Shawn Pro

Re: newline regexes

2009-12-05 Thread jackassplus
> > $data =~ s{ (?http://learn.perl.org/

Re: How much time my Perl script is taking

2009-12-05 Thread Jim Gibson
At 8:43 PM +0530 12/5/09, Parag Kalra wrote: Hello All, I am looking for a simple way to determine the time taken by any Perl script. A specific module to determine the time of execution will also do. After the Perl script gets executed, at the end it should print the time it took to for the e

Re: basic issue - XSLT processing

2009-12-05 Thread Shlomi Fish
On Saturday 05 Dec 2009 19:30:59 Jakub Jezek wrote: > I' ve written my own XSLT and I need to process it. And get output from it. > I'm using this simple code for beginning: > === > # !/usr/bin/perl > You should add "use strict;", "use warnings;" and possibly also

Re: How much time my Perl script is taking

2009-12-05 Thread Shlomi Fish
On Saturday 05 Dec 2009 17:13:31 Parag Kalra wrote: > Hello All, > > I am looking for a simple way to determine the time taken by any Perl > script. > > A specific module to determine the time of execution will also do. > > After the Perl script gets executed, at the end it should print the time

basic issue - XSLT processing

2009-12-05 Thread Jakub Jezek
I' ve written my own XSLT and I need to process it. And get output from it. I'm using this simple code for beginning: === # !/usr/bin/perl # import required modules # use XML::Parser; # use XML::XPath; # use XML::XPath::XMLParser; use XML::XSLT; # define local var

Re: I want to know the reason

2009-12-05 Thread Parag Kalra
Thanks to all... I was not knowing such a basic thing... :) Cheers, Parag On Sat, Dec 5, 2009 at 5:19 PM, Paul Johnson wrote: > On Sat, Dec 05, 2009 at 04:46:38PM +0530, Parag Kalra wrote: > > Hello All, > > > > This code is working: > > > > #!/usr/bin/perl > > > 2 my @column_names=(A..Z

How much time my Perl script is taking

2009-12-05 Thread Parag Kalra
Hello All, I am looking for a simple way to determine the time taken by any Perl script. A specific module to determine the time of execution will also do. After the Perl script gets executed, at the end it should print the time it took to for the execution. So just like we execute SQL queries

Re: Help me understand

2009-12-05 Thread Shawn H Corey
120 wrote: > On Sat, 2009-12-05 at 08:45 -0500, Someone Something wrote: >> SUPER is a class that controls the superclass of the current class. >> Look here: http://search.cpan.org/~chromatic/SUPER-1.17/lib/SUPER.pm >> >> So, what that means is, run the encrypt method/subroutine/function of >> the

Re: Help me understand

2009-12-05 Thread 120
On Sat, 2009-12-05 at 08:45 -0500, Someone Something wrote: > SUPER is a class that controls the superclass of the current class. > Look here: http://search.cpan.org/~chromatic/SUPER-1.17/lib/SUPER.pm > > So, what that means is, run the encrypt method/subroutine/function of > the superclass of the

Re: Help me understand

2009-12-05 Thread Someone Something
SUPER is a class that controls the superclass of the current class. Look here: http://search.cpan.org/~chromatic/SUPER-1.17/lib/SUPER.pm So, what that means is, run the encrypt method/subroutine/function of the superclass of the current class. Something I would highly recommend is dive into Beginn

Help me understand

2009-12-05 Thread 120
Hi, I'm in my 50's and new to Perl, and I love it! Wish I discovered it years ago :-( Slowly I'm learning bits an pieces but find myself getting confused at times. I have that situation today. I've looked at this: sub encrypt { my $self = shift; my $xx = $$self; #.. cut stuff I

Re: I want to know the reason

2009-12-05 Thread Paul Johnson
On Sat, Dec 05, 2009 at 04:46:38PM +0530, Parag Kalra wrote: > Hello All, > > This code is working: > > #!/usr/bin/perl > > 2 my @column_names=(A..ZZ); > > 3 for(my $i=0; $i<26; $i=$i+1) { > > 4 my $tmp_file = "$column_names[$i]".".out"; > > 5 open $i, ">column_names/$tmp_file" o

Re: I want to know the reason

2009-12-05 Thread Philip Potter
2009/12/5 Parag Kalra : > But this code is not working: > > #!/usr/bin/perl >> my @column_names=(A..ZZ); >> for(my $i=0; $i<26; $i=$i+1) { >>     my $tmp_file = "$column_names[$i]".".out"; >>     open $column_names[$i], ">column_names/$tmp_file" or die "Could not >> create the file - $tmp_file \n";

I want to know the reason

2009-12-05 Thread Parag Kalra
Hello All, This code is working: #!/usr/bin/perl > 2 my @column_names=(A..ZZ); > 3 for(my $i=0; $i<26; $i=$i+1) { > 4 my $tmp_file = "$column_names[$i]".".out"; > 5 open $i, ">column_names/$tmp_file" or die "Could not create the > file - $tmp_file \n"; > 6 print $i "This is