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

Re: [PBML] begginer doubt

Expand Messages
  • Paul Archer
    ... The point of using qw is to not to have to quote each element of you list. The first element of your list here is hello , not hello . (IE. the double
    Message 1 of 6 , Nov 30, 2005
    • 0 Attachment
      5:21pm, abraham wrote:

      > Hello to all, i am novice in PERL, I have the following doubt, why
      > the perl interpreter show this warning:
      >
      > the code:
      >
      > use warnings;
      > use strict;
      > my @myArray = qw("hello" "world" "a" "b" "d" "e" "f" "g");

      The point of using qw is to not to have to quote each element of you list.
      The first element of your list here is '"hello"', not 'hello'. (IE. the
      double quotes are included in the string.)


      > print @myArray[0];
      >
      > the output:
      >
      > Scalar value @myArray[0] better written as $myArray[0] at
      > C:/abraham/WORKSPACE/Xparser/file2.pl line 5.
      > "hello"
      >
      > somebody can explain to me?
      >
      > thanks in advance
      >
      > carlos g
      >
      >
      >
      >
      >
      >
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >



      ------------------------------------------------------------
      "They're willing to kill people. That makes them dangerous."
      --News announcer, about South American drug lords
      ------------------------------------------------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.