home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Perl CookbookPerl CookbookSearch this book

10.8. Skipping Selected Return Values

10.8.2. Solution

Either assign to a list that has undef in some positions:

($a, undef, $c) = func( );

or else take a slice of the return list, selecting only what you want:

($a, $c) = (func( ))[0,2];


Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.