Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
My perl immersion began by working on someone else's perl code in 1995; the job was to condition newswire text for "spoken language modeling", which means: convert all number strings, abbreviations and symbols into the fully spelled-out words that people would say if they were reading the text aloud (and there was an option to spell out the appropriate pronunciation for punctuation marks -- e.g. "open-single-quote ... close-single-quote").
I needed to adapt the code so it would work on a wider variety of input text data (a lot of hand-tuning involved). Luckily for me, the author of the 8-or-so interrelated Perl-4 scripts I was given really knew what he was doing. I spent most of the first week or two referring constantly to the "perlfunc" and "perlvar" man pages to figure out how the code worked. I already knew regexes from grep and awk and some sed usage, but the "perlre" man page was like a full course of steroids. Between the vast array of built-in functions, the many enhancements to basic regex usage, the kitchen-sink/use-whatever-works-best mindset, and the fully-detailed-yet-coherent man pages, everything just made sense. (Update: well, everything except "pack" and "unpack" -- I didn't really grasp the man page for that until much later.) I started writing perl substitutes for (combinations of) basic shell tools because it was quicker/easier/more effective than repeatedly doing lengthy pipeline commands or adding more shell-based functions and aliases in my .bashrc file (I had always been averse to shell scripting). I was deeply grateful to be able to do more of the complex tasks with less dependence on C, and I stopped using awk altogether. In reply to Re: What was the bait (project, problem or opportunity) that hooked you on Perl?
by graff
|
|