Re: context, printing, and concatenation

2003-06-25 Thread David Storrs
On Mon, Jun 23, 2003 at 11:13:00PM -0500, Peter wrote: > I'm on the first few chapters of "Learning Perl" and came up with a > question. Given: > > - > > @array = qw ( one two three ); > print @array . "\n"; > print @array; > >

RE: context, printing, and concatenation

2003-06-24 Thread NYIMI Jose (BMB)
AIL PROTECTED] Sent: Tuesday, June 24, 2003 6:13 AM To: [EMAIL PROTECTED] Subject: context, printing, and concatenation I'm on the first few chapters of "Learning Perl" and came up with a question. Given: - @array = qw ( one two three )

context, printing, and concatenation

2003-06-24 Thread Peter
I'm on the first few chapters of "Learning Perl" and came up with a question. Given: - @array = qw ( one two three ); print @array . "\n"; print @array; - Why does the first print statement print "3" (and a carriage return)

Re: context, printing, and concatenation

2003-06-23 Thread Jeff 'japhy' Pinyan
On Jun 22, Peter said: >print @array . "\n"; >print @array; > >Can you explain why the first print statement prints "3" (and a carriage >return) while the second prints "onetwothree"? My understanding is that >the first print sees the array in scalar context while the second sees >it in list cont

Re: context, printing, and concatenation

2003-06-23 Thread Paul Johnson
Peter said: > I'm on the first few chapters of "Learning Perl" and came up with a > question. Given: > > - > > #!/usr/bin/perl > > @array = qw ( one two three ); > print @array . "\n"; > print @array; > > - > > Can you explai

context, printing, and concatenation

2003-06-23 Thread Peter
I'm on the first few chapters of "Learning Perl" and came up with a question. Given: - #!/usr/bin/perl @array = qw ( one two three ); print @array . "\n"; print @array; - Can you explain why the first print statement print