The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Other
> Development Articles
|
Perl 101 (Part 1) - The Basics
Discuss Perl 101 (Part 1) - The Basics in the Development Articles forum on Dev Shed. Perl 101 (Part 1) - The Basics Development Articles forum discussing articles and tutorials located at http://www.devshed.com. See what our authors have created for your viewing pleasure.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 25th, 2000, 04:24 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
nice, slow intro
Good intro! I've taken several tut's on perl and they all seem to figure you have lots of C programming experience behind you, or make you drudge through hours of "web explanation" before getting to some handson examples..
I'm looking forward to your next installment of perl coding for the average joe :)
Mike
|

May 29th, 2000, 05:44 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: nice, slow intro
I found it too slow. I only know html and javascript, not C or anything but it was still too slow for me.
|

May 30th, 2000, 12:25 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
introduction
understandable and informative enough even for beginnerss. keep it up.
|

May 30th, 2000, 09:23 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Errors?
Was it just me, or were there errors on this very first example?
I'm completed new to perl, so it was giving me fits.
Maybe it was just my browser or something (IE 5.0). It was probably related to html rendering, i never looked at the html source.
The first line has a space after the #, doesn't that make it a comment? It wouldn't run unless I put the space in.
The third line, it says ...baby!n")
shouldn't there be a !/n?
Poor mistakes like this can really make it difficult for us newbies. But still thanks for the time to write the article.
|

May 31st, 2000, 07:03 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: Errors?
yes errors.
<br>
<br>
<br>
#!/usr/bin/perl
<br>
#Perl 101
<br>
print ("Groovy, baby!\n")
<br>
<br>
<br>
would be correct, would think someone writing a tutorial would have the basic "Hello, world!" ("Groovy, baby!" in this case) program down to a science. Yes I agree such a mistake would make things very hard for the newbie.
|

May 31st, 2000, 07:06 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: Odd errors
hmmm very odd, the \ was supposed to be in my post, but it was removed in the final posting, weird.
\
'\'
"\"
(\)
[\]
\\\\\\\\\\\\\\\\\\\\\\\
just checking to see if the ones I put above get taken out or not.
|

May 31st, 2000, 03:48 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: Odd errors
Ouch. We got it fixed. Thanks for the heads-up.
Randy
|

June 8th, 2000, 12:30 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
My error
This is what I tpye and send to my unix sever via FTP in ascii.
#!/usr/bin/perl
#This is my first tutorial in perl programming language
But it gives me this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
What wrong
nite
|

June 16th, 2000, 10:05 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
The \ in a line.
On the second page of this article you had the line with "baby!\n". Then on tha pages that follow you had "baby!n".
What happened to the \
Which way is right or does it matter?
Thanks
|

June 16th, 2000, 10:05 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
The \ in a line.
On the second page of this article you had the line with "baby!\n". Then on tha pages that follow you had "baby!n".
What happened to the \
Which way is right or does it matter?
Thanks
|

June 16th, 2000, 10:09 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
OOps. Sorry about the double post.
OOps. Sorry about the double post.
|

June 16th, 2000, 10:11 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: The in a line.
OK the post script is making part of my post disapear. In between "baby" and "n" was supposed to be a "backslash" (the key not the word) which was there on the second page of the article and not on any pages after that.
|

June 24th, 2000, 10:50 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: My error
If you get 'Internal Server Error 500' then there is more then likely a problem in your code. You can debug the problem with typing the folowing.
<!-- Code -->
<p><pre><font color=#008000><xmp>
> /usr/bin/perl myperlscript.pl
</xmp></font></pre><p>
<!-- Code -->
This will give you more information on where the problem is and the error messages are a bit easier to decipher then the internal error. ;)
|

June 24th, 2000, 10:57 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Perhaps a bit too much for a newbie...
I'm trying to create a cgi script/perl program that does the following...
<!-- Code -->
<p><pre><font color=#008000><xmp>
cat /var/log/maillog | grep $username > mail_ustat
</xmp></font></pre><p>
<!-- Code -->
From there I need to open the mail_ustat and display it to the page. I know it has to be something really simple, but aparently I'm missing something. Any ideas?
tia.
|

June 29th, 2000, 11:01 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Re: My error
Remember to turn on the warnings. They keep you on the straight and narrow (especially when learning) and help avoid costly mistakes.
<br>
<br>
> /usr/bin/perl -w myperlscript.pl
<br>
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|