Wow, I didn't know that, and I have been using Perl for some time. Never
too old to learn.
>>
The answer is in 'perldoc perlsyn':
The "foreach" loop iterates over a normal list value and sets the
vari-
able VAR to be each element of the list in turn. If the variable is
precede
On Sat, Sep 20, 2003 at 03:56:14PM +0530 Ramprasad A Padmanabhan wrote:
>I have a script in which I am using foreach in two diff ways
> I am doing a last; in the very first loop So each time the variable $t
> should be assigned only once.
>
> But you can see the results dont match.
>
>
> #
Hello all,
I have a script in which I am using foreach in two diff ways
I am doing a last; in the very first loop So each time the variable $t
should be assigned only once.
But you can see the results dont match.
#!/usr/bin/perl
use strict;
use warnings;
my @alpha = qw(a b c d );
my $t="";
fo