in reply to Re^2: looping through array
in thread looping through array

is anything within single quotes is always treated as literal in print statement ?
anything in double quotes is treated as string with variables getting their values from the code ?
whats the difference between when an array elements are declared in single quotes, double quotes and without quotes ? I tried out all the ways and I get the same result.

Replies are listed 'Best First'.
Re^4: looping through array
by AnomalousMonk (Archbishop) on Jan 08, 2010 at 03:07 UTC
    is anything within single quotes is always treated as literal in print statement ? anything in double quotes is treated as string with variables getting their values from the code ?

    Asked and answered. See Re^3: looping through array.

    whats the difference between when an array elements are declared in single quotes, double quotes and without quotes ? I tried out all the ways and I get the same result.

    None. Strings can be defined using single-quotes, double-quotes and the qw operator (and probably in a few other ways that have slipped my mind). A list can be defined with strings and other things, and a list can be assigned to an array. Although not entirely unrelated, strings, lists and arrays are essentially independent.