From: Peter Scott <[EMAIL PROTECTED]>
> If you want to return the number of entries in the array, you'd need
> to do
>
> sub num_get
> {
>my $what = pop;
>eval "$#$what";
> }
No need for eval.
it doesn't hurt you this time since you are eval()ing a number ... the
last
[EMAIL PROTECTED] (Tarak Parekh) writes:
> package A
>
> use strict;
>
> my @arr;
>
> sub new
> {
> my $classname = shift;
> my $self = {
> 'cfg_file' => undef,
> @_,
>};
>
> # Mark it of the right type
> bless ($self, $classna
At 02:41 PM 2/1/02 -0800, Tarak Parekh wrote:
>Hello,
>
>I am trying to use Objects in Perl, and am having some basic problem.
>I am sure I am missing something, but am not able to figure out what.
>
>---
>
>package A
>
>use strict;
Good. Lots of people don't bother to put this in modules.
>my
Hello,
I am trying to use Objects in Perl, and am having some basic problem.
I am sure I am missing something, but am not able to figure out what.
---
package A
use strict;
my @arr;
sub new
{
my $classname = shift;
my $self = {
'cfg_file' => undef,