kmb999
11-08-2001, 10:14 PM
I setup my site using html mainly, but I put it in the perl script...
#!/user/bin/perl
print " ";
print " ";
print " ";
etc.
Now I need to switch it to PHP, but the problem is that each page has hundreds of lines of 'print " ";'s that I would need to either switch to 'echo " ";' or I could just get rid of them and use a more basic command for the whole page...
<?php echo ("
\n\n"); ?>
Is there a way to switch the print to echo or to get rid of the prints without going through every line manually?
Thanks,
Kyle
Do you have chunks of html that will be the same on every page?
I only use echo when I need to display a value in a variable. Otherwise, I put the common HTML wherever it goes, and then use if statments to put in dynamic portion.
kmb999
11-08-2001, 10:46 PM
Well, there is a common template between most of the pages. I don't use many variables, it's mostly just HTML wrapped in an outler layer of Perl/CGI right now. I'm trying to convert it to php for easier use, and my current host is different with Perl/CGI than my old hosts were.
lovelie
11-08-2001, 11:05 PM
I find myself having to do this kind of thing constantly.. & at those times EditPad Classic (http://www.editpadpro.net/editpadclassic.html) is a Godsend.
It has a "find & replace" function
which can either replace all of your "print"s with "echo"s;
or replace all of your "print"s with nothing,
in effect deleting them all at the same time.
[curse'd words!]
chuckt101
11-08-2001, 11:23 PM
Windows notepad does it (replacing characters). Nothing to download...
If you don't have windows, vi does it on linux... Just gotta learn the command ;)
JustinK
11-08-2001, 11:49 PM
EditPad is better. Notepad's done some funky stuff for me before such as making everything into one big line upon saving... Editpad has yet to do that and I like it's multi-document allowance.
SoftWareRevue
11-09-2001, 12:03 AM
EditPlus should do what you need.
www.editplus.com
search / replace / all ;)
Fubonis
11-09-2001, 12:44 AM
EditPad Pro is yummy. Syntax highlighting. Yay.