Skip to content

Instantly share code, notes, and snippets.

@dynax60
Created August 23, 2010 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dynax60/544979 to your computer and use it in GitHub Desktop.
Save dynax60/544979 to your computer and use it in GitHub Desktop.
Decode bytestream on $dbh->selectall_arrayref result
use Mojo::ByteStream 'b';
...
$rows = $dbh->selectall_arrayref(q{ .. });
# Decode bytestream to string for each item in arrays
grep { grep { $_ = b($_)->decode('UTF-8') } @$_ } grep { $_ } @$rows ;
@dynax60
Copy link
Author

dynax60 commented Aug 23, 2010

Коллеги, есть решение проще? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment