Advertisement
cd62131

Zip Lines

Jun 15th, 2017
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.39 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use utf8;
  5. use open qw|:std :encoding(utf8)|;
  6. use feature qq|say|;
  7.  
  8. open my $f, '<', shift @ARGV or die;
  9. my @lines1 = <$f> if defined $f;
  10. undef $f;
  11. open $f, '<', shift @ARGV or die;
  12. my @lines2 = <$f> if defined $f;
  13. undef $f;
  14.  
  15. while (@lines1 or @lines2) {
  16.   print shift @lines1 if @lines1;
  17.   print shift @lines2 if @lines2;
  18.   say '';
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement