[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] Ok, what am I doing wrong???



I'm trying to pass two arrays to a function like this:

        # Run the dump function the user specified.
        $DumpFunction{$HEADERS{'Target'}}->(\@NamesArray, \@parsedData );

My function works when I do it this way:

sub textDump
        {
        my ( $names, $data) = @_;
        foreach ( @$data )
                {


But I have no need for $names in this target function, so I'd like to do 
something like this:

sub textDump
        {
	shift;
        foreach ( @$_ )
                {

This doesn't work as I expected.  My understanding of shift is that it should 
take the first value off the list (in this case \@NamesArray) and return it 
(in this case drop it), leaving the rest of the list.  Shouldn't that leave 
$_ = \@parsedData?  

Have I missed/missunderstood something?

...Izzy

PS: I hope no one minds me asking for perl help on the coldsync list.  I 
could/should sign up for a perlmonk account.  
-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.