Hello Wise Monks:
I have a very simple print question:
The following code does what I need:
@array = 5..9;
print " @array \n";
push @array, 10;
print "@array \n" ;
push @array, qw( fred barney wilma) ;
print "@array \n" ;
produces the following, which is what I expected:
C:\dev\learningPerl>perl ex3a.pl
5 6 7 8 9
5 6 7 8 9 10
5 6 7 8 9 10 fred barney wilma
C:\dev\learningPerl>
My question is:
what is going on in this code?
@array = 5..9;
print @array . "\n";
push @array, 10;
print @array . "\n" ;
push @array, qw( fred barney wilma) ;
print @array . "\n" ;
produces the following, which seems strange to me.
Certainly not what I expected.
C:\dev\learningPerl>perl ex3a.pl
5
6
9
C:\dev\learningPerl>
Just try to learn Perl and the above seeems strange to me.
Many Thanks for your kind assistance.
Best
KD