use strict; use warnings; while (<>) { chomp; next if /^\s*$/; print '{"url":"', $_, '"}', "\n" }