Skip to content

Instantly share code, notes, and snippets.

@andrewsolomon
Created May 21, 2017 17:12
Show Gist options
  • Save andrewsolomon/4c765d1fe787faa1d1a63c06c9b0d816 to your computer and use it in GitHub Desktop.
Save andrewsolomon/4c765d1fe787faa1d1a63c06c9b0d816 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dump 'pp';
use feature 'say';
sub string_lengths {
my @params = @_;
return map { length($_) } @params;
}
my @lengths = string_lengths(@ARGV);
say 'String lengths: '.pp(@lengths);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment