Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Hidden features of Perl

by Jenda (Abbot)
on Jun 22, 2009 at 19:23 UTC ( #773739=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Hidden features of Perl
in thread Hidden features of Perl

Most of the stuff is something that looks esoteric to someone who was taught C or Fortran or who taught him/her-self VB and is so used to imperative programming, that he/she cannot think outside that old tiny box. The people that find references hard and higher order functions rocket science.

And the DATA filehandle is no more esoteric than a print statement. A bit unusual maybe, non-obvious probably, but esoteric? That's a very big stretch of the meaning of the word.

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^3: Hidden features of Perl
Re^4: Hidden features of Perl
by educated_foo (Vicar) on Jun 23, 2009 at 02:58 UTC
    (Pre-edited to protect silly peoples' silly sensibilities.)

    You're clearly trying to (pee) on that thread by saying that Real Computer Scientists who Love Functional Programming find it all beneath them. I could go on and on asking what being self-taught or being an (oh my (furry) (Gosh)!) imperative programmer has to do with various entries (try "Binary "x" is the repetition operator:"), but it would probably be a waste of time in this programmer (disk)-size war.

    And the DATA filehandle is no more esoteric than a print statement.
    This is so deliberately obtuse that I don't know how to respond. Let's try a short play:
    You: John, please print this.
    John the Secretary: Okay
    ...
    You: John, does DATA refer to: (1) all the lines after __DATA__ in the current file; (2) all the lines after DATA; (3) a file named DATA; (4) none of the above?
    John: ???
    (Fruit). Sometimes I know which words to chant for approval, but just can't bring myself to say them.

      We can all make things look complicated.

      You: John, does "print" refer to: (1) putting ink on paper; (2) adding some data to an output buffer (possibly encoding it first) that will, when flushed, be pushed into an output stream that will probably result in its being stored in a file or displayed on a computer monitor, but is, in fact, highly unlikely to involve ink or paper?

      John: ???

      DATA is not a standard feature of modern programming languages, but it's really not that strange in the grand scheme of things. There have been plenty of other languages that do provide equivalent features, right back to the good old 8-bit BASICs found in every techie home throughout the 1980s.

      And, more to the point, __DATA__ is a pretty common feature in the Perl world. It's a standard tool in nearly all the test suites I've ever seen, both on CPAN and in proprietary internal code. I'd go so far as to say that if I was giving a job interview to someone who claimed to be an experienced Perl developer, but didn't have the faintest inkling that __DATA__ had a special meaning, then I'd fail them on the spot.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://773739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-12-29 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls