#!/usr/bin/perl
#----------------------------------------------------------------------
# Torg-links.pl                                                       |
# Created on Oct 04, 2000.                             		      |
# Shivam Surve <shivam@trainweb.com>                                  |
#----------------------------------------------------------------------
# CopyRight :                                                         |
# Copyright 99 by Shivam A. Surve for TrainWeb.com.All rights reserved|
# Support :                                                           |
# Support for is provided at http://www.trainweb.com/tech or at       |
# shivam@trainweb.com or at steve@trainweb.com.                       |
#----------------------------------------------------------------------
# This prg. to make the is basically reads every record from the      |
# "find-Torg.txt" file and replaces all the records which contains    |
# '/home/trainorg/public_html' to 'http://www.trainweb.org'           |
#
# Output is stored in  --> "tourls.txt" file.			      |
# perl Torg-links.pl                                                  |
#----------------------------------------------------------------------

open(FILE1, "find-Torg.txt");  # input file;
open(OUT, ">tourls.txt");      # output file;
        

$http = 'http://www.trainweb.org';
$data = '/home/trainorg/public_html' ;


    while ($line1 = <FILE1>)
    {
        chomp($line1);

	$line1 =~ s/$data/$http/ ;

	## write the record to the file.

        print OUT "$line1\n";
    }

      
print "\nFile Processing Ended......Thank You\n";

close(FILE1);
close(OUT);
exit;
