in reply to @$ variable type
A few things you can do to make it easier to learn what's going on with your code. At the top of your file, along with other pragmas include:
-
use diagnostics -v; use Data::Dumper; ### YOUR CODE ### print Dumper(@$sets);
- The first line will give you more debugging information on any errors/warnings your code is returning.
- The second (use Data::Dumper) will reveal the contents of variables such as your @$sets, using print Dumper(@$sets);
References in Perl can be hard to learn (as can navigating Perl's documentation) but it's important you do so in order to not struggle with the language. Good luck!
- See also:
- PerlMonks: How can I visualize my complex data structure?
- Elements of Programming with Perl Ch. 4 Data : Types and Variables
- Effective Perl Programming Ch. 2 item 20 and Ch. 6 References
- PerlMonks: Getting Better at Finding Answers
- PerlMonks: Perl documentation documentation
"...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." — Don Quixote
In Section
Seekers of Perl Wisdom