Skip to content

Instantly share code, notes, and snippets.

@symkat
Created March 10, 2011 06:15
Show Gist options
  • Save symkat/863648 to your computer and use it in GitHub Desktop.
Save symkat/863648 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use warnings;
use strict;
# OS X doesn't have seq. Quick implementation with no
# error checking, and only supports the requirements for
# for i in `seq <low> <high> ; do <command> ; done
my ( $first, $last ) = @ARGV;
print $_ == $last ? "$_\n" : "$_ " for ( $first .. $last );
@kentfredric
Copy link

perl -E 'say join q{ }, $ARGV[0] .. $ARGV[1]' 10 20
10 11 12 13 14 15 16 17 18 19 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment