Loading ...
Sorry, an error occurred while loading the content.

qw : what is it

Expand Messages
  • Abhra Debroy
    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 (
    Message 1 of 3 , Mar 31, 2002
    • 0 Attachment
      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))

      Regards

      Abhra
    • Jonathan E. Paton
      ... 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 2 of 3 , Apr 1, 2002
      • 0 Attachment
        --- 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
      • b_harnish
        ... 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 3 of 3 , Apr 1, 2002
        • 0 Attachment
          --- 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.