Skip to content

Instantly share code, notes, and snippets.

@tsucchi
Created July 9, 2016 05:33
Show Gist options
  • Save tsucchi/440e346e00c8cc05725e3554bffbc6c4 to your computer and use it in GitHub Desktop.
Save tsucchi/440e346e00c8cc05725e3554bffbc6c4 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $value = "aa\n\nbb\n";
my @result = split /\n/, $value;
print Dumper(\@result);
# $VAR1 = [
# 'aa',
# '',
# 'bb'
# ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment