in reply to Build your array with push
As japhy so kindly pointed out, the following:
my @folk = qw(Hibbs Daglish Schwartz Vroom), "Node Reaper"; my @folk = map {s/_/ /g; $_} qw(Hibbs Daglish Schwartz Vroom Node_Reaper);
should have been written
my @folk = (qw(Hibbs Daglish Schwartz Vroom), "Node Reaper"); my @folk = map {(my $s=$_)=~s/_/ /g; $s} qw(Hibbs Daglish Schwartz Vroom Node_Reaper);
Thatll teach me not to be a smarty pants.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Build your array with push
by japhy (Canon) on Jan 31, 2006 at 15:39 UTC | |
by demerphq (Chancellor) on Jan 31, 2006 at 15:48 UTC | |
by japhy (Canon) on Jan 31, 2006 at 15:54 UTC | |
by demerphq (Chancellor) on Jan 31, 2006 at 16:06 UTC |