I am running Perl on Windows XP Pro. I am new to Perl. I am trying to write a script that will take a text file with multiple rows and a reoccurring character that I want replaced, then the output written to another text file.
Here is what I have come up with (actually I got it out of a book): #!C:\perl\bin\perl open(TXT, "<sample.txt"); @text = <TXT>; close(TXT); print "Content-type:text/html\n\n <html>"; print "Text file contents:<br/>"; foreach $line(@text) { print "$line <br/>"; } print "</html>"; This opens the file and displays it. I do not know where in this syntax I place s/,/|/ to replace the ,'s with |'s. I am using the html tags to display the output to a browser window, to make sure the output is what I want. I need it to write the output to a text file instead. Thanks, DB __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs