in reply to Re: Best way to call DBI query
in thread Best way to call DBI query

>I believe this is because shift() is diffrent than shift. Calling shift() i believe forces shift to be called with no arguments, rather than with @_ as is done when called without parens.

If you are right, why does the following work correctly:

sub AnySub { my @list = @{ shift() }; # automatic dereferencing list ...

Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

Replies are listed 'Best First'.
Re: Re: Re: Best way to call DBI query
by MZSanford (Curate) on Mar 14, 2002 at 14:58 UTC
    In that case, i stand (well, sit actually), corrected. Was worth a shot.
    As a side comment, i assume something is assigning a database handle to the $self object, and that $self has a param() method which returns that value. You probably shoud be checking defined($dbh) to make sure the Database connection was successful, and that nothing has gone wrong to this point.
    from the frivolous to the serious