|Perl: the Markov chain saw|
Sort on boredomby Ovid (Cardinal)
|on Mar 23, 2001 at 17:53 UTC||Need Help??|
Well, totally bored here at work. I have a bunch of VBScript code (ugh!) that's sitting here doing nothing until I get more specs. Thought I would use the time to play around with a problem suggested in another node. Essentially, the author wanted to sort a list by frequency of the items in that list. Having spare time and a huge desire to maintain my limited Perl skills, I wrote the following snippet:
Is there any way of eliminating the temporary variable %freqs? I hate synthetic code (code that solves a coding problem, not the problem the program is designed for) and it's bugging me. Or is this one of those age-old "FAQ" questions that I should already know the answer to?
Yeah, I know. It's a trivial post, but like I said, I am bored out of my skull here.
Incidentally, I am returning to the US in April (and will be programming in Perl again!!!!) and will be bidding a sad farewell to my newfound friends here in the Netherlands: kudra, ar0n, and h0mee (who was here visiting).
Update: Once again, tilly makes me feel stupid :)
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.