in reply to saving rest of array after a match

Hi,

If the reason you want the spaces is simply to print the array, perhaps it would help to note that this can be done simply by surrounding the array in the print statement by double quotes. ie
print "@incline";
hope this helps

thinker

Replies are listed 'Best First'.
Re: Re: saving rest of array after a match
by pzbagel (Chaplain) on Jun 27, 2003 at 17:44 UTC

    That works in the assignment operator too:

    use Data::Dumper; @a=(1..10); $b="@a"; print Dumper(\@a,$b); print "Array: @a\n"; print "Scalar: $b\n"; ## OUTPUT ######################## $VAR1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; $VAR2 = '1 2 3 4 5 6 7 8 9 10'; Array: 1 2 3 4 5 6 7 8 9 10 Scalar: 1 2 3 4 5 6 7 8 9 10