Skip to content

Instantly share code, notes, and snippets.

@dalang
Created May 11, 2013 17:00
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 dalang/5560603 to your computer and use it in GitHub Desktop.
Save dalang/5560603 to your computer and use it in GitHub Desktop.
load data from a array, ouput css code into a file
#!/usr/bin/perl
@NBAABB = ('atl', 'bos', 'bkn', 'cha', 'chi', 'cle', 'dal', 'den', 'det', 'gsw', 'hou', 'ind', 'lac', 'lal', 'mem', 'mia', 'mil', 'min', 'nor', 'nyk', 'okc', 'orl', 'phi', 'pho', 'por', 'sac', 'sas', 'tor', 'uth', 'was');
open(FILE, ">_1tmpfile.txt");
foreach (@NBAABB) {
chomp;
#syswrite(FILE, '.' .$_. "-theme {\n");
#syswrite(FILE, "background: #\n}\n");
syswrite(FILE, "#sub-branding-" .$_. " {\n");
syswrite(FILE, "background-image: url(../images/teamlogo/" .$_. ".png)!important;\n}\n\n");
}
close(FILE);
<>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment