#!/usr/bin/perl use warnings; use strict; my $a = "201412051159 201412051201"; my @b = split(" ", $a); foreach my $i (@b) { print "$i\n"; }