guacamayo has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
I need from ...
only a @array as result and not a array_ref. How can I do that ? on Perl DBI Docs ...$dbh->selectall_arrayref( "SELECT ename FROM emp ORDER BY ename", { Slice => {} } );
but i need a alternative with 2 lines :-) Thanks a lotmy $emps = $dbh->selectall_arrayref( "SELECT ename FROM emp ORDER BY ename", { Slice => {} } ); foreach my $emp ( @$emps ) { print "Employee: $emp->{ename}\n"; }
@array [ value, value2, value3] or $string = "value, value2, value3";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: $dbh->selectall_arrayref to simple @array
by Corion (Patriarch) on Sep 14, 2011 at 15:01 UTC | |
Re: $dbh->selectall_arrayref to simple @array
by Juerd (Abbot) on Sep 18, 2011 at 16:04 UTC | |
Re: $dbh->selectall_arrayref to simple @array
by metaperl (Curate) on Sep 14, 2011 at 18:02 UTC | |
Re: $dbh->selectall_arrayref to simple @array
by chrestomanci (Priest) on Sep 15, 2011 at 20:17 UTC |
Back to
Seekers of Perl Wisdom