Skip to content

Instantly share code, notes, and snippets.

@plainblack
Created April 12, 2010 21:10
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 plainblack/364000 to your computer and use it in GitHub Desktop.
Save plainblack/364000 to your computer and use it in GitHub Desktop.
WTF Of The Day: 2010/04/12 -- Reimplementing join()
my $sql = "select email FROM users;";
@emails = $dbh->buildArray($sql);
my $count = 0;
foreach $email (@emails)
{
$count++;
if ($count == 1){
$g = $email;
}else{
$g .= ",".$email;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment