in reply to HTML To ASP Converter
Admittedly the error checking could be better and we should use a GetOpt::* module to get the input filename but I think it does the job.use strict; use File::Basename; my ($name,$path,$suffix) = fileparse($ARGV[0], '\.html?'); unless (($suffix) && (-e $ARGV[0])) { complain() } rename ($ARGV[0], $path . $name . ".asp") && print "File converted to ASP!" or complain(); sub complain { print "Error: Check and try again"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: HTML To ASP Converter
by patgas (Friar) on May 01, 2001 at 00:54 UTC | |
by $code or die (Deacon) on May 01, 2001 at 01:35 UTC | |
by dze27 (Pilgrim) on May 01, 2001 at 19:20 UTC | |
by patgas (Friar) on May 01, 2001 at 02:00 UTC |