Re: Manipulating reference to array of array references

2011-11-21 Thread Mohan L
>> Unless you really want to change your data, use map(). >> > > Ruud didn't say that you shouldn't change the data, only that you should > use map unless that was what you wanted. Who knows what the OP wants. > > Rob Sorry for the delay. What Shlomi Fish mentioned was I wanted. Thanks for all

Re: Manipulating reference to array of array references

2011-11-21 Thread Rob Dixon
On 20/11/2011 04:14, Chris Charley wrote: Well, if Dr Ruud is right, and you shouldn't replace the undefs in the original arrays, then the following program wouldn't be correct. It changes the original array (data). On 20/11/2011 00:23, Dr.Ruud wrote: Unless you really want to change your da

Re: Manipulating reference to array of array references

2011-11-20 Thread Chris Charley
"Mohan L" wrote in message news:cadihtmt4rqntknjlgsimpgqv9xuc89dryhtx00ctwbknxwd...@mail.gmail.com... Dear all, #!/usr/bin/env perl #dummy.pl use strict; use warnings; use Data::Dumper; my $ref_to_AoA = [ [ "fred", "barney",undef,"pebbles", "bambam", "dino", ], [ "homer",und

Re: Manipulating reference to array of array references

2011-11-20 Thread Rob Dixon
On 19/11/2011 18:21, Mohan L wrote: Dear all, #!/usr/bin/env perl #dummy.pl use strict; use warnings; use Data::Dumper; my $ref_to_AoA = [ [ "fred", "barney",undef,"pebbles", "bambam", "dino", ], [ "homer",undef,"bart",undef, "marge", "maggie", ], [ "george", "jane",u

Re: Manipulating reference to array of array references

2011-11-19 Thread Dr.Ruud
On 2011-11-19 19:21, Mohan L wrote: But What I want is, I want to replace all 'undef' to a string 'foo'. Unless you really want to change your data, use map(). -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://l

Re: Manipulating reference to array of array references

2011-11-19 Thread Shlomi Fish
Hi Mohan, On Sat, 19 Nov 2011 23:51:19 +0530 Mohan L wrote: > Dear all, > > #!/usr/bin/env perl > #dummy.pl > use strict; > use warnings; > use Data::Dumper; > > my $ref_to_AoA = [ > [ "fred", "barney",undef,"pebbles", "bambam", "dino", ], > [ "homer",undef,"bart",undef, "marge

Manipulating reference to array of array references

2011-11-19 Thread Mohan L
Dear all, #!/usr/bin/env perl #dummy.pl use strict; use warnings; use Data::Dumper; my $ref_to_AoA = [ [ "fred", "barney",undef,"pebbles", "bambam", "dino", ], [ "homer",undef,"bart",undef, "marge", "maggie", ], [ "george", "jane",undef, "elroy",undef,"judy", ], ];