in reply to Dereferencing the array and printing by Concatenation?

This has nothing to do with references.

my @a = qw/a b c/; print "Here are the elements. Notice the comma ", @a; print "Here's the size. Notice the dot " . @a;

The concatenation operator "." puts the expression @a in scalar context. This also would print the size:

print "Notice the comma, but also 'scalar' ", scalar @a;

Replies are listed 'Best First'.
Re^2: Dereferencing the array and printing by Concatenation?
by gube (Parson) on Apr 24, 2006 at 12:44 UTC

    Hi gaal,

    Thanks for your reply if i use comma it's working fine..This is nothing to do with reference <reply> I have used a long code, in that code while debug i have doubt so, i paste the small sample code...Thx..