Sorry, an error occurred while loading the content.

## Re: [PBML] qw : what is it

Expand Messages
• ... Since qa() doesn t exist, I ll assume qw() as per subject line. The full form of qw for your example is: @array = ( x , y , z ); Look at the section
Message 1 of 3 , Apr 1, 2002
--- Abhra Debroy <abhra@...> wrote: > Hello All
>
> I know it is very silly question,still I am asking u all
> What is the full form of qa ? What does it means ? How it is different with
> normal array ( @arrray= qa( x y z))

Since qa() doesn't exist, I'll assume qw() as per subject line.

The full form of qw for your example is:

@array = ('x', 'y', 'z');

Look at the section 'Quote and Quote-like Operators' of 'perldoc perlop' for the other quote
operators.

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
• ... Well, there is no qa(), but for qw: qw = Q(uoted) W(ord list). The following are mostly similar (have same output): @x = split(/ s+/, STRING1 STRING2
Message 2 of 3 , Apr 1, 2002
--- In perl-beginner@y..., Abhra Debroy <abhra@p...> wrote:
> Hello All
>
> I know it is very silly question,still I am asking u all
> What is the full form of qa ? What does it means ? How it is different with
> normal array ( @arrray= qa( x y z))

Well, there is no qa(), but for qw:

qw = Q(uoted) W(ord list).

The following are mostly similar (have same output):
@x = split(/\s+/,'STRING1 STRING2 STRING3');
@x = qw(STRING1 STRING2 STRING3);
@x = ('STRING1', 'STRING2', 'STRING3');

With the last two being the most similar, because perl actually compiles the qw into the list like the last one.

See perldoc perlop.

- Brian
Your message has been successfully submitted and would be delivered to recipients shortly.