use strict; use warnings; use IO::File; my $fh = IO::File->new; $fh->open('inputfile','r') or die $1; my @aub = <$fh>; $fh->close; # a und b in $aub[0] bzw. $aub[1]