NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
compact that code (Score:1)
Your code could be compacted quite a bit, if you change the calling syntax slightly and rely on the :)
while ()construct - and the surrounding perl magicSomething like the following
Reply to This
Re:compact that code (Score:1)
Re:compact that code (Score:1)
Well, there were a couple of points, some of them are probably a matter of personal taste/preferences ...
while ()' type of interface, meaning if I wanted to know the fog index of a string, I would pass it in via the shell withecho "string" | fog. This way the script behaves like a normal unix command line tool in that it can work as a filter for piping or be used to wo