Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Curious to know the internals of the following code

by blazar (Canon)
on Nov 08, 2005 at 10:57 UTC ( [id://506693]=note: print w/replies, xml ) Need Help??


in reply to Curious to know the internals of the following code

Because despite the name @list you're in fact assigning it a single element which is precisely the string "'Ashok Hello'", that is: without the external double quotes, but with the internal single ones. That is precisely the difference between q() and qw(): the former returns non interpolated strings, and when used with "'" (single quotes) as a delimiter "q" become redundant, while the latter returns a list of (non interpolated) "words"1, splitting on whitespace.

1 Notice the double quotes - I mean that they're not required to match /^\w+$/.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-12-09 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (55 votes). Check out past polls.