And here are some advantages Perl has over ASP and Java (to throw at them while they're still trying to come up with some good reasons for their preferred languages):
In ASP:open my $fh, ">FILENAME" or die "Can't write FILENAME: $!"; print $fh "We are writing a line of text to a file.\nSecond line"; close $fh;
Or Java:<% Dim objFSO, objTextStream, file file = Server.MapPath("samplefile.txt") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTextStream = objFSO.OpenTextFile(file , 2, True) objTextStream.WriteLine "We are writing a line of text to our text fil +e" & VBCfLf & "This is our second line of text" & VBCrLf objTextStream.Close Set objTextStream = Nothing Set objFSO = Nothing %>
I know which one I'd rather write. The Java example isn't as ludicrously verbose as the ASP sample, but I still find Perl's syntax much more straightforward.try { BufferedWriter out = new BufferedWriter(new FileWriter("outfil +ename")); out.write("We are writing a line of text to our text file\nThi +s is our second line of text"); out.close(); } catch (IOException e) { }
In reply to Re: Arguments needed for comparision between Perl, ASP and Java
by batkins
in thread Arguments needed for comparision between Perl, ASP and Java
by Gorby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |