[Purdue-pm] More on Mark's challenge
westerman at purdue.edu
Wed Jan 13 07:14:05 PST 2010
Phillip San Miguel wrote:
> Rick Westerman wrote:
>> I had a question today as to if is required to use the 'hereis'
>> text Mark put in his original challenge email. My feeling is
>> 'yes'. Just filling up an array with serial ASCII characters
>> defeats part of the challenge -- one could certainly imagine a
>> scenario where arbitrary text is used in a non-serial manner. But
>> maybe I am saying this because working with the 'hereis' took most of
>> my less than 2 hour effort (I almost never use 'hereis') and so want
>> to see what other people come up with.
>> I am looking forward to Tuesday to see what people come up with.
>> TIMTOWTDI !!!
> The term is not "hereis", it is a here document or "heredoc".
You can call it a heredoc (which is correct) but I can also call it
a hereis since its roots are back in Unix land when we called it
hereis. Or heredoc. Or just here. Or whatever. We knew what we meant.
Of course these days we could go on the side of 'might makes right'.
Google has 85,400 hits for "heredoc" and "perl" vs. 2,260 for "hereis"
and "perl". So I am in a minority but still at least a bit correct.
Guess it is time to change that Wikipedia article so that you won't rag
me about usage and so that people don't forget their roots.
> The code to load that block of text into a variable using a heredoc,
I presume, was meant by Mark to be trivial, > not really part of the
Well I agree that your method of just reading the data in to $_ is
trivial. But I am not doing it that way but rather am reading the data
into a form that I can actually concisely. This was the part that was
more difficult for me. Once I was past that then generating the @print
was trivial. Only one line even without all of the caveats on forbidden
Anyway Tuesday approaches!
Rick Westerman westerman at purdue.edu Bioinformatics specialist at the
Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department
of Horticulture and Landscape Architecture 625 Agriculture Mall Drive
West Lafayette, IN 47907-2010 Physically located in room S049, WSLR
More information about the Purdue-pm