#!/usr/bin/perl #use warnings; open (GRAPH, "11.txt") || die "Can't open 11.txt: $!\n"; while ($line=) { if $line = /(\s+)(\s+)/$1, $2; { a1 = push(@a1, $1); a2 = push(@a2, $2); next; } } print @a1, @a2; close GRAPH;