Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


How Do I Get Great Answers To Perl Questions? by MikeLacey
Posted: 16 Dec 02 (Edited 15 Jun 05)

There are a few things you can do to make it easier for people to answer questions. Remember, making it easy means making it more likely that you will get help

First of all -- have a browse through FAQ219-2884 which is hints, tips and a couple of rules about using Tek-Tips in general.


Make sure you:
  1. Include these two lines as the first lines in your Perl scripts.

    use strict;
    use warnings;

  2. If you're asking for a module or script that will do a particular job, check out www.cpan.org especially the excellent Search programs.

  3. Tell people what version of Perl you are using. The output of "perl -v"; at your command line should tell you that.

  4. Include these two lines as the first lines in your Perl scripts.

    use strict;
    use warnings;

  5. Include some code in your question that demonstrates the problem you're having. Post code that will actually do something if you can please - not just a mind-bogglingly complex fragment us mere mortals won't have a chance of getting to run.

  6. Include these two lines as the first lines in your Perl scripts. (did I mention this already?)

    use strict;
    use warnings;

  7. If you'd like friendlier error message include these two lines as the first lines in your Perl scripts instead.

    use strict;
    use diagnostics;

  8. Include some test data please - and say what output you're *expecting*.

  9. Be specific; this question:

    I'm having a problem getting my really simple script to work.

    use strict;
    use warnings;
    print OUTPUT "Hello World\n";

    It just gives me this error message and doesn't print "Hello World"

    Error Message:
      Name "main::OUTPUT" used only once: possible typo at badhello.pl line 3.
      print() on unopened filehandle OUTPUT at badhello.pl line 3.

    will get a better response than this:

    Help! I can't get my script to run, someone help please!

    You'll notice, by the way, that the use strict etc gives quite helpful error messages, try running that same script without those two lines, it just fails silently. If you 'use diagnostics' instead of 'use warnings' it gives you even more information.

If you're having CGI troubles, have a look at FAQ452-3023.

If you've got any comments, additions, suggestions about this FAQ, please use the "Feedback" mechanism and I'll get back to you.

Back to Perl FAQ Index
Back to Perl Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close