in reply to Re: I have a perl snippet. And I need help understanding it. Can you help answer these questions.
in thread I have a perl snippet. And I need help understanding it. Can you help answer these questions.
Good answers to the specific questions. I just want to chime in and agree that this is pretty dense code to try to learn from. It's got unpack, which is fairly complex in itself, plus OO (and an object structure several levels deep), subroutine argument handling, and more. On top of that, it's not very Perlish code. If you're learning Perl, you don't want to learn to use C-style for loops like the first line below when you can do the second one:
for( my $j=0; $j<2; $j++){ # C-style loop for my $j (0..1){ # Perl-style loop, much clearer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: I have a perl snippet. And I need help understanding it. Can you help answer these questions.
by Fighter2 (Novice) on Nov 08, 2011 at 03:24 UTC | |
by davido (Cardinal) on Nov 08, 2011 at 05:22 UTC | |
by aaron_baugher (Curate) on Nov 08, 2011 at 14:16 UTC |