#!/usr/bin/perl
#
# Author: Prabu, School of Computer Science, FIU
#         prabu@cs.fiu.edu
#         7/21/2004
#
# Do NOT edit this file (on Windows)
#
# Examine each *.pl, *.cgi file,
#  and creates a text file with ".txt" extension
#   for web browsing
#

# check for correct number of arguments
if ($#ARGV >= 0) { # in Perl, argcnt is zero for one argument
    die "Usage: $0 [with no argument] \n";
}

foreach $f (`/bin/ls *.cgi *.pl`) {
  $f =~ s/\s+$//; # strip trailing whitespace
  $txtf = $f;
  $txtf =~ s/\.pl$/_pl.txt/;
  $txtf =~ s/\.cgi$/_cgi.txt/;
  system("/bin/cp $f $txtf");
}
exit(0);
