Created
February 19, 2014 16:25
-
-
Save bjjb/9095572 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env perl | |
| # Takes input like | |
| # 1 | |
| # 2 | |
| # 3 | |
| # and outputs | |
| # (1, 2, 3) | |
| # | |
| # Useful for converting a single column of SQL IDs to a list that you can use | |
| # in a query. | |
| while(<>) { | |
| chomp; | |
| print $. == 1 ? "(" : ", "; | |
| print; | |
| } | |
| print(")"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment