www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > Perl

    Perl Discussion and technical support for using and deploying Perl.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 01-26-2003, 09:08 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    Can someone

    Please point me in the right direction to learning Perl/CGI? I want to learn it, but I don't quite understand a lot of things about it... Please point me in the right direction, someone! Thank you!
    Reply With Quote
      #2  
    Old 01-26-2003, 10:22 PM
    jeffmott's Avatar
    jeffmott jeffmott is offline
    Adrenalin Junkie
     
    Join Date: Nov 2002
    Location: NY, USA
    Posts: 736
    http://www.perldoc.com/
    __________________
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";
    Reply With Quote
      #3  
    Old 01-26-2003, 10:30 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    Cool! Another thing, you have as your signature a Perl code. I understand that it is using a Split() method, right?

    Could you explain to me the basics of Perl/CGI? I mean, you know how the basic HTML is <HTML><HEAD><TITLE>youTitle</TITLE>.. etc., well, can you explain that in Perl instead of HTML? Thanks a lot, man.
    Reply With Quote
      #4  
    Old 01-26-2003, 11:50 PM
    jeffmott's Avatar
    jeffmott jeffmott is offline
    Adrenalin Junkie
     
    Join Date: Nov 2002
    Location: NY, USA
    Posts: 736
    There really is no such template you need to create a valid Perl program. Though three things that you should have in all your Perl/CGI programs is strict, warnings, and taint mode. You'll see this reinforced throughout perldoc as well. You should also use the CGI module when available, unless you have done extensive research on one of its functionalities and wish to replace it with one of your own.

    #!/usr/bin/perl -wT
    use strict;

    use CGI;
    __________________
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";
    Reply With Quote
      #5  
    Old 01-27-2003, 05:41 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    OK, about that #!usr/bin/perl -wT

    I understand the -wT is an automatically executed function?

    Also, would I use #!usr/bin/perl if my domain was, "rocky.com"? And my CGI bin was, "rocky.com/cgi-bin/"?

    Would I have to change that to, "#!rock.com/cgi-bin/"?
    Reply With Quote
      #6  
    Old 01-27-2003, 08:01 PM
    jeffmott's Avatar
    jeffmott jeffmott is offline
    Adrenalin Junkie
     
    Join Date: Nov 2002
    Location: NY, USA
    Posts: 736
    Quote:
    I understand the -wT is an automatically executed function?
    Sort of. They are command line flags to change compiler directives (makes perl issue warnings it otherwise won't tell you about).

    Quote:
    Would I have to change that to, "#!rock.com/cgi-bin/"?
    It is the path to the Perl interpreter on your server and is unrelated to your domain name. /usr/bin/perl is the most common but your server may still be different. You'll have to check your server's documentation.
    __________________
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";
    Reply With Quote
      #7  
    Old 01-27-2003, 08:26 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    OK, cool, thanks. You're a great help! That site really is a blessing to me. Thanks.
    Reply With Quote
      #8  
    Old 01-27-2003, 08:47 PM
    Charles's Avatar
    Charles Charles is offline
    JavaScript Banned
     
    Join Date: Nov 2002
    Location: Baltimore, Maryland
    Posts: 11,667
    Perl is profoundly cool. It's not a pretty as JavaScript, but it's really cool. Allow me to suggest a couple of things. Got to your public library and borrow Sam's Teach Yourself PERL in 21 Days (http://search.barnesandnoble.com/boo...72320355&itm=1) and if you use the Linux, Solaris or Windows then play around with ActivePerl from ActiveState (http://www.activestate.com/Products/ActivePerl/).

    Among Perl die-hards it has become a sport to get scripts to as few lines as possible and to make those lines as un-readable as possible. (They even have a yearly contest for the longest and most unreadable line of real code.) It's not only fun, but it makes for better running scripts.

    And know that Perl is just a collection of neat little tricks. If you ever think that there has to be a better way then be assured, there is.
    __________________
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web
    Reply With Quote
      #9  
    Old 01-28-2003, 12:02 AM
    jeffmott's Avatar
    jeffmott jeffmott is offline
    Adrenalin Junkie
     
    Join Date: Nov 2002
    Location: NY, USA
    Posts: 736
    Quote:
    Charles
    Got to your public library and borrow Sam's Teach Yourself PERL in 21 Days
    Though I have not looked through Sam's Teach Yourself PERL in 21 Days I personally find the need for a book unecessary in Perl. Perldoc is for Perl as the HTML Spec is for HTML. There is no better reference. And for the topics that are a little heavy, separate tutorials have been written and posted at perldoc.

    Though if you still feel you need a book, on the left side of perldoc.com is a link for "Learn Perl" that contains a list of the best books available. A few are authored by Larry Wall (the inventor of Perl), and others by people who help in its continued development.
    __________________
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";
    Reply With Quote
      #10  
    Old 01-28-2003, 06:49 AM
    Charles's Avatar
    Charles Charles is offline
    JavaScript Banned
     
    Join Date: Nov 2002
    Location: Baltimore, Maryland
    Posts: 11,667
    Quote:
    Originally posted by jeffmott
    I personally find the need for a book unecessary in Perl. Perldoc is for Perl as the HTML Spec is for HTML. There is no better reference. And for the topics that are a little heavy, separate tutorials have been written and posted at perldoc.
    I also am at that stage, now. But it took a simple, yet comprehensive book to get me here. Once I had a grasp of just what tools were there in the tool box and a basic understanding of how each was used then I could use the real documentation and begin the work of really learning the language.
    __________________
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web
    Reply With Quote
      #11  
    Old 01-28-2003, 08:01 PM
    Nedals Nedals is offline
    Registered User
     
    Join Date: Dec 2002
    Location: Pleasanton, CA
    Posts: 2,088
    Jona:
    If you understand the basics of programming then pick up..

    O'Reilly's Perl 5 pocket reference.

    It's a great once you understand the principles.

    One extra item to add (see jeffmott's post) at the beginning of any Perl program...

    use CGI::Carp qw(fatalsToBrowser);

    It will send syntax errors, etc. to your browser
    Reply With Quote
      #12  
    Old 01-28-2003, 11:28 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    I'd like to say thanks a lot, guys.

    I (finally) got a JavaScript book for Christmas, and I was so excited! Actually, yesterday I picked up a Visual BASIC book that I found. It was on version 6.0. Well, within a day, I have almost finished creating my own text editor like Notepad! I was amazed at how simple it was. I mean, at that rate, I can master Visual Basic (and VBScript, since it's almost the same thing) within a month! Of course, I've been so busy lately with JavaScript, Perl, memorizing the Book of John (NIV in the Bible), and stuff like that, it may be awhile before I get back around to it.. anyways, what y'all said was a great help, and I look forward to more support in the future. Notice: I said, "look forward to" not, "expect."

    Thanks a lot,
    Reply With Quote
      #13  
    Old 01-29-2003, 03:17 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    By the way, my library doesn't have a thing! They don't even have books on the Hexadecimal system.
    Reply With Quote
      #14  
    Old 01-30-2003, 07:10 PM
    Mr Cgi Guy's Avatar
    Mr Cgi Guy Mr Cgi Guy is offline
    Registered User
     
    Join Date: Jan 2003
    Location: Aurora, Illinois
    Posts: 7
    I suggest getting the book "Perl and CGI for the World Wide Web" by Elizabeth Castro. It's about $20 from borders or similiar stores. It's a great overview of Perl and it's uses on the internet. It's really the best way to get your feet wet.

    The oreilly books are great if you have an understand of programming already. But if you're completely new to it all, you'll just be wasting your money.

    In my opinion those 'teach your self Perl in xx days' books are junk. Personally, I only use Perl for internet development, and those books generally have about 1 chapter of Perl for the www.
    __________________
    Mr Cgi Guy's Perl Scripts
    Reply With Quote
      #15  
    Old 01-30-2003, 11:57 PM
    Jona's Avatar
    Jona Jona is offline
    Stuper Murderator
     
    Join Date: Jan 2003
    Location: Texas
    Posts: 10,537
    My internet experience and programming level is way above average. I've learned everything I know within a year... that is, JavaScript (mostly, I'm not quite a "master" yet), HTML, CSS, and I've looked at a lot of Perl and CGI scripts. I've even used a lot, and read some documentation. I am an experienced programmer, and I'm very good at what I do. Anyways, I know what Perl is, I just needed a push in the right direction. Jeffmott has given me www.perldoc.com. Which is, in my opinion, an amazingly useful site. I intend to use it to its fullest extent.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 04:00 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.