Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is Perl SLOW

Status
Not open for further replies.

VspecGTR3

Technical User
Feb 3, 2003
62
US
The following script does the following, find the file test.txt and rename its to rntest.txt and displays test was successful or Renaming failed or file may not exsist. now this is a tset script and if this script was executed it will only display test was successful once and ever other try afterwards will display Renaming failed or file may not exsist because the file test.txt wont exsist but some some reason when i run the script repeatly on my web browser i get test was successful even tho i know it can't cause test.txt no longer exsist. why is it running so slow, its like its running on cache memory?
==========================================================
#!/usr/bin/perl
print "Content-type: text/html\n\n";
file fosent exsist</p>&quot;}
unless(rename(&quot;test.txt&quot;, &quot;rntest.txt&quot;))
{print &quot;<p>Renaming failed or file may not exsist</p>&quot;}
else{print &quot;<p>Rename was success</p>&quot;}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top