my $file = "$WORK_DIR/tmpdata.asc"; open my $info, $file or die "Could not open $file: $!"; my %line; local @ARGV = ($file); while ( <$info> ) { my $x1 = $_; my @cols = split(" ", $x1); print "@cols\n"; } close $info;