in reply to Re: Syntax question when using Class::DBI
in thread Syntax question when using Class::DBI
fooble syntax OK Your problem's elsewhere.Scratches head ... Really, I'm not crazy:
OK, how about that fact that I'm running an ancient perl 5.005. That would explain our different results.gonzo:: more foo.pl #!/usr/local/bin/perl my $columnname = 'id'; print $rowobj->$columnname; gonzo:: perl -c foo.pl syntax error at foo.pl line 4, near "$columnname;" foo.pl had compilation errors.
And the solution for 5.005 is staring at me in another NOOBs question:
Cheersmy $columnname = 'id'; print $rowobj->{$columnname};
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Syntax question when using Class::DBI
by Corion (Patriarch) on Dec 09, 2004 at 08:18 UTC |