Skip to content

Instantly share code, notes, and snippets.

@dalang
Created May 11, 2013 17:07
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/5560625 to your computer and use it in GitHub Desktop.
Save dalang/5560625 to your computer and use it in GitHub Desktop.
copy data from one file to another file line for line
#!/usr/bin/perl
open(IFILE, "<index.html");
open(FILE, ">_tmpfile.txt");
while(<IFILE>) {
chomp();
syswrite(FILE, $_);
syswrite(FILE, "\n");
}
close(FILE);
close(IFILE);
<>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment