i have a perl script that has worked for a long time. i uploaded a small change to the file today and suddenly a lot of the comments in the file caused problems. the problems were the result of the comment spilling over to a second line. when i tried to run the script, the script didn't recognize that the second line was a continuation of the first. these were not changes but had been there forever. my ftp program uploads pl files in ascii mode and i double checked to be sure that was still the setting. after i located the lines with spillovers and added # on the second line or pulled up the spillover to the first line, the script worked fine again. what could cause this weird behavior?
Feb 9, 2011, 11:58 PM
Veteran / Moderator (18441 posts)
Feb 9, 2011, 11:58 PM
Post #2 of 9
Views: 9430
So you're saying it used to have something like:
my $foo = 1;
..and its converted to something like:
of what is going on in this part of the code
my $foo = 1;
That right?
If so, using "pico" in SSH can sometimes do that , and I guess some editors may also do that (should be in the settings for any programs)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
# here is a long comments, with a description of what is going on in this part of the code my $foo = 1;
..and its converted to something like:
Code:
# here is a long comments, with a description of what is going on in this part of the code
my $foo = 1;
That right?
If so, using "pico" in SSH can sometimes do that , and I guess some editors may also do that (should be in the settings for any programs)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 10, 2011, 6:34 AM
Veteran / Moderator (18441 posts)
Feb 10, 2011, 6:34 AM
Post #4 of 9
Views: 9436
Hi,
Personally, I use Notepad++ (as its free, and supports a LOT of file formats). Also has handy inline highlighting, which can help you see when you make a mess up (Which we all enevitably do )
Pico is a SSH/Telnet based editor... i.,e:
..and this opens up a copy of the file in SSH, so you can edit it (useful when editing files you can't normally get access to via FTP)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Personally, I use Notepad++ (as its free, and supports a LOT of file formats). Also has handy inline highlighting, which can help you see when you make a mess up (Which we all enevitably do )
Pico is a SSH/Telnet based editor... i.,e:
Code:
pioc file.txt..and this opens up a copy of the file in SSH, so you can edit it (useful when editing files you can't normally get access to via FTP)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 10, 2011, 12:56 PM
Veteran / Moderator (18441 posts)
Feb 10, 2011, 12:56 PM
Post #6 of 9
Views: 9409
Hi,
Not sure what you mean? In Windows, you would just right click the file, the "Open With", and select "NotePad++" from the list of programs.
OR open NotePadd++, and then open your .cgi script
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Not sure what you mean? In Windows, you would just right click the file, the "Open With", and select "NotePad++" from the list of programs.
OR open NotePadd++, and then open your .cgi script
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 10, 2011, 1:15 PM
Enthusiast (661 posts)
Feb 10, 2011, 1:15 PM
Post #7 of 9
Views: 9455
when i unzipped the download it created two folders, one called ansi and one called unicode. there's a notepad++.exe in each folder. the notepad++ website says the ansi is old so i guess i should use the unicode one. i just want to be sure it doesn't put any weird characters in the file and when i upload in ascii mode all will be ok.
since i just unzipped and didn't 'install' it doesn't show in list of programs though i guess i could browse to find it.
ok, i went back and downloaded the installer so that should simplify things. is there any setting i need to do to be sure it saves files properly for ftp to web?
since i just unzipped and didn't 'install' it doesn't show in list of programs though i guess i could browse to find it.
ok, i went back and downloaded the installer so that should simplify things. is there any setting i need to do to be sure it saves files properly for ftp to web?
Feb 10, 2011, 1:22 PM
Veteran / Moderator (18441 posts)
Feb 10, 2011, 1:22 PM
Post #8 of 9
Views: 9402
Should be as simple as installing it. That's all I did on my laptop, and it worked right away ;)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!