[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] Ok, what am I doing wrong???
- To: coldsync-hackers at lusars dot net
 
- Subject: [coldsync-hackers] Ok, what am I doing wrong???
 
- From: Izzy Blacklock <izzyb at ecn dot ab.ca>
 
- Date: Tue, 10 Jun 2003 19:01:42 -0600
 
- Reply-to: coldsync-hackers at lusars dot net
 
- Sender: owner-coldsync-hackers at lusars dot net
 
- User-agent: KMail/1.5
 
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.