CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [Ted] Alter contents between tags: Edit Log



davidbj
Novice

Aug 17, 2011, 3:43 AM


Views: 1838
Re: [Ted] Alter contents between tags

Please, explain what you want to do with more details.
This is a sample.

Code
#!/usr/bin/perl  

use Modern::Perl;
use autodie;

open FILE, q[<], 'file.txt';
open FILE2, q[>>], 'fileout.txt';
while(my $line=<FILE>){
chomp($line);
$_ =~ s/\//\./g;
print FILE2 "$_\n";
}
close FILE;
close FILE2;



(This post was edited by davidbj on Aug 17, 2011, 4:16 AM)


Edit Log:
Post edited by davidbj (Novice) on Aug 17, 2011, 4:16 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives