Archive

Archive for August, 2010

Notepad type program in Perl

August 13, 2010 Leave a comment

Whenever I learn a new programming language I write a notepad type program in said language. So here is the one in Perl:

#!usr/bin/perl
#
#Program to open a file and read its output and write to a file

#prints the statement
print "R to Read or W to Write: ";

#reads user input
my $choice = ;

#change R or W to lowercase
my $choicel = lc($choice);

print "where is the file located at? ";
my $fileloco = ;

if ($choicel eq "r\n") {
open(INFO, $fileloco) or die "File could not be open";
@lines = ;
close(INFO);
print @lines;
#added so it won't autoclose
;
}

elsif ($choicel eq "w\n") {
print "What would you like to add? ";
my $notes = ;
open(INFO, ">", $fileloco) or die "File could not be open";
print INFO $notes;
close(INFO);
;
}

This works under Linux and it should work under Windows. Everything that isn’t clear is commented. I don’t think I’ll be doing anything more in Perl. This program made me realize that I don’t like Perl as much as I thought.

Categories: Uncategorized

Firefox’s Memory Usage

August 13, 2010 Leave a comment

I used Firefox daily until Chrome came out. I switched right then and there. I used Chrome on Windows and Linux and totally shunned Firefox. Recently Chrome had been using around 600MB of RAM which is a lot for only having 3 tabs open. So I went back to Firefox. I tried out Firefox 4 beta and it worked out but I need some extensions to work such as Firebug. So I uninstalled Firefox 4 and installed Firefox 3.6.8. So I installed Firebug and went on with my daily usage. Fast forward to today and I find Firefox being unresponsive. So I open up the Task Manager and what do I see? Firefox using 1.6GB of RAM making my total RAM usage 2.6GB. I kill firefox.exe and my usage goes back down to .98GB. What a huge difference. Needless to say I’m back using Google Chrome and just waiting for Internet Explorer 9 to come out.

Categories: Uncategorized