473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

I think I messed up the .pl file

I am very new to perl... today is my first encounter. and i think i messed up pretty big.

I was trying to update some info on a website, so i thought I could just open the index.pl file and change what was in there (and i didn't make a back up ) The program i used changed the formatting and i didn't realize this.


Is this an acceptable practice to edit this file as long as you don't change the formatting?

now i get this error on the site

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



any ideas? suggestions?
Sep 27 '07 #1
11 1649
numberwhun
3,509 Expert Mod 2GB
I am very new to perl... today is my first encounter. and i think i messed up pretty big.

I was trying to update some info on a website, so i thought I could just open the index.pl file and change what was in there (and i didn't make a back up ) The program i used changed the formatting and i didn't realize this.


Is this an acceptable practice to edit this file as long as you don't change the formatting?

now i get this error on the site

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



any ideas? suggestions?
Yes, ALWAYS make a back up of any file you are going to modify. It helps you avoid these types of situations.

We would definitely need to know more. What did you change? How did the formatting change? Can you post the code (surrounded by code tags) here?

Regards,

Jeff
Sep 27 '07 #2
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perluse strict;use warnings;use diagnostics;use CGI;use CGI::Carp qw/fatalsToBrowser/;use DBI;use Data::Dumper;use Registration;my $cgi = new CGI;Registration::print_header($cgi);=headprint <<EOS;<p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator, EOSprint email_officer("Coordinator"),". ";=cutprint <<EOS;<p>Registration opens Monday, November 26th, 2007.EOSprint <<EOS;</p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each.  Hospitality suites overlooking the football field can also be purchased for \$300.  This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies.  If this applies to you, please check the appropriate box on the registration page.  Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>EOSRegistration::print_footer($cgi);
  2.  
i just changed some regular txt in here but i don't know how the original format is. I tried putting it all back on one line.
Sep 27 '07 #3
i changed the

Registration opens Monday, November 26th, 2007.
Sep 27 '07 #4
numberwhun
3,509 Expert Mod 2GB
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perluse strict;use warnings;use diagnostics;use CGI;use CGI::Carp qw/fatalsToBrowser/;use DBI;use Data::Dumper;use Registration;my $cgi = new CGI;Registration::print_header($cgi);=headprint <<EOS;<p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator, EOSprint email_officer("Coordinator"),". ";=cutprint <<EOS;<p>Registration opens Monday, November 26th, 2007.EOSprint <<EOS;</p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each.  Hospitality suites overlooking the football field can also be purchased for \$300.  This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies.  If this applies to you, please check the appropriate box on the registration page.  Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>EOSRegistration::print_footer($cgi);
  2.  
i just changed some regular txt in here but i don't know how the original format is. I tried putting it all back on one line.
WOW!!! What did you use to do this again? (editor wise) If this code was formatted correctly before you made any changes, something drastic happened to get it in this condition.

Lets see what we can do:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use diagnostics;
  6. use CGI;
  7. use CGI::Carp qw/fatalsToBrowser/;
  8. use DBI;
  9. use Data::Dumper;
  10. use Registration;
  11.  
  12. my $cgi = new CGI;
  13. Registration::print_header($cgi);
  14.  
  15. =headprint <<EOS;
  16. <p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator, 
  17. EOS
  18.  
  19. print email_officer("Coordinator"),". ";
  20.  
  21. =cut
  22. print <<EOS;
  23. <p>Registration opens Monday, November 26th, 2007.
  24. EOS
  25. print <<EOS;
  26. </p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each.  Hospitality suites overlooking the football field can also be purchased for \$300.  This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies.  If this applies to you, please check the appropriate box on the registration page.  Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>
  27. EOS
  28. Registration::print_footer($cgi);
  29.  
I don't know if that is totally correct for formatting, but it is a lot better looking than what you had.

Regards,

Jeff
Sep 27 '07 #5
I used a program called alleycode
Sep 27 '07 #6
when i opened this file in notepad it was all on one line originally. Is it suppost to stay that way?
Sep 27 '07 #7
What program should I be using to edit these?
Sep 27 '07 #8
numberwhun
3,509 Expert Mod 2GB
What program should I be using to edit these?
First, do not EVER use notepad. It is one of the worst programs for editing (IMHO). As you found out, there are not carriage returns and when it does wrap, it usually isn't correctly.

My suggestion would be to find yourself a good editor that does not strip off or not recognize carriage returns. Some more popular editors are Textpad and Notetab Light.

My personal preference when I do anything coding wise is to use my IDE. I lean towards Komodo from Active State, using it for pretty much all of my development.

In my opinion, IDE's are personal preference. Find one you like and stick with it.

Regards,

Jeff
Sep 27 '07 #9
KevinADC
4,059 Expert 2GB
Notepad is OK for editing short perl scripts. The problem is that the first editor is using line ending that notepad does not recognize so it lumps all lines together.

Google for "perl express" it's a free perl IDE that works very well. Not sure how many operating systems it's ported for though.

Keep in mind, you can use any editor for perl files but always save them as text or ascii and not in some other format like rtf or doc.
Sep 27 '07 #10
Kelicula
176 Expert 100+
Notepad is OK for editing short perl scripts. The problem is that the first editor is using line ending that notepad does not recognize so it lumps all lines together.

Google for "perl express" it's a free perl IDE that works very well. Not sure how many operating systems it's ported for though.

Keep in mind, you can use any editor for perl files but always save them as text or ascii and not in some other format like rtf or doc.
OMG, I am probably going to turn you into a hot head (with all the smoke I am blowing up your a%%) but Kevin, YOU ROCK!!!

I had no idea, or even an inkling to check and see if there was a free perl IDE.

Sweet!!!

On to my next project ... creating a CMS with perl and mySQL

thanks!
Sep 28 '07 #11
numberwhun
3,509 Expert Mod 2GB
OMG, I am probably going to turn you into a hot head (with all the smoke I am blowing up your a%%) but Kevin, YOU ROCK!!!

I had no idea, or even an inkling to check and see if there was a free perl IDE.

Sweet!!!

On to my next project ... creating a CMS with perl and mySQL

thanks!
Hey Kevin! I have some sandbags lying around that you can borrow if you need them. Wouldn't want you to float away on us. He he he.
Sep 28 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marina | last post by:
Hi, I was playing around with a tool available from gotdotnet to create documentation from xml comment in vb.net. Part of what I had to do was install an add in to allow help projects to be...
3
by: ftw | last post by:
I am using SQL7 Query Analyzer. A simple select * from myMLSview and then I save results as a .csv file has the commas messed up in quite a few places. The data is messed up before I save it to the...
3
by: Patrick Sullivan | last post by:
I am trying to read a text file laid out like, "textfield1, textfield2, etc," and only extract the first value (textfield1) to add to the listbox. But instead of listing vertically, I get three...
2
by: Jordan Tiona | last post by:
I was working on a project. I got an error on one of my runs, and closed the application by pressing the x, which was followed by a "You have chosen to close a program that is not responding, etc."...
3
by: David C. Barber | last post by:
Using SQL Server 2000 and moving to a new computer. We did a full backup of the existing database to tape, brought up the new computer with a clean install using the same server name and IP...
0
by: joshua_jacobsen | last post by:
I have a problem with file downloads. Here is the basic code: sqlstring = "SELECT * FROM WHERE RecordID = " & formatDBNumber(RecordID) & ";" SQLDataSetObject = New DataSet("Image")...
2
by: RZ15 | last post by:
Hi, I was working on a query this morning and everything was working fine. Some time in the last half hour, I used the Compact & Repair Database feature. After that, when I went to open the query...
5
by: blaine | last post by:
The wxPython group is a bit stale compared to this group, so I'll give it a shot :) (READ: Originally when I started htis post, Python 2.5 at the shell did not work (identical behavior to...
1
by: agarwasa2008 | last post by:
Hi, I have a perfect file called "Products.xls" that I link to my MS Access 2003 database and everytthing looks good in that file. When I view the same file after linking in my database the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.