Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Arguments needed for comparision between Perl, ASP and Java

by Grygonos (Chaplain)
on Nov 10, 2003 at 15:26 UTC ( #305889=note: print w/replies, xml ) Need Help??


in reply to Re: Arguments needed for comparision between Perl, ASP and Java
in thread Arguments needed for comparision between Perl, ASP and Java

in all fairness to ASP. you could have written it shorter and you wrote some things in the ASP one that weren't in the perl one.
<% Dim objFSO, objTextStream, file file = Server.MapPath("samplefile.txt") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTextStream = objFSO.OpenTextFile(file , 2, True) #If I'm not mistaken you can bump these two writes into one. objTextStream.WriteLine "We are writing a line of text to our text fil +e" objTextStream.Write "This is our second line of text" & VBCrLf #You didn't echo in the perl example Response.Write "we have written to our text file" objTextStream.Close #Are these neccesary ? Set objTextStream = Nothing Set objFSO = Nothing %>
I myself don't do much ASP or know enough about it to call it "superior" to anything, but let's be fair in our comparison.
  • Comment on Re: Re: Arguments needed for comparision between Perl, ASP and Java
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Arguments needed for comparision between Perl, ASP and Java
by batkins (Chaplain) on Nov 10, 2003 at 15:35 UTC
    Fair enough (no pun intended). I've removed the echo and combined the two Response.Write calls. However, the last two lines are necessary - the Perl version closes the filehandle, so the ASP version should do the same.
    Are you sure it was a book? Are you sure it wasn't.....nothing?
      so then the = nothing calls are neccesary to properly close that handle? Way OT, but I'm just making sure I understand why you said they were needed.

      Grygonos

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://305889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2021-01-18 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?