Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Here, doccy doccy. nice doccy. heredoc, treat.

by CheeseLord (Deacon)
on Jun 21, 2001 at 06:35 UTC ( #90276=note: print w/ replies, xml ) Need Help??


in reply to Here, doccy doccy. nice doccy. heredoc, treat.

A small question, perhaps, but why would you need to use here docs with qw? The following would do what (I think) you're trying to do with your final section of code:

my @list = qw( Foo Bar Baz ); print "@list\n";

Will print out Foo Bar Baz unless you have a different list item separator...

I'm more than willing to concede that I likely am just not thinking hard enough (or I don't know enough) to envision a case where this wouldn't be optimal, but... I just don't see why here-docing things like qw would ever be necessary (or really, even desirable).

Although I can't deny it is interesting.

Update: (re: jeffa) Point taken. :)

Update #2: (re: Vynce) True, there could (should?) be some uses for this sort of thing in the future. I guess I was just thinking in "Why?" instead of "Why not?" mode.

His Royal Cheeziness


Comment on Re: Here, doccy doccy. nice doccy. heredoc, treat.
Select or Download Code
(jeffa) 2Re: Here, doccy doccy. nice doccy. heredoc, treat.
by jeffa (Chancellor) on Jun 21, 2001 at 07:32 UTC
    Not to be a complete smart arse, but TIMTOWTDI. Seriously, there is no rational reason, just the never ending curiosity that drives the CRT radiation thriving people to do weird and insane stuff with Perl. God bless 'em. *sniff*

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-10-01 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (32 votes), past polls