I must say that I dont agree that Perl is a difficult language for a beginner
.. in fact I think it is easy for a beginner .. as a matter of fact I think it
is TOO easy for a beginner ... and that is why I (my personal opinion only)
dont usually point beginning programmers to Perl as itis too easy to get lazy
and fall into bad programming practices.  Becasuse it is so flexible Perl also
allows an unguided self-learner especially to pick up bad habits 'cos Perl
allows that ... i normally recommend a beginner to take a quick course in C /
C++ / Java (languages that will blow your head off if you make a mistake) so
that they learn proper (frequently in these languages there is ONLY one way to
do it as opposed to TIMTOWTDI in perl) techniques .. hten come back to Perl
and you will be flying!

P.S.  I hope I dont come across as putting Perl down in fact Perl is the only
thing I use nowadays 'cos it allows me to finish my task earlier and spend
more time on unreal but it is too easy to build loose foundations if your
first lang is Perl!

On Tue, Aug 21, 2001 at 10:15:48AM +0100, Roger C Haslock shaped the electrons to read:
> You say you are new to programming. Perl is not an easy language for a
> programming novice. Most tutorials will show you how to accomplish, in Perl,
> something you already know in another language.
> 
> There are few tutorials on the use of modules because all well-written
> modules have, as part of their documentation, examples of their use. Pick
> any modules at random from the standard issue, or others from www.cpan.org,
> and study their examples.
> 
> May I also recommend 'Perl Power!' by Michael Schilli
> (http://www.perlmeister.com/index.html), and 'The Perl 5 Programmers
> Reference' (http://ez2www.com/go.php3?site=book&go=1566047501 on Amazon) or
> something similar, and annotate it.
> 
> PS: Looking for web references to the books, I came across the following
> advice:-
> 
> >>... (and if you want to learn Perl as your first programming language you
> should SERIOUSLY re-think that).
> 
> >>Not for a total novice programmer (who shouldn't learn Perl first anyway),
> ...
> 
> >> A person new to ALL programming should NOT buy this book ...
> 
> If you want to learn programming, I can only recommend 'Algorithms + Data
> Structures = Programs' by Niclaus Wirth (out of print).
> 
> - Roger -
> 
> 
> ----- Original Message -----
> From: "Sunthari" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 21, 2001 5:50 AM
> Subject: Help on script
> 
> 
> > Dear List,
> >
> > I am new to programming and currently looking into
> > Perl. I am going thru the available Perl tutorial in
> > the net but there are less examples especially on how
> > to use modules.
> >
> > I have wrote this simple script of match word and
> > count it for a text file (well, did some cut-n-paste
> > here and there). I wanted to extend it by putting an
> > interface- webpage with a searchbox to post the search
> > word to this script.
> >
> > I have tried CGI.pm but I failed to read/pass the
> > search word to script. Please take a look at this
> > script and html file . Please mind me if there's
> > really stupid mistakes since I desperately need some
> > help.
> >
> > Really looking forward to hear from the list asap.Your
> > help is very much appreciated.
> >
> > Rgds,
> >
> > P/S: I have attached the following:
> >       match.txt - original sript without cgi
> >       matchcgi.txt - using CGI.pm
> >       match.htm
> >
> >
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> > #!usr/perl/bin
> >
> > @ARGV = "C:\\Perl\\bin\\folder\\princess.txt";
> > use CGI;
> > $q = new CGI;
> > $pattern =  $cgi-> param("query");
> >
> > chop($pattern);
> > $filename = $ARGV [0];
> > $count =0;
> >
> > print $q-> header(),
> > print $q-> start_html,
> > print $q-> <h1> TheOutputs,/h1>\n",
> > print "Matches found : $pattern\n";
> >
> > while ($line = <>) {
> >           if  ($line =~ (/$pattern/)) {
> >                @words = split (/$pattern/, $line);
> >                 $count += @words-1;
> >
> > }
> >
> > if (eof) {
> >         $filename = $ARGV[0]; }
> >
> > }
> >
> > if ($count == 0 ) {
> >     print "No matches found. \n";
> > } else {
> >      print "Total numbers of matches : $count \n";
> > }
> >
> > print $q-> end_html
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> > #!usr/perl/bin
> >
> > @ARGV = "C:\\Perl\\bin\\folder\\princess.txt";
> >
> > print "Enter your search pattern: ";
> > $pattern =<STDIN>;
> > chop($pattern);
> > $filename = $ARGV [0];
> > $count =0;
> > print "Matches found :\n";
> >
> > while ($line = <>) {
> >           if  ($line =~ (/$pattern/)) {
> >                @words = split (/$pattern/, $line);
> >                 $count += @words-1;
> >
> > }
> >
> > #Pointing back to the first element in text after EOF
> > if (eof) {
> >         $filename = $ARGV[0]; }
> >
> > }
> >
> > if ($count == 0 ) {
> >     print ("No matches found. \n");
> > } else {
> >      print "Total numbers of matches : $count \n";
> > }
> >
> >
> >
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to