malformed script

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Well I've been writing a program in perl..about 1900 lines now..and I had to do a search/replace all and used homesite 5.5 to do it. Now my script is malformed. I narrowed it down to most likely being because of special characters or whatever in the file. I opened a working script in homesite, saved it and retried and who'd have guessed...malformed script..wuh?!

What do I gotta do to fix my program. I don't feel like going to a backup and updating all the recent changes.

Thanks
webG

Pimpin like a pimp with an electrofied pimpin machine!

He has: 1,758 posts

Joined: Jul 2002

I don't know if it will help but in bbedit for the mac there is a "zap gremlins" option that removes all strange characters from a text file...

BTW... i don't reccomend using homesite it's a html editor. get textpad (textpad.com) it's great! (and free for personal use!).

Andy

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

yeah, I use enginsite for my perl editing. But it's search and replace is more limited than homesite. (Except for the regex search) but I suck at regex. Yeah I also use bbedit here on my mac os x machine. But at home, I am poor and must use a cheaply made windows machine...including all the faulty software found therein. I'm going to try the bbedit thing. Thanks andy.

webG

Hey, I just noticed that I have been a member for over 5 years now..wow.

Pimpin like a pimp with an electrofied pimpin machine!

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

The zap gremlins did not work. This sucks...heh. My own fault of course, but I can swear I remember editing perl scripts back in the day with HomeSite. Any other ideas before I have to go through and redo my backup from like 2 weeks ago?

Thanks for the help.
webG

Pimpin like a pimp with an electrofied pimpin machine!

He has: 1,758 posts

Joined: Jul 2002

God knows... do your host have a backup of the script they could restore or have you only been working locally?

druagord's picture

He has: 335 posts

Joined: May 2003

check the end of lines character maybe there still in mac format or windows set them to unix and it will work anywhere. vim that can be found at vim.org works on mac and pc and it will help.

IF , ELSE , WHILE isn't that what life is all about

He has: 19 posts

Joined: Jun 2004

You should get PHPEdit from svoi.net its a text editor especially made for scripting/programming it supports 40 someodd languages and has colored syntax as well.

If you need any PHP programming don't hesitate to shoot me an email or PM me here at Webmaster-Forums!

[EMAIL] [PM]

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

Druagord, you were almost right on target. I already checked the formatting and it was set to unix..always is. But right below that was a setting called MPW shell and that was selected. I switched it to none and it worked. Can anyone tell me what the MPW shell is for? Attached is a screenshot.

Pimpin like a pimp with an electrofied pimpin machine!

druagord's picture

He has: 335 posts

Joined: May 2003

that's in bbedit sincerely i don't know never used it maybe suzanne could help she is a mac user too

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

sorry..scratch that last post. I was messing with a working backup..doh'! Well I guess tonight I begin reinventing the wheel I just invented..heh.

Thanks for the help. Any additional suggestions definitely welcomed as I'll try anything. Surely I can find a live rooster for sacrifice.. if someone thinks it will help.

webG

Pimpin like a pimp with an electrofied pimpin machine!

druagord's picture

He has: 335 posts

Joined: May 2003

could you post something(preferably the script) it would help us help you.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.