[Israel.pm] Perl Success Story
Shlomi Fish
shlomif at vipe.stud.technion.ac.il
Wed Oct 1 16:09:50 EEST 2003
One cannot imagine how useful perl proves sometimes to a university
student. I can recall several occasions in which I used Perl to facilitate
a task or check my homework. Of them, there is one that I still remember
very clearly.
It was the course "Introduction to Computer Networks" and we learned about
the various variations of networking protocols (Stop-and-wait, Go-back-N,
and Selective-Repeat). We were given a simulation of these protocols
written in C and compiled to run on Windows. The simulation could be ran
with several parameters and would output a verbose file with the
parameters of the simulation, the simulation itself and then some
statistics of the simulation.
We ran the program several times and got several files in return. Now we
had to somehow insert the statistics into Excel so we can analyze
them, process them, and create charts out of them. But the statistics were
scattered over several different files, all with the same format, but
nothing that Excel can understand. (at least not without a massive amount
of Visual Basic for Applications code).
Without thinking for a moment, I started writing a Perl script that will
process the files, extract the corresponding data and output a
tab-delimited file that can be inputted into Excel. It took some time to
write the script, and meanwhile my partner decided it may be faster to do
it by hand. Thus, he occupied the nearby station, and started extracting
the data himself. I finished a few minutes after that, though, (while he
was just beginning in his manual labour) and we were able to input the
data into Excel and continue the assignment. It took about 15 minutes or
less, all in all.
Later on I talked to a few fellow students about the assignment. One of
them claimed it took him 3 hours to input everything into Excel. (!)
Another said it took him one hour, which is still much worse than 15
minutes. Needless to say, none of them knew Perl.
Enough said.
Regards,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish shlomif at vipe.technion.ac.il
Home Page: http://t2.technion.ac.il/~shlomif/
An apple a day will keep a doctor away. Two apples a day will keep two
doctors away.
Falk Fish
More information about the Perl
mailing list