Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering if there is a more direct way other then on the SQL query itself like:... foreach my $row (@$values) { $row->{'name'}=~s/^\s+|\s+$//g; $row->{'last'}=~s/^\s+|\s+$//g; ... } ...
because of the size of the table, I am trying to do it without looping or specifying each row name. Is it possible?@$values=~s/^\s+|\s+$//g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing spaces from query results
by choroba (Cardinal) on Apr 30, 2013 at 14:08 UTC | |
by Anonymous Monk on Apr 30, 2013 at 14:11 UTC | |
by choroba (Cardinal) on Apr 30, 2013 at 14:20 UTC | |
|
Re: Removing spaces from query results
by Corion (Patriarch) on Apr 30, 2013 at 14:14 UTC | |
|
Re: Removing spaces from query results
by kcott (Archbishop) on Apr 30, 2013 at 19:21 UTC |