[Melbourne-pm] FW: Bamboozled by perl

ajthornton jdthornton at ozemail.com.au
Thu Oct 1 21:37:15 PDT 2009


 

-----Original Message-----
From: ajthornton [mailto:jdthornton at ozemail.com.au] 
Sent: Friday, 2 October 2009 2:37 PM
To: 'Toby Corkindale'
Subject: RE: [Melbourne-pm] Bamboozled by perl

OK. That works! :) 

I have a folder called perlstuff with source code in it so I went cd
perlstuff and then perl perlme.pl 

I get hello world in the terminal as desired. 

OK. Your reward for helping me is that I will try to like Perl!!!!! I am in
the final analysis pragmatic; if a language helps my health, welath and
happiness I will persist with it. I even had fun with Prolog a few months
ago. I grabbed a free IDE and some tutorials and actually some progress,
albeit ata  beginner level, and had a lot of fun. I thought that I would
give it up after 5 mins - I had heard that it was this weird language that
did this out there AI stuff. But I was still going after a few weeks.   BTW
when I was at Software Freedom Day I didn't see a Perl stand. That was a
pity because at least you would have got in a lightning talk about perl/perl
groups.

I really missed the bus with programming. If I were 18 0r 20 right now I
would go to uni or TAFE and get a Bsc in computer science. But I was in the
wrong era. It was 1992. I left school computer illiterate. I couldn't turn a
computer on or put a disk in the disk drive. I failed reasoning and data
maths [the worst freaking unit of maths ever clunked together by eduational
eggheads - teachers treated it like it was an insult to teach it; "that's a
year 8 maths unit" was said so often, never mind that a chapter had calculus
so difficult in the Rehill/macauliffe book that you wouldn't do it until the
later years of an undergraduate maths program , if then, oh man that was so
all over the shop that I wondered what the hell I had done in a previous
life to deserve such tripe.] because I couldn't operate a computer and use
Minitab. Then the teacher came up with this psychobabble that I was
"technophobic". There was no notion of responsibility in teaching computers.
For a start what about giving me a mouse??? 

But like I said, I am going to try to like Perl. It must have something
going for it if it's included off the bat in PuppyLinux. 

At least programming is something tnat can be learnt. There's stuff that's
"you have got it or you haven't". Music and drawing certainly fit that
category. Maths probably does. But I do think that anyone can program. Some
people might be better at it etc. But anyone can learn to do it. Unlike
other things. I could plaster a blackboard with power series in maths. But
give me year 6 primary school maths problem solving and I am stuffed. Once I
had a third year maths unit where I got 90 percent for texbook work and 10
percent for probalem solving and passed with 56%. I don't know what lateral
thinking means. Indeed Edward De Bono probably meant it in a different way
to how it is used now. But I am convinced in any case that I have the
lateral thinking ability of a pile of cement. In problam solving it's where
to start that kills me. Often I don't get past that pt - a blank sheet of
paper.  

John  

 

 

-----Original Message-----
From: Toby Corkindale [mailto:toby.corkindale at strategicdata.com.au]
Sent: Friday, 2 October 2009 1:19 PM
To: ajthornton
Cc: melbourne-pm at pm.org
Subject: Re: [Melbourne-pm] Bamboozled by perl

ajthornton wrote:
>             So I started with my main online PC [this one: a dual 
> booted Windows XP/kubuntu 9.04 box] and found strawberry perl.
> Downloaded starberry perl, it pops up in -v in windows cmd line, and 
> has the cpan etc things [whatever cpan is] in the program list. So I 
> got out notepad and cut and pasted a program into notepad++:
> 
>             #!/usr/local/bin/perl
> #
> # Program to do the obvious
> #
> print 'Hello world.';		# Print a message
> 
> 
>             ***
>                Then I saved this as perlme.pl and put it in the Perl 
> bin part of strawberry dir [I don't why this usually works - but I did 
> find with Ruby that I have to whack the sourcew code file into the bin 
> folder for the program to work on command line]. So I went to cmd in 
> windows and typed perlme.pl and windows notepad appears with the entire
raw sourcecode in it.
> Not the desired outcome. Then I search for forums. There is so much 
> stuff on the net that I am bamboozled and forums for beginners appear 
> to be lost in the fog.


Hi John,
You don't need, or want, to put your perlme.pl in the perl bin directory.
Please take it out, and save it somewhere else.. Maybe "My Documents/perl"
or something like that?

Then fire up the windows command line, as you did before, and navigate to
where you saved the program.

Now type:
perl perlme.pl

This should run your program as desired.


>             OK. If anyone feels that as a beginner that I am intruding 
> on the list I will say this much: [1] the above pt is where more 
> people give up a programming language entirely - no contest - they 
> can't get perl-v to pop up in the command line, basically can't get 
> the car to start. [2] Some of you teach Perl. The above is pretty much 
> the thought process of someone who tries perl for about the first 5 mins.
> 
>             I have lost count of the number of languages that I have 
> downloaded the guts of it and gone cmd/language blahblah -v and seen 
> "file not recognised" and turned my back on it. There is a reason why 
> I use mainly IDEs. My track record for getting command line 
> programming to work is pretty lousy. I have Netbeans. IDE. I have QT4.
> IDE. I have Pelles. IDE. So if somebody can come up with a Perl IDE, yeah,
I will use that.

Perhaps you might like to try reading some of the tutorials geared towards
using Perl on Windows?

I notice this guy has a few..
http://damienlearnsperl.blogspot.com/

He also mentions "Padre" which is a development environment for Perl on
Windows. Maybe you'd be more familiar with that?


Cheers, and best of luck,
Toby



More information about the Melbourne-pm mailing list